mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-26 13:49:18 +00:00
141 lines
2.6 KiB
Plaintext
141 lines
2.6 KiB
Plaintext
NEW
|
||
AUTO 3,1
|
||
.LIST OFF
|
||
*--------------------------------------
|
||
CODE.PUSHINT32 ldy #3
|
||
|
||
.1 lda #$A9 LDA #imm
|
||
jsr CODE.EmitByte
|
||
|
||
lda (pStack),y
|
||
jsr CODE.EmitByte
|
||
|
||
jsr CODE.PUSHA
|
||
dey
|
||
bpl .1
|
||
|
||
rts
|
||
*--------------------------------------
|
||
CODE.PULLL2ZPADDR
|
||
>LDYA ZPADDR
|
||
jsr CODE.LDYAI
|
||
|
||
ldx #0
|
||
|
||
.1 lda CCODE.PULLLYA,x
|
||
jsr CODE.EmitByte
|
||
inx
|
||
cpx #CCODE.PULLLYA.LEN
|
||
bne .1
|
||
|
||
rts
|
||
*--------------------------------------
|
||
CODE.PUSHfZPADDR
|
||
>LDYA ZPADDR
|
||
CODE.PUSHfYA jsr CODE.LDYAI
|
||
|
||
ldx #0
|
||
|
||
.1 lda CCODE.PUSHLYA,x
|
||
jsr CODE.EmitByte
|
||
inx
|
||
cpx #CCODE.PUSHLYA.LEN
|
||
bne .1
|
||
|
||
rts
|
||
*--------------------------------------
|
||
CODE.LDYAI pha
|
||
lda #$A0 LDY #imm
|
||
jsr CODE.EmitByte
|
||
tya
|
||
jsr CODE.EmitByte
|
||
|
||
lda #$A9 LDA #imm
|
||
jsr CODE.EmitByte
|
||
pla
|
||
jmp CODE.EmitByte
|
||
*--------------------------------------
|
||
CODE.PUSHA ldx #0
|
||
|
||
.1 lda CCODE.PUSHA,x
|
||
jsr CODE.EmitByte
|
||
inx
|
||
cpx #CCODE.PUSHA.LEN
|
||
bne .1
|
||
|
||
rts
|
||
*--------------------------------------
|
||
CODE.PULLA ldx #0
|
||
|
||
.1 lda CCODE.PULLA,x
|
||
jsr CODE.EmitByte
|
||
inx
|
||
cpx #CCODE.PULLA.LEN
|
||
bne .1
|
||
|
||
rts
|
||
*--------------------------------------
|
||
CODE.FPRINTSTR ldx #0
|
||
|
||
.1 lda CCODE.FPRINTSTR,x
|
||
jsr CODE.EmitByte
|
||
inx
|
||
cpx #CCODE.FPRINTSTR.LEN
|
||
bne .1
|
||
|
||
rts
|
||
*--------------------------------------
|
||
CODE.FPRINTL ldx #0
|
||
|
||
.1 lda CCODE.FPRINTL,x
|
||
jsr CODE.EmitByte
|
||
inx
|
||
cpx #CCODE.FPRINTL.LEN
|
||
bne .1
|
||
|
||
rts
|
||
*--------------------------------------
|
||
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.FPRINTCRLF ldx #C.CR
|
||
jsr CODE.PutChar
|
||
ldx #C.LF
|
||
*--------------------------------------
|
||
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
|