repo.or.cz
/
urasm.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
uroof: cosmetix
[urasm.git]
/
samples
/
crc16
/
crc16.zas
blob
6be74bce7ff071358a79b6fb7c4c0ca0d609a60b
1
PO_MSG EQU #0C0A
2
3
org #8000
4
5
exx
6
push hl
7
8
include <open-main-screen.zas>
9
10
ld de,msgtable
11
xor a
12
call PO_MSG
13
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
22
23
ld de,msgtable
24
ld a,1
25
call PO_MSG
26
27
ld de,crctable
28
ld bc,0x1021
29
call crc16fast_init
30
31
ld de,msgtable
32
xor a
33
call PO_MSG
34
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
43
44
pop hl
45
exx
46
47
ret
48
49
msgtable:
50
DEFX " "
51
DEFX "calculating ROM checksum..."
52
DEFX "initializing CRC table...\r"
53
54
include <printhexhl.zas>
55
include <crc16/crc16.zas>
56
include <crc16/crc16fast.zas>
57
58
59
crctable: defs 512