adapted to new assembler syntax
This commit is contained in:
parent
fe53d6ed3f
commit
b69fd5feb8
|
@ -1,3 +1,10 @@
|
||||||
|
.define fpac, fpadd, fpcdf, fpcfd, fpcfi, fpcif, fpcmf, fpcomp
|
||||||
|
.define fpdiv, fpfef, fpfif, fpmult, fpop, fpsub, fpnorm
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
! floating point pakket voor Z80
|
! floating point pakket voor Z80
|
||||||
! geimplementeerd zoals beschreven in
|
! geimplementeerd zoals beschreven in
|
||||||
! Electronica top internationaal.
|
! Electronica top internationaal.
|
||||||
|
@ -16,7 +23,6 @@ fol: .space 1
|
||||||
fon: .space 1
|
fon: .space 1
|
||||||
fom: .space 1
|
fom: .space 1
|
||||||
fox: .space 1
|
fox: .space 1
|
||||||
.errnz xa/256-fox/256
|
|
||||||
|
|
||||||
fpsub:
|
fpsub:
|
||||||
call fpcomp ! inverteer fpacc
|
call fpcomp ! inverteer fpacc
|
||||||
|
@ -99,11 +105,15 @@ addmor:
|
||||||
djnz addmor ! herhaal dit 4 keer
|
djnz addmor ! herhaal dit 4 keer
|
||||||
jr fpnorm
|
jr fpnorm
|
||||||
|
|
||||||
|
yyy:
|
||||||
|
.data2 fom
|
||||||
|
|
||||||
fpmult:
|
fpmult:
|
||||||
call setsgn
|
call setsgn
|
||||||
add a,(hl) ! bereken exponent produkt
|
add a,(hl) ! bereken exponent produkt
|
||||||
ld (hl),a ! fax exponent produkt
|
ld (hl),a ! fax exponent produkt
|
||||||
ld l,fom%256
|
ld a,(yyy)
|
||||||
|
ld l,a
|
||||||
ex de,hl ! gebruik de als wijzer
|
ex de,hl ! gebruik de als wijzer
|
||||||
xor a
|
xor a
|
||||||
ld h,a
|
ld h,a
|
||||||
|
@ -244,9 +254,12 @@ tstacc:
|
||||||
init:
|
init:
|
||||||
ld hl,xa ! initialiseer nog een paar registers
|
ld hl,xa ! initialiseer nog een paar registers
|
||||||
ld (hl),c
|
ld (hl),c
|
||||||
|
ld a,(xxx)
|
||||||
|
ld l,a
|
||||||
ld a,(fox)
|
ld a,(fox)
|
||||||
ld l,fax%256
|
|
||||||
ret
|
ret
|
||||||
|
xxx:
|
||||||
|
.data2 fax
|
||||||
|
|
||||||
fpcif:
|
fpcif:
|
||||||
ld de,(fpac) ! integer to convert
|
ld de,(fpac) ! integer to convert
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .mli4
|
.define .mli4
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! 32-bit multiply routine for z80
|
! 32-bit multiply routine for z80
|
||||||
! parameters:
|
! parameters:
|
||||||
|
@ -70,6 +75,6 @@
|
||||||
! on stack; put return address in hl
|
! on stack; put return address in hl
|
||||||
push ix ! least sign. 2 bytes of result
|
push ix ! least sign. 2 bytes of result
|
||||||
jp (hl) ! return
|
jp (hl) ! return
|
||||||
.data
|
.sect .data
|
||||||
.flag: .byte 0
|
.flag: .data1 0
|
||||||
.mplier: .space 4
|
.mplier: .space 4
|
||||||
|
|
Loading…
Reference in a new issue