renamed all ".inc" files to ".zas" (so egedit will properly highlight them)
[urasm.git] / samples / crc16 / crc16.zas
blobbaa8e098dde53fb53dfc067073e0e20e83d7f691
1 PO_MSG EQU #0C0A
3   org #8000
5   exx
6   push hl
8   include <open-main-screen>
10   ld   de,msgtable
11   xor  a
12   call PO_MSG
14   ld   hl,0
15   ld   bc,16384
16   ld   de,0x1021
17   ld   ix,0
18   call crc16
19   call printhexhl
20   ld   a,13
21   rst  #10
23   ld   de,msgtable
24   ld   a,1
25   call PO_MSG
27   ld   de,crctable
28   ld   bc,0x1021
29   call crc16fast_init
31   ld   de,msgtable
32   xor  a
33   call PO_MSG
35   ld   hl,0
36   ld   bc,16384
37   ld   de,crctable
38   ld   ix,0
39   call crc16fast
40   call printhexhl
41   ld   a,13
42   rst  #10
44   pop  hl
45   exx
47   ret
49 msgtable:
50   DEFX " "
51   DEFX "calculating ROM checksum..."
52   DEFX "initializing CRC table...\r"
54   include <printhexhl.zas>
55   include <crc16/crc16.zas>
56   include <crc16/crc16fast.zas>
59 crctable: defs 512