2021-04-08 20:30:18 +00:00
|
|
|
|
NEW
|
|
|
|
|
AUTO 3,1
|
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
2021-07-09 13:54:42 +00:00
|
|
|
|
CODE.PUSHYXI lda #$A9 LDA #imm
|
2021-04-08 20:30:18 +00:00
|
|
|
|
jsr CODE.EmitByte
|
2021-07-09 13:54:42 +00:00
|
|
|
|
txa
|
2021-04-29 11:56:34 +00:00
|
|
|
|
jsr CODE.EmitByte
|
2021-07-09 13:54:42 +00:00
|
|
|
|
jsr CODE.PUSHA
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2021-07-09 13:54:42 +00:00
|
|
|
|
lda #$A9 LDA #imm
|
|
|
|
|
jsr CODE.EmitByte
|
|
|
|
|
tya
|
|
|
|
|
jsr CODE.EmitByte
|
2021-04-29 11:56:34 +00:00
|
|
|
|
*--------------------------------------
|
2021-07-09 13:54:42 +00:00
|
|
|
|
CODE.PUSHA ldx #0
|
2021-04-29 11:56:34 +00:00
|
|
|
|
|
2021-07-09 13:54:42 +00:00
|
|
|
|
.1 lda CCODE.PUSHA,x
|
2021-04-29 11:56:34 +00:00
|
|
|
|
jsr CODE.EmitByte
|
|
|
|
|
inx
|
2021-07-09 13:54:42 +00:00
|
|
|
|
cpx #CCODE.PUSHA.LEN
|
2021-04-29 11:56:34 +00:00
|
|
|
|
bne .1
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2021-04-29 11:56:34 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CODE.PUSHINT16 ldy #1
|
|
|
|
|
|
|
|
|
|
.1 lda #$A9 LDA #imm
|
|
|
|
|
jsr CODE.EmitByte
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2021-04-29 11:56:34 +00:00
|
|
|
|
lda (pStack),y
|
|
|
|
|
jsr CODE.EmitByte
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2021-04-29 11:56:34 +00:00
|
|
|
|
jsr CODE.PUSHA
|
|
|
|
|
dey
|
|
|
|
|
bpl .1
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2021-04-29 11:56:34 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2021-07-07 14:29:10 +00:00
|
|
|
|
CODE.LDYXI lda #$A0 LDY #imm
|
|
|
|
|
jsr CODE.EmitByte
|
|
|
|
|
tya
|
|
|
|
|
jsr CODE.EmitByte
|
2021-07-13 16:52:04 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CODE.LDXI lda #$A2 LDX #imm
|
2021-07-07 14:29:10 +00:00
|
|
|
|
jsr CODE.EmitByte
|
|
|
|
|
txa
|
2021-07-13 16:52:04 +00:00
|
|
|
|
bra CODE.EmitByte
|
2021-07-07 14:29:10 +00:00
|
|
|
|
*--------------------------------------
|
2021-07-05 19:15:15 +00:00
|
|
|
|
CODE.JSRRT lda #$20 JSR
|
|
|
|
|
jsr CODE.EmitByte
|
|
|
|
|
lda J.RT,x
|
|
|
|
|
jsr CODE.EmitByte
|
|
|
|
|
lda J.RT+1,x
|
2021-07-13 16:52:04 +00:00
|
|
|
|
bra CODE.EmitByte
|
2021-07-05 19:15:15 +00:00
|
|
|
|
*--------------------------------------
|
2021-04-08 20:30:18 +00:00
|
|
|
|
CODE.FPUCALL lda #$A2 LDX #imm
|
|
|
|
|
jsr CODE.EmitByte
|
|
|
|
|
txa
|
|
|
|
|
jsr CODE.EmitByte
|
|
|
|
|
lda #$20 JSR
|
|
|
|
|
jsr CODE.EmitByte
|
|
|
|
|
lda #A2osX.FPUCALL
|
|
|
|
|
jsr CODE.EmitByte
|
|
|
|
|
lda /A2osX.FPUCALL
|
|
|
|
|
bra CODE.EmitByte
|
|
|
|
|
*--------------------------------------
|
2021-04-10 17:17:40 +00:00
|
|
|
|
CODE.PutChar lda #$A9 LDA #imm
|
|
|
|
|
jsr CODE.EmitByte
|
|
|
|
|
txa
|
|
|
|
|
jsr CODE.EmitByte
|
|
|
|
|
ldx #SYS.PutChar
|
|
|
|
|
*--------------------------------------
|
2021-04-08 20:30:18 +00:00
|
|
|
|
CODE.SYSCALL lda #$A2 LDX #imm
|
|
|
|
|
jsr CODE.EmitByte
|
|
|
|
|
txa
|
|
|
|
|
jsr CODE.EmitByte
|
|
|
|
|
lda #$20 JSR
|
|
|
|
|
jsr CODE.EmitByte
|
|
|
|
|
lda #A2osX.SYSCALL
|
|
|
|
|
jsr CODE.EmitByte
|
|
|
|
|
lda /A2osX.SYSCALL
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CODE.EmitByte sta (ZPCodeBufPtr)
|
|
|
|
|
inc ZPCodeBufPtr
|
|
|
|
|
bne .8
|
|
|
|
|
|
|
|
|
|
inc ZPCodeBufPtr+1
|
|
|
|
|
|
|
|
|
|
.8 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
|
|
|
|
SAVE usr/src/bin/acos.s.code
|
|
|
|
|
LOAD usr/src/bin/acos.s
|
|
|
|
|
ASM
|