Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/lib/arch/zx48k/runtime/logn.asm
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ LN: ; Computes Ln(x) using ROM FP-CALC
call __FPSTACK_PUSH

rst 28h ; ROM CALC
defb 20h ; 25h
defb 25h
defb 38h ; END CALC

jp __FPSTACK_POP

pop namespace

3 changes: 1 addition & 2 deletions src/lib/arch/zxnext/runtime/logn.asm
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ LN: ; Computes Ln(x) using ROM FP-CALC
call __FPSTACK_PUSH

rst 28h ; ROM CALC
defb 20h ; 25h
defb 25h
defb 38h ; END CALC

jp __FPSTACK_POP

pop namespace

46 changes: 23 additions & 23 deletions tests/functional/arch/zx48k/19.asm
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ _x:
ei
ret
;; --- end of user code ---
#line 1 "/zxbasic/src/arch/zx48k/library-asm/acos.asm"
#line 1 "/zxbasic/src/arch/zx48k/library-asm/stackf.asm"
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/acos.asm"
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/stackf.asm"
; -------------------------------------------------------------
; Functions to manage FP-Stack of the ZX Spectrum ROM CALC
; -------------------------------------------------------------
Expand Down Expand Up @@ -131,7 +131,7 @@ __FPSTACK_I16: ; Pushes 16 bits integer in HL into the FP ROM STACK
ld b, a
jp __FPSTACK_PUSH
pop namespace
#line 2 "/zxbasic/src/arch/zx48k/library-asm/acos.asm"
#line 2 "/zxbasic/src/lib/arch/zx48k/runtime/acos.asm"
push namespace core
ACOS: ; Computes ACOS using ROM FP-CALC
call __FPSTACK_PUSH
Expand All @@ -140,8 +140,8 @@ ACOS: ; Computes ACOS using ROM FP-CALC
defb 38h ; END CALC
jp __FPSTACK_POP
pop namespace
#line 71 "19.bas"
#line 1 "/zxbasic/src/arch/zx48k/library-asm/asin.asm"
#line 71 "arch/zx48k/19.bas"
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/asin.asm"
push namespace core
ASIN: ; Computes ASIN using ROM FP-CALC
call __FPSTACK_PUSH
Expand All @@ -150,8 +150,8 @@ ASIN: ; Computes ASIN using ROM FP-CALC
defb 38h ; END CALC
jp __FPSTACK_POP
pop namespace
#line 72 "19.bas"
#line 1 "/zxbasic/src/arch/zx48k/library-asm/atan.asm"
#line 72 "arch/zx48k/19.bas"
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/atan.asm"
push namespace core
ATAN: ; Computes ATAN using ROM FP-CALC
call __FPSTACK_PUSH
Expand All @@ -160,8 +160,8 @@ ATAN: ; Computes ATAN using ROM FP-CALC
defb 38h ; END CALC
jp __FPSTACK_POP
pop namespace
#line 73 "19.bas"
#line 1 "/zxbasic/src/arch/zx48k/library-asm/cos.asm"
#line 73 "arch/zx48k/19.bas"
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/cos.asm"
push namespace core
COS: ; Computes COS using ROM FP-CALC
call __FPSTACK_PUSH
Expand All @@ -170,8 +170,8 @@ COS: ; Computes COS using ROM FP-CALC
defb 38h ; END CALC
jp __FPSTACK_POP
pop namespace
#line 74 "19.bas"
#line 1 "/zxbasic/src/arch/zx48k/library-asm/exp.asm"
#line 74 "arch/zx48k/19.bas"
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/exp.asm"
push namespace core
EXP: ; Computes e^n using ROM FP-CALC
call __FPSTACK_PUSH
Expand All @@ -180,18 +180,18 @@ EXP: ; Computes e^n using ROM FP-CALC
defb 38h ; END CALC
jp __FPSTACK_POP
pop namespace
#line 75 "19.bas"
#line 1 "/zxbasic/src/arch/zx48k/library-asm/logn.asm"
#line 75 "arch/zx48k/19.bas"
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/logn.asm"
push namespace core
LN: ; Computes Ln(x) using ROM FP-CALC
call __FPSTACK_PUSH
rst 28h ; ROM CALC
defb 20h ; 25h
defb 25h
defb 38h ; END CALC
jp __FPSTACK_POP
pop namespace
#line 76 "19.bas"
#line 1 "/zxbasic/src/arch/zx48k/library-asm/sin.asm"
#line 76 "arch/zx48k/19.bas"
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sin.asm"
push namespace core
SIN: ; Computes SIN using ROM FP-CALC
call __FPSTACK_PUSH
Expand All @@ -200,8 +200,8 @@ SIN: ; Computes SIN using ROM FP-CALC
defb 38h ; END CALC
jp __FPSTACK_POP
pop namespace
#line 77 "19.bas"
#line 1 "/zxbasic/src/arch/zx48k/library-asm/sqrt.asm"
#line 77 "arch/zx48k/19.bas"
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sqrt.asm"
push namespace core
SQRT: ; Computes SQRT(x) using ROM FP-CALC
call __FPSTACK_PUSH
Expand All @@ -210,8 +210,8 @@ SQRT: ; Computes SQRT(x) using ROM FP-CALC
defb 38h ; END CALC
jp __FPSTACK_POP
pop namespace
#line 78 "19.bas"
#line 1 "/zxbasic/src/arch/zx48k/library-asm/storef.asm"
#line 78 "arch/zx48k/19.bas"
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/storef.asm"
push namespace core
__PISTOREF: ; Indect Stores a float (A, E, D, C, B) at location stored in memory, pointed by (IX + HL)
push de
Expand Down Expand Up @@ -239,8 +239,8 @@ __STOREF: ; Stores the given FP number in A EDCB at address HL
ld (hl), b
ret
pop namespace
#line 79 "19.bas"
#line 1 "/zxbasic/src/arch/zx48k/library-asm/tan.asm"
#line 79 "arch/zx48k/19.bas"
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/tan.asm"
push namespace core
TAN: ; Computes TAN using ROM FP-CALC
call __FPSTACK_PUSH
Expand All @@ -249,5 +249,5 @@ TAN: ; Computes TAN using ROM FP-CALC
defb 38h ; END CALC
jp __FPSTACK_POP
pop namespace
#line 80 "19.bas"
#line 80 "arch/zx48k/19.bas"
END
46 changes: 23 additions & 23 deletions tests/functional/arch/zx48k/70.asm
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ _a:
ei
ret
;; --- end of user code ---
#line 1 "/zxbasic/src/arch/zx48k/library-asm/cos.asm"
#line 1 "/zxbasic/src/arch/zx48k/library-asm/stackf.asm"
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/cos.asm"
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/stackf.asm"
; -------------------------------------------------------------
; Functions to manage FP-Stack of the ZX Spectrum ROM CALC
; -------------------------------------------------------------
Expand Down Expand Up @@ -97,7 +97,7 @@ __FPSTACK_I16: ; Pushes 16 bits integer in HL into the FP ROM STACK
ld b, a
jp __FPSTACK_PUSH
pop namespace
#line 2 "/zxbasic/src/arch/zx48k/library-asm/cos.asm"
#line 2 "/zxbasic/src/lib/arch/zx48k/runtime/cos.asm"
push namespace core
COS: ; Computes COS using ROM FP-CALC
call __FPSTACK_PUSH
Expand All @@ -106,8 +106,8 @@ COS: ; Computes COS using ROM FP-CALC
defb 38h ; END CALC
jp __FPSTACK_POP
pop namespace
#line 35 "70.bas"
#line 1 "/zxbasic/src/arch/zx48k/library-asm/exp.asm"
#line 35 "arch/zx48k/70.bas"
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/exp.asm"
push namespace core
EXP: ; Computes e^n using ROM FP-CALC
call __FPSTACK_PUSH
Expand All @@ -116,9 +116,9 @@ EXP: ; Computes e^n using ROM FP-CALC
defb 38h ; END CALC
jp __FPSTACK_POP
pop namespace
#line 36 "70.bas"
#line 1 "/zxbasic/src/arch/zx48k/library-asm/ftou32reg.asm"
#line 1 "/zxbasic/src/arch/zx48k/library-asm/neg32.asm"
#line 36 "arch/zx48k/70.bas"
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/ftou32reg.asm"
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/neg32.asm"
push namespace core
__ABS32:
bit 7, d
Expand All @@ -143,7 +143,7 @@ __NEG32: ; Negates DEHL (Two's complement)
inc de
ret
pop namespace
#line 2 "/zxbasic/src/arch/zx48k/library-asm/ftou32reg.asm"
#line 2 "/zxbasic/src/lib/arch/zx48k/runtime/ftou32reg.asm"
push namespace core
__FTOU32REG: ; Converts a Float to (un)signed 32 bit integer (NOTE: It's ALWAYS 32 bit signed)
; Input FP number in A EDCB (A exponent, EDCB mantissa)
Expand Down Expand Up @@ -215,18 +215,18 @@ __FTOU8: ; Converts float in C ED LH to Unsigned byte in A
ld a, l
ret
pop namespace
#line 37 "70.bas"
#line 1 "/zxbasic/src/arch/zx48k/library-asm/logn.asm"
#line 37 "arch/zx48k/70.bas"
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/logn.asm"
push namespace core
LN: ; Computes Ln(x) using ROM FP-CALC
call __FPSTACK_PUSH
rst 28h ; ROM CALC
defb 20h ; 25h
defb 25h
defb 38h ; END CALC
jp __FPSTACK_POP
pop namespace
#line 38 "70.bas"
#line 1 "/zxbasic/src/arch/zx48k/library-asm/sin.asm"
#line 38 "arch/zx48k/70.bas"
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sin.asm"
push namespace core
SIN: ; Computes SIN using ROM FP-CALC
call __FPSTACK_PUSH
Expand All @@ -235,8 +235,8 @@ SIN: ; Computes SIN using ROM FP-CALC
defb 38h ; END CALC
jp __FPSTACK_POP
pop namespace
#line 39 "70.bas"
#line 1 "/zxbasic/src/arch/zx48k/library-asm/sqrt.asm"
#line 39 "arch/zx48k/70.bas"
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sqrt.asm"
push namespace core
SQRT: ; Computes SQRT(x) using ROM FP-CALC
call __FPSTACK_PUSH
Expand All @@ -245,8 +245,8 @@ SQRT: ; Computes SQRT(x) using ROM FP-CALC
defb 38h ; END CALC
jp __FPSTACK_POP
pop namespace
#line 40 "70.bas"
#line 1 "/zxbasic/src/arch/zx48k/library-asm/storef.asm"
#line 40 "arch/zx48k/70.bas"
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/storef.asm"
push namespace core
__PISTOREF: ; Indect Stores a float (A, E, D, C, B) at location stored in memory, pointed by (IX + HL)
push de
Expand Down Expand Up @@ -274,8 +274,8 @@ __STOREF: ; Stores the given FP number in A EDCB at address HL
ld (hl), b
ret
pop namespace
#line 41 "70.bas"
#line 1 "/zxbasic/src/arch/zx48k/library-asm/tan.asm"
#line 41 "arch/zx48k/70.bas"
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/tan.asm"
push namespace core
TAN: ; Computes TAN using ROM FP-CALC
call __FPSTACK_PUSH
Expand All @@ -284,8 +284,8 @@ TAN: ; Computes TAN using ROM FP-CALC
defb 38h ; END CALC
jp __FPSTACK_POP
pop namespace
#line 42 "70.bas"
#line 1 "/zxbasic/src/arch/zx48k/library-asm/u32tofreg.asm"
#line 42 "arch/zx48k/70.bas"
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/u32tofreg.asm"
push namespace core
__I8TOFREG:
ld l, a
Expand Down Expand Up @@ -355,5 +355,5 @@ __U32TOFREG_END:
ret
ENDP
pop namespace
#line 43 "70.bas"
#line 43 "arch/zx48k/70.bas"
END