home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Syzygy Magazine 4
/
Syzygy_Magazine_4_1998_08_07___pl_Disk_2_of_3_Side_B.atr
/
fp.arc
/
TESTFP.ASM
< prev
next >
Wrap
Assembly Source File
|
1988-09-01
|
2KB
|
1 lines
* FP Test (simple pc :)¢* by... doesn't matter who...¢¢ org $8000¢ opt %0100101¢¢ icl 'D:FPLABS.ASM'¢¢strt lda #1¢ sta 752¢ jsr menu ;main part :)¢ lda #$ff¢ sta 764¢ cmp 764¢ beq *-3¢ lda 764¢ cmp #6¢ beq add¢ cmp #14¢ beq sub¢ cmp #7¢ beq mul¢ cmp #38¢ beq div¢ lda #$ff¢ sta 764¢ jmp (10)¢¢add jsr proc¢ jsr FPadd¢ jmp itis¢sub jsr proc¢ jsr FPsub¢ jmp itis¢mul jsr proc¢ jsr FPmul¢ jmp itis¢div jsr proc¢ jsr FPdiv¢ jmp itis¢¢proc lda #0¢ sta 752¢ lda #$ff¢ sta 764¢ jsr getn ;get num x2 & copy it¢ ldx #5¢_cp1 lda fr0,x¢ sta real,x¢ dex¢ bpl _cp1¢ jsr getn¢ ldx #5¢_cp2 lda fr0,x¢ sta fr1,x¢ lda real,x¢ sta fr0,x¢ dex¢ bpl _cp2¢ rts¢¢getn ldx <txtn ;get num¢ ldy >txtn¢ jsr putt¢ ldx <lbuff¢ ldy >lbuff¢ jsr gett¢ lda #0¢ sta cix¢ ldx <lbuff¢ ldy >lbuff¢ stx inbuff¢ sty inbuff+1¢ jmp ascFP¢¢itis ldx <_eol¢ ldy >_eol¢ jsr putt¢ jsr FPasc¢ lda #1¢ sta 752¢ ldy #0¢_it0 lda (inbuff),y¢ cmp #'0'¢ bne _it1¢ iny¢ bne _it0¢_it1 lda (inbuff),y¢ php¢ and #$7f¢ sty cix¢ ldy #11¢ sty $342¢ ldx #0¢ stx $348¢ stx $349¢ jsr $e456¢ ldy cix¢ iny¢ plp¢ bpl _it1¢ ldx <_eol¢ ldy >_eol¢ jsr putt¢ ldx <prs¢ ldy >prs¢ jsr putt¢ lda #$ff¢ sta 764¢ cmp 764¢ beq *-3¢ jmp strt¢¢putt jsr help ;put text¢ lda #9¢ sta $342¢ jmp $e456¢¢gett jsr help ;get text¢ lda #5¢ sta $342¢ jmp $e456¢¢help stx $344¢ sty $345¢ lda #40¢ sta $348¢ ldx #0¢ stx $349¢ rts¢¢menu ldx <text ;show menu¢ ldy >text¢ stx $344¢ sty $345¢ lda <length¢ sta $348¢ lda #0¢ sta $349¢ lda #11¢ sta $342¢ ldx #0¢ jmp $e456¢¢*------------------*¢¢eol equ $9b¢¢text dta c'}á≡σ≥≤∩∈β∮áπβ∮π⌡∮β⌠∩≥á¿≡πáיÀáØøøלז·´⌐á',b(eol)¢ dta c'+ = addition',b(eol)¢ dta c'- = substraction',b(eol)¢ dta c'* = multiplication',b(eol)¢ dta c'/ = division',b(eol)¢ dta c'else = quit',b(eol)¢prs dta c'Press the key...²',b(eol)¢length equ *-text¢¢txtn dta c'Enter number:',b(eol)¢_eol equ *-1¢¢real equ *¢¢ org $2e0¢ dta a(strt)¢ end¢