|
67 | 67 | call .core.__FP_PUSH_REV |
68 | 68 | call .core.__ANDF |
69 | 69 | ld (_b), a |
| 70 | + ld a, (_a) |
| 71 | + ld de, (_a + 1) |
| 72 | + ld bc, (_a + 3) |
| 73 | + ld hl, _a + 4 |
| 74 | + call .core.__FP_PUSH_REV |
| 75 | + call .core.__EQF |
| 76 | + push af |
| 77 | + ld a, (_a) |
| 78 | + ld de, (_a + 1) |
| 79 | + ld bc, (_a + 3) |
| 80 | + ld hl, _a + 4 |
| 81 | + call .core.__FP_PUSH_REV |
| 82 | + call .core.__EQF |
| 83 | + ld h, a |
| 84 | + pop af |
| 85 | + or a |
| 86 | + jr z, .LABEL.__LABEL0 |
| 87 | + ld a, h |
| 88 | +.LABEL.__LABEL0: |
| 89 | + sub 1 |
| 90 | + sbc a, a |
| 91 | + inc a |
| 92 | + ld (_b), a |
70 | 93 | ld hl, 0 |
71 | 94 | ld b, h |
72 | 95 | ld c, l |
@@ -311,7 +334,28 @@ __ANDF: ; A & B |
311 | 334 | call __FPSTACK_POP |
312 | 335 | jp __FTOU8 ; Convert to 8 bits |
313 | 336 | pop namespace |
314 | | -#line 60 "arch/zx48k/andf.bas" |
| 337 | +#line 83 "arch/zx48k/andf.bas" |
| 338 | +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/cmp/eqf.asm" |
| 339 | + ; ------------------------------------------------------------- |
| 340 | + ; Floating point library using the FP ROM Calculator (ZX 48K) |
| 341 | + ; All of them uses C EDHL registers as 1st paramter. |
| 342 | + ; For binary operators, the 2n operator must be pushed into the |
| 343 | + ; stack, in the order BC DE HL (B not used). |
| 344 | + ; |
| 345 | + ; Uses CALLEE convention |
| 346 | + ; ------------------------------------------------------------- |
| 347 | + push namespace core |
| 348 | +__EQF: ; A = B |
| 349 | + call __FPSTACK_PUSH2 |
| 350 | + ; ------------- ROM NOS-EQL |
| 351 | + ld b, 0Eh ; For comparison operators, OP must be in B also |
| 352 | + rst 28h |
| 353 | + defb 0Eh |
| 354 | + defb 38h; ; END CALC |
| 355 | + call __FPSTACK_POP |
| 356 | + jp __FTOU8 ; Convert to 8 bits |
| 357 | + pop namespace |
| 358 | +#line 84 "arch/zx48k/andf.bas" |
315 | 359 | #line 1 "/zxbasic/src/lib/arch/zx48k/runtime/pushf.asm" |
316 | 360 | ; Routine to push Float pointed by HL |
317 | 361 | ; Into the stack. Notice that the hl points to the last |
@@ -339,5 +383,5 @@ __FP_PUSH_REV: |
339 | 383 | exx |
340 | 384 | ret |
341 | 385 | pop namespace |
342 | | -#line 61 "arch/zx48k/andf.bas" |
| 386 | +#line 85 "arch/zx48k/andf.bas" |
343 | 387 | END |
0 commit comments