2019-02-06 23:06:32 +00:00
|
|
|
#
|
|
|
|
.sect .text
|
|
|
|
.sect .rom
|
|
|
|
.sect .data
|
|
|
|
.sect .bss
|
|
|
|
.sect .text
|
|
|
|
|
2019-02-13 21:45:22 +00:00
|
|
|
! Which resets we install are determined by statistical analysis of Star
|
|
|
|
! Trek. When changing these, make sure to update the i80 table to match.
|
|
|
|
! 97 call .floadn2
|
|
|
|
! 41 call .floadn4
|
|
|
|
! 34 call .fload4
|
|
|
|
! 28 call .fstoren2
|
2019-02-14 23:38:39 +00:00
|
|
|
!
|
|
|
|
! Also:
|
|
|
|
! 48 call .cmps_mag
|
2019-02-13 21:45:22 +00:00
|
|
|
|
2019-02-06 23:06:32 +00:00
|
|
|
.define .rst_init
|
|
|
|
.rst_init:
|
2019-02-13 21:45:22 +00:00
|
|
|
lxi h, .floadn2
|
|
|
|
lxi d, 0x0008
|
|
|
|
call copy
|
|
|
|
lxi h, .floadn4
|
|
|
|
call copy
|
|
|
|
lxi h, .fload4
|
|
|
|
call copy
|
|
|
|
lxi h, .fstoren2
|
2019-02-14 23:38:39 +00:00
|
|
|
call copy
|
|
|
|
lxi h, .cmps_mag
|
2019-02-13 21:45:22 +00:00
|
|
|
jmp copy
|
|
|
|
|
|
|
|
! Copies eight bytes from HL to DE.
|
|
|
|
copy:
|
|
|
|
mvi c, 8
|
|
|
|
.1:
|
2019-02-07 07:45:20 +00:00
|
|
|
mov a, m
|
2019-02-13 21:45:22 +00:00
|
|
|
stax d
|
2019-02-06 23:06:32 +00:00
|
|
|
inx h
|
2019-02-15 20:30:27 +00:00
|
|
|
inr e
|
2019-02-13 21:45:22 +00:00
|
|
|
dcr c
|
|
|
|
jnz .1
|
|
|
|
ret
|