mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-24 14:31:05 +00:00
131 lines
2.7 KiB
Plaintext
131 lines
2.7 KiB
Plaintext
NEW
|
||
AUTO 3,1
|
||
.LIST OFF
|
||
*--------------------------------------
|
||
CODE.PushXFromYA
|
||
jsr CODE.LDXYAI
|
||
|
||
ldx #PCC.PushXFromYA.L
|
||
ldy #0
|
||
|
||
.1 lda PCC.PushXFromYA,y
|
||
jsr CODE.EmitByte
|
||
iny
|
||
dex
|
||
bne .1
|
||
|
||
rts
|
||
*--------------------------------------
|
||
CODE.PopXToYA jsr CODE.LDXYAI
|
||
|
||
ldx #PCC.PopXToYA.L
|
||
ldy #0
|
||
|
||
.1 lda PCC.PopXToYA,y
|
||
jsr CODE.EmitByte
|
||
iny
|
||
dex
|
||
bne .1
|
||
|
||
rts
|
||
*--------------------------------------
|
||
CODE.PUSHI pha
|
||
lda #$A9 LDA #imm
|
||
jsr CODE.EmitByte
|
||
pla
|
||
jsr CODE.EmitByte
|
||
bra CODE.PUSHA
|
||
*--------------------------------------
|
||
CODE.LDXYAI pha
|
||
|
||
lda #$A2 LDX #imm
|
||
jsr CODE.EmitByte
|
||
txa
|
||
jsr CODE.EmitByte
|
||
|
||
lda #$A0 LDY #imm
|
||
jsr CODE.EmitByte
|
||
tya
|
||
jsr CODE.EmitByte
|
||
|
||
lda #$A9 LDA #imm
|
||
jsr CODE.EmitByte
|
||
pla
|
||
bra CODE.EmitByte
|
||
*--------------------------------------
|
||
CODE.PUSHYA jsr CODE.PUSHA
|
||
lda #$AA 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.PULLYA jsr CODE.PULLA
|
||
lda #$48 PHA
|
||
jsr CODE.EmitByte
|
||
jsr CODE.PULLA
|
||
lda #$7A PLY
|
||
bra CODE.EmitByte
|
||
*--------------------------------------
|
||
CODE.PULLA lda #$B2 LDA (zp)
|
||
jsr CODE.EmitByte
|
||
lda #pStack
|
||
jsr CODE.EmitByte
|
||
*--------------------------------------
|
||
CODE.INCPSTACK lda #$E6 INC zp
|
||
jsr CODE.EmitByte
|
||
lda #pStack
|
||
bra CODE.EmitByte
|
||
*--------------------------------------
|
||
CODE.JMPYX lda #$4C
|
||
bra CODE.JSRYX.1
|
||
*--------------------------------------
|
||
CODE.JSRYX lda #$20 JSR
|
||
|
||
CODE.JSRYX.1 jsr CODE.EmitByte
|
||
tya
|
||
jsr CODE.EmitByte
|
||
txa
|
||
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.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 (ZPCSHCode)
|
||
inc ZPCSHCode
|
||
bne .8
|
||
|
||
inc ZPCSHCode+1
|
||
|
||
.8 rts
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE usr/src/bin/csh.s.code
|
||
LOAD usr/src/bin/csh.s
|
||
ASM
|