2019-02-06 23:06:32 +00:00
|
|
|
#
|
|
|
|
.sect .text
|
|
|
|
.sect .rom
|
|
|
|
.sect .data
|
|
|
|
.sect .bss
|
|
|
|
.sect .text
|
|
|
|
|
|
|
|
.define .rst_init
|
|
|
|
.rst_init:
|
|
|
|
mvi a, 0xc3 ! jmp <a16>
|
|
|
|
sta 0x08
|
2019-02-08 20:35:14 +00:00
|
|
|
sta 0x10
|
2019-02-06 23:06:32 +00:00
|
|
|
lxi h, rst1
|
|
|
|
shld 0x09
|
2019-02-08 20:35:14 +00:00
|
|
|
lxi h, rst2
|
|
|
|
shld 0x11
|
2019-02-06 23:06:32 +00:00
|
|
|
ret
|
|
|
|
|
2019-02-07 07:45:20 +00:00
|
|
|
! de = [bc+const1] (remember bc is the frame pointer)
|
2019-02-06 23:06:32 +00:00
|
|
|
rst1:
|
|
|
|
pop h
|
2019-02-07 07:45:20 +00:00
|
|
|
mov a, m
|
2019-02-06 23:06:32 +00:00
|
|
|
inx h
|
|
|
|
push h
|
2019-02-07 07:45:20 +00:00
|
|
|
|
|
|
|
mov l, a
|
|
|
|
ral
|
|
|
|
sbb a
|
|
|
|
mov h, a
|
|
|
|
|
|
|
|
dad b
|
2019-02-06 23:06:32 +00:00
|
|
|
mov e, m
|
|
|
|
inx h
|
|
|
|
mov d, m
|
|
|
|
ret
|
2019-02-08 20:35:14 +00:00
|
|
|
|
|
|
|
! [bc+const1] = de (remember bc is the frame pointer)
|
|
|
|
rst2:
|
|
|
|
pop h
|
|
|
|
mov a, m
|
|
|
|
inx h
|
|
|
|
push h
|
|
|
|
|
|
|
|
mov l, a
|
|
|
|
ral
|
|
|
|
sbb a
|
|
|
|
mov h, a
|
|
|
|
|
|
|
|
dad b
|
|
|
|
mov m, e
|
|
|
|
inx h
|
|
|
|
mov m, d
|
|
|
|
ret
|
|
|
|
|