A2osX/BIN/ACOS.S.CODE.txt
2021-08-05 13:35:37 +02:00

137 lines
2.9 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

NEW
AUTO 3,1
.LIST OFF
*--------------------------------------
CODE.PUSHYA ldx #0
.1 lda CCODE.PUSHYA,x
jsr CODE.EmitByte
inx
cpx #CCODE.PUSHYA.LEN
bne .1
rts
*--------------------------------------
CODE.TESTTRUE ldx #0
.1 lda CCODE.TESTTRUE,x
jsr CODE.EmitByte
inx
cpx #CCODE.TESTTRUE.LEN
bne .1
rts
*--------------------------------------
CODE.PUSHYXI lda #$A9 LDA #imm
jsr CODE.EmitByte
txa
jsr CODE.EmitByte
jsr CODE.PUSHA
lda #$A9 LDA #imm
jsr CODE.EmitByte
tya
jsr CODE.EmitByte
*--------------------------------------
CODE.PUSHA lda #$C6 DEC zp
jsr CODE.EmitByte
lda #pStack
jsr CODE.EmitByte
lda #$92 STA (zp)
jsr CODE.EmitByte
lda #pStack
jmp CODE.EmitByte
*--------------------------------------
CODE.PUSHINT16 ldy #1
.1 lda #$A9 LDA #imm
jsr CODE.EmitByte
lda (pStack),y
jsr CODE.EmitByte
jsr CODE.PUSHA
dey
bpl .1
rts
*--------------------------------------
CODE.PULLYX jsr CODE.PULLA
lda #$A8 TAY
jsr CODE.EmitByte
jsr CODE.PULLA
lda #$AA TAX
bra CODE.EmitByte
*--------------------------------------
CODE.PULLA lda #$B2 LDA (zp)
jsr CODE.EmitByte
lda #pStack
jsr CODE.EmitByte
lda #$E6 INC zp
jsr CODE.EmitByte
lda #pStack
bra CODE.EmitByte
*--------------------------------------
CODE.LDVARDDRI ldy VAR.ADDR
ldx VAR.ADDR+1
*--------------------------------------
CODE.LDYXI lda #$A0 LDY #imm
jsr CODE.EmitByte
tya
jsr CODE.EmitByte
*--------------------------------------
CODE.LDXI lda #$A2 LDX #imm
jsr CODE.EmitByte
txa
bra CODE.EmitByte
*--------------------------------------
CODE.JSRRT lda #$20 JSR
jsr CODE.EmitByte
lda J.RT,x
jsr CODE.EmitByte
lda J.RT+1,x
bra CODE.EmitByte
*--------------------------------------
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
*--------------------------------------
CODE.PutChar lda #$A9 LDA #imm
jsr CODE.EmitByte
txa
jsr CODE.EmitByte
ldx #SYS.PutChar
*--------------------------------------
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