Mercurial > hg > Members > kono > nitros9-code
changeset 2460:c840e05abdac
rfm: one T short of a meme
author | aaronwolfe |
---|---|
date | Sat, 27 Feb 2010 08:26:46 +0000 |
parents | 91e31e528692 |
children | 9fc6566ada9c |
files | level1/modules/rfm.asm |
diffstat | 1 files changed, 63 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/level1/modules/rfm.asm Sat Feb 27 01:53:12 2010 +0000 +++ b/level1/modules/rfm.asm Sat Feb 27 08:26:46 2010 +0000 @@ -175,8 +175,41 @@ lbra sendit delete lda #DW.delete lbra sendit -seek lda #DW.seek - lbra sendit + + +* seek = send dwop, rfmop, path, caller's X + U +seek pshs y,u + + ldx R$U,u + pshs x + + ldx R$X,u + pshs x + + lda PD.PD,y + pshs a + + ldb #DW.seek + lda #OP_VFM + pshs d + + leax ,s ; point X to stack + ldy #7 ; 7 bytes to send + +* set U to dwsub + ifgt Level-1 + ldu <D.DWSubAddr + else + ldu >D.DWSubAddr + endc + +* send dw op, rfm op, path # + jsr 6,u + leas 7,s ;clean stack - PD.PD Regs + + clrb + puls y,u,pc + read ldb #DW.read bra read1 ; join readln routine @@ -308,7 +341,7 @@ * getstt lda #DW.getstt - lbsr sendit + lbsr sendgstt ldb R$B,u get function code beq GstOPT @@ -468,6 +501,33 @@ close1 puls u,y,pc +* send dwop, rfmop, path, set/getstat op (path is in A) +sendgstt pshs x,y,u + + ldb R$B,u + pshs d + + lda #OP_VFM ; load command + ldb #DW.getstt + pshs d ; command store on stack + leax ,s ; point X to stack + ldy #4 ; 2 byte to send + ifgt Level-1 + ldu <D.DWSubAddr + else + ldu >D.DWSubAddr + endc + + jsr 6,u + leas 4,s ;clean stack + + clrb + puls x,y,u,pc + + + + + * just send OP_VMF + vfmop sendit pshs a,x,y,u