Mercurial > hg > Members > kono > nitros9-code
changeset 1473:1a540a1ebf66
Removed modpak.asm
Moved sio.asm and t1.asm to Level 1
author | boisy |
---|---|
date | Mon, 15 Dec 2003 15:09:41 +0000 |
parents | 95c71c2a441f |
children | cfd326948cbc |
files | level2/modules/modpak.asm level2/modules/sio.asm level2/modules/t1.asm |
diffstat | 3 files changed, 0 insertions(+), 1102 deletions(-) [+] |
line wrap: on
line diff
--- a/level2/modules/modpak.asm Mon Dec 15 15:02:46 2003 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,726 +0,0 @@ -******************************************************************** -* ModPak - Tandy RS-232/DCM Modem Pak driver -* -* $Id$ -* -* Edt/Rev YYYY/MM/DD Modified by -* Comment -* ------------------------------------------------------------------ -* 12 ????/??/?? ??? -* Original Tandy distribution version -* -* 14 1998/10/12 Boisy G. Pitre -* Obtained from L2 Upgrade archive. - - nam ModPak - ttl Tandy RS-232/DCM Modem Pak driver - -* Disassembled 98/08/24 23:06:22 by Disasm v1.6 (C) 1988 by RML - - ifp1 - use defsfile - endc - -tylg set Drivr+Objct -atrv set ReEnt+rev -rev set $00 -edition set 14 - - mod eom,name,tylg,atrv,start,size - -u0000 rmb 1 -u0001 rmb 2 -u0003 rmb 1 -u0004 rmb 1 -u0005 rmb 1 -u0006 rmb 3 -u0009 rmb 2 -u000B rmb 1 -u000C rmb 1 -u000D rmb 1 -u000E rmb 1 -u000F rmb 1 -u0010 rmb 6 -u0016 rmb 1 -u0017 rmb 6 -u001D rmb 2 -u001F rmb 2 -u0021 rmb 2 -u0023 rmb 2 -u0025 rmb 2 -u0027 rmb 2 -u0029 rmb 2 -u002B rmb 2 -u002D rmb 1 -u002E rmb 1 -u002F rmb 1 -u0030 rmb 1 -u0031 rmb 1 -u0032 rmb 1 -u0033 rmb 1 -u0034 rmb 1 -u0035 rmb 1 -u0036 rmb 1 -u0037 rmb 1 -u0038 rmb 1 -u0039 rmb 1 -u003A rmb 1 -u003B rmb 2 -u003D rmb 1 -u003E rmb 1 -u003F rmb 5 -u0044 rmb 60 -u0080 rmb 20 -u0094 rmb 108 -size equ . - fcb $03 - -name fcs /MODPAK/ - fcb edition - -start equ * - lbra Init - lbra Read - lbra Write - lbra GetStat - lbra SetStat - lbra Term -L0027 fcb $00,$80,$0a - -* Init -* -* Entry: -* Y = address of device descriptor -* U = address of device memory area -* -* Exit: -* CC = carry set on error -* B = error code -* -Init pshs dp - lbsr L0330 - ldd <IT.COL,y - std <u0039 - ldd <IT.PAR,y - std <u0036 - clr <u0038 - lda <IT.XTYP,y - ldb <M$Opt,y - cmpb #$1C - bls L005D - sta <u0038 - anda #$0F - beq L005D - ldb #$BB - stb <u002F - clrb - pshs u - os9 F$SRqMem - tfr u,x - puls u - bcs L00C0 - bra L0068 -L005D ldb #$4F - stb <u002F - clra - ldb #$6C - leax >u0094,u -L0068 std <u0025 - stx <u0023 - leax d,x - stx <u0027 - subd #$0020 - std <u002B - clra - ldb #$20 - std <u0029 - ldx <u0001 - ldb #$0A - lda <u0038 - bita #$40 - beq L0086 - orb #$01 -L0086 stb $01,x - stb $02,x - ldd #$2040 - tst <u0038 - bpl L0093 - exg a,b -L0093 std <u003D - ldd <u0036 - lbsr L0271 - ldd <u0001 - addd #$0001 - leax >L0027,pcr - leay >L0337,pcr - os9 F$IRQ - bcs L00C0 - leay <u003F,u - lda #$80 - sta $04,y - ldd #$0001 - std $02,y - tfr d,x - os9 F$VIRQ - bcs L00C0 - clrb -L00C0 puls pc,dp -L00C2 bsr L0110 - bra L00CB - -* Read -* -* Entry: -* Y = address of path descriptor -* U = address of device memory area -* -* Exit: -* A = character read -* CC = carry set on error -* B = error code -* -Read pshs dp - lbsr L0330 -L00CB lda <u0031 - bita #$10 - beq L00E0 - ldx <u0021 - cmpx <u0029 - bhi L00E0 - lda #$A0 - ldb #$05 - lbsr L040D - sta <u0031 -L00E0 tst <u0033 - bne L015F - ldx <u001F - orcc #IntMasks - cmpx <u001D - beq L00C2 - lda ,x - leax $01,x - cmpx <u0027 - bcs L00F6 - ldx <u0023 -L00F6 stx <u001F - ldx <u0021 - leax -$01,x - stx <u0021 - ldb <u000E - lbeq L020F - clr <u000E - stb <$3A,y - andcc #^IntMasks - comb - ldb #E$Read - puls pc,dp - -L0110 pshs x,b,a - lda >D.Proc - sta <u0005 -L0117 ldx >D.Proc - lda P$State,x - ora #Suspend - sta P$State,x - andcc #^IntMasks - ldx #$0001 - os9 F$Sleep - orcc #IntMasks - ldx >D.Proc - lda <P$Signal,x - beq L013C - cmpa #C$INTR - bls L0158 - lda P$State,x - bita #Condem - bne L0158 -L013C lda <u0005 - bne L0117 - andcc #^IntMasks - clra - lda P$State,x - bita #Condem - bne L0158 - ldb #$DC - lda <u000E - bita #$20 - bne L0153 - puls pc,x,b,a - -L0153 inc <$3F,y - clr <u000E -L0158 andcc #^IntMasks - leas $06,s - coma - puls pc,dp -L015F comb - ldb #$F6 - puls pc,dp -L0164 bsr L0110 - bra L016D - -* Write -* -* Entry: -* A = character to write -* Y = address of path descriptor -* U = address of device memory area -* -* Exit: -* CC = carry set on error -* B = error code -* -Write pshs dp - lbsr L0330 -L016D leax <u0044,u - ldb <u002E - abx - sta ,x - incb - cmpb <u002F - bls L017B - clrb -L017B orcc #IntMasks - cmpb <u002D - beq L0164 - stb <u002E - lda <u0030 - beq L0192 - anda #$FD - sta <u0030 - bne L0192 - ldb #$05 - lbsr L040D -L0192 bra L020F - -* GetStat -* -* Entry: -* A = function code -* Y = address of path descriptor -* U = address of device memory area -* -* Exit: -* CC = carry set on error -* B = error code -* -GetStat pshs dp - lbsr L0330 - ldx PD.RGS,y - cmpa #SS.Ready - bne L01AD - ldd <u0021 - beq L015F - tsta - beq L01A8 - ldb #$FF -L01A8 stb R$B,x -L01AA clrb - puls pc,dp -L01AD cmpa #SS.EOF - beq L01AA - cmpa #SS.ScSiz - beq L01D6 - cmpa #SS.ComSt - beq L01D0 - cmpa #SS.CDSta - bne L0214 - lda <u0032 - clrb - bita <u003D - beq L01C6 - orb #$20 -L01C6 bita <u003E - beq L01CC - orb #$40 -L01CC stb $02,x - bra L01AA -L01D0 ldd <u0036 - std R$Y,x - bra L01AA -L01D6 clra - ldb <u0039 - std R$X,x - ldb <u003A - std R$Y,x - bra L01AA -L01E1 lda $05,y - ldb $05,x - orcc #IntMasks - std <u003B - bra L020F -L01EB leax <u003B,u -L01EE lda $05,y - cmpa ,x - bne L01AA - clr ,x - puls pc,dp - -* SetStat -* -* Entry: -* A = function code -* Y = address of path descriptor -* U = address of device memory area -* -* Exit: -* CC = carry set on error -* B = error code -* -SetStat pshs dp - lbsr L0330 - ldx PD.RGS,y - cmpa #SS.SSig - bne L0220 - lda PD.CPR,y - ldb R$X+1,x - orcc #IntMasks - ldx <u0021 - bne L0219 - std <u0033 -L020F clrb - andcc #^IntMasks - puls pc,dp -L0214 comb - ldb #E$UnkSvc - puls pc,dp -L0219 andcc #^IntMasks - os9 F$Send - bra L024D -L0220 cmpa #SS.HngUp - beq L025A - cmpa #SS.Relea - bne L022D - leax <u0033,u - bra L01EE -L022D cmpa #SS.CDSig - beq L01E1 - cmpa #SS.CDRel - beq L01EB - cmpa #SS.ComSt - beq L026B - cmpa #SS.Break - bne L0250 - ldx <u0001 - lda $02,x - pshs x,a - ora #$0C - sta $02,x - bsr L0291 - puls x,a - sta $02,x -L024D clrb -L024E puls pc,dp -L0250 cmpa #SS.Open - beq L0298 - cmpa #SS.Close - beq L02CF - bra L0214 -L025A lbsr L02DF - bcs L024E - bsr L0291 - bra L029E -L0263 fcb $13,$16,$17,$18,$1a,$1c,$1e,$1f -L026B ldd $06,x - bsr L0271 -L026F bra L024D -L0271 std <u0036 - andb #$E0 - pshs b - ldb <u0037 - andb #$0F - leax <L0263,pcr - ldb b,x - orb ,s+ - anda #$E0 - sta <u0006 - ldx <u0001 - lda $02,x - anda #$1F - ora <u0006 - std $02,x - rts -L0291 ldx #$0010 - os9 F$Sleep - rts -L0298 lda $07,x - cmpa #$01 - bne L024D -L029E ldb #$09 - orcc #IntMasks - lbsr L040D - lda ,x - lda ,x - lda $01,x - ldb $01,x - ldb $01,x - bmi L02CA - lda #$02 - sta <u0030 - clra - andb #$60 - std <u0031 - clrb - std <u002D - std <u0021 - std <u0033 - ldx <u0023 - stx <u001F - stx <u001D - lbra L020F -L02CA andcc #^IntMasks - lbra L015F -L02CF lda $07,x - bne L026F - bsr L02D7 - puls pc,dp -L02D7 ldb #$0B - lda <u0038 - bita #$40 - bne L02E0 -L02DF clrb -L02E0 bsr L02F0 - bcs L02E0 - bsr L02E8 - clrb - rts -L02E8 orcc #IntMasks - lbsr L040D - andcc #^IntMasks - rts -L02F0 pshs dp - bra L02F7 -L02F4 lbsr L0110 -L02F7 lda <u002E - orcc #IntMasks - cmpa <u002D - bne L02F4 - puls pc,dp - -* Term -* -* Entry: -* Y = address of device descriptor -* U = address of device memory area -* -* Exit: -* CC = carry set on error -* B = error code -* -Term pshs dp - bsr L0330 - ldx >D.Proc - lda P$ID,x - sta <u0004 - sta <u0003 - bsr L02D7 - ldx #$0000 - leay <u003F,u - os9 F$VIRQ - ldx #$0000 - os9 F$IRQ - ldd <u0025 - tsta - beq L032D - pshs u - ldu <u0023 - os9 F$SRtMem - puls u -L032D clrb - puls pc,dp -L0330 pshs u - puls dp - leas $01,s - rts - -L0337 pshs dp - bsr L0330 - ldx <u0001 - sta <u0035 - tfr a,b - andb #$60 - cmpb <u0032 - beq L0392 - tfr b,a - eorb <u0032 - sta <u0032 - lda <u0035 - bitb <u003D - beq L037F - tst <u003B - beq L0362 - pshs b,a - ldd <u003B - clr <u003B - os9 F$Send - puls b,a -L0362 bita <u003D - beq L037F - lda <u0036 - bita #$10 - beq L03B2 - ldx <u0016 - beq L0378 -L0370 inc <$3F,x - ldx <$3D,x - bne L0370 -L0378 lda #$20 - lbsr L0415 - bra L03E8 -L037F bitb <u003E - beq L03DC - ldb <u0036 - bitb #$01 - beq L03DC - bita <u003E - lbeq L041A - lbra L0428 -L0392 bita #$08 - bne L03FB - bita #$10 - beq L03DC - lda <u0031 - bpl L03B4 - ldb <u000F - bita #$20 - bne L03A8 - lda #$10 - ldb <u0010 -L03A8 stb ,x - anda #$10 - sta <u0031 - lda <u0030 - bne L03D6 -L03B2 bra L03DC -L03B4 ldb <u002D - cmpb <u002E - beq L03D0 - leax <u0044,u - abx - lda ,x - ldx <u0001 - incb - cmpb <u002F - bls L03C8 - clrb -L03C8 stb <u002D - sta ,x - cmpb <u002E - bne L03E8 -L03D0 lda <u0030 - ora #$02 - sta <u0030 -L03D6 ldb #$09 - bsr L040F - bra L03E8 -L03DC ldx <u0001 - puls dp - lda $01,x - lbmi L0337 - clrb - rts -L03E8 tst <u0005 - beq L03DC - lda <u0005 - clrb - stb <u0005 - tfr d,x - lda $0C,x - anda #$F7 - sta $0C,x - bra L03DC -L03FB bita #$07 - beq L0436 - tst ,x - anda #$07 - bsr L0415 - ldd $02,x - sta $01,x - std $02,x - bra L03DC -L040D ldx <u0001 -L040F orb <u0006 - stb $02,x - clrb - rts -L0415 ora <u000E - sta <u000E - rts -L041A lda <u0030 - anda #$FE - sta <u0030 - bne L03DC - ldb #$05 - bsr L040F - bra L03DC -L0428 lda <u0030 - bne L0430 - ldb #$09 - bsr L040F -L0430 ora #$01 - sta <u0030 -L0434 bra L03DC -L0436 lda ,x - beq L0454 - cmpa <u000B - beq L04A1 - cmpa <u000C - beq L04A5 - cmpa <u000D - beq L0499 - ldb <u0036 - bitb #$08 - beq L0454 - cmpa <u000F - beq L041A - cmpa <u0010 - beq L0428 -L0454 ldx <u001D - sta ,x - leax $01,x - cmpx <u0027 - bcs L0460 - ldx <u0023 -L0460 cmpx <u001F - bne L046B - lda #$04 - bsr L0415 -L0468 lbra L03E8 -L046B stx <u001D - ldx <u0021 - leax $01,x - stx <u0021 - cmpx <u002B - bcs L048C - tst <u0031 - bne L048C - bita #$04 - beq L048C - lda <u0010 - beq L048C - lda #$C0 - sta <u0031 - ldb #$05 - lbsr L040D -L048C tst <u0033 - beq L0468 - ldd <u0033 - clr <u0033 - os9 F$Send - bra L0434 -L0499 ldx <u0009 - beq L0454 - sta $08,x - bra L0454 -L04A1 ldb #$03 - bra L04A7 -L04A5 ldb #$02 -L04A7 pshs a - lda <u0003 - os9 F$Send - puls a - bra L0454 - - emod -eom equ * - end
--- a/level2/modules/sio.asm Mon Dec 15 15:02:46 2003 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,311 +0,0 @@ -******************************************************************** -* SIO - CoCo 3 Serial driver -* -* $Id$ -* -* Edt/Rev YYYY/MM/DD Modified by -* Comment -* ------------------------------------------------------------------ -* 9 ????/??/?? ??? -* Original Tandy L2 distribution version. -* -* 10 ????/??/?? ??? -* Added baud delay table for NitrOS-9. - - nam SIO - ttl CoCo 3 Serial driver - -* Disassembled 98/08/23 20:58:36 by Disasm v1.6 (C) 1988 by RML - - ifp1 - use defsfile - endc - -tylg set Drivr+Objct -atrv set ReEnt+rev -rev set $00 -edition set 9 - - mod eom,name,tylg,atrv,start,size - -u0000 rmb 29 -u001D rmb 1 -u001E rmb 1 -u001F rmb 1 -u0020 rmb 2 -u0022 rmb 2 -u0024 rmb 1 -u0025 rmb 1 -size equ . - - fcb READ.+WRITE. - -name fcs /SIO/ - fcb edition - -* Baud Rate Delay Table -DelayTbl - IFEQ H6309 -* 6809 delay values (1.89MHz) - fdb $090C 110 baud - fdb $034C 300 baud - fdb $01A2 600 baud - fdb $00CE 1200 baud - fdb $0062 2400 baud - fdb $002E 4800 baud - fdb $0012 9600 baud - fdb $0003 32000 baud - ELSE -* 6309 native mode delay values (1.89MHz) - fdb $090C 110 baud (Unchanged, unknown) - fdb $03D0 300 baud - fdb $01A2 600 baud (Unchanged, unknown) - fdb $00F0 1200 baud - fdb $0073 2400 baud - fdb $0036 4800 baud - fdb $0017 9600 baud - fdb $0003 32000 baud (Unchanged, unknown) - ENDC - -start lbra Init - lbra Read - lbra Write - lbra GetStat - lbra SetStat - lbra Term - -* Init -* -* Entry: -* Y = address of device descriptor -* U = address of device memory area -* -* Exit: -* CC = carry set on error -* B = error code -* -Init pshs cc - orcc #IntMasks - ldx #PIA1Base - clr $01,x - ldd <IT.COL,y get col/row bytes - std <u0024,u - lda #$FE - sta ,x - lda #$36 - sta $01,x - lda ,x - ldd <IT.PAR,y get parity/baud - lbsr L0148 - puls cc - clrb - -* Term -* -* Entry: -* U = address of device memory area -* -* Exit: -* CC = carry set on error -* B = error code -* -Term rts - -* Read -* -* Entry: -* Y = address of path descriptor -* U = address of device memory area -* -* Exit: -* A = character read -* CC = carry set on error -* B = error code -* -Read bsr L00AC - bcs L00C8 - ldb #$08 - pshs b,cc - tst <u001E,u - beq L0066 - dec $01,s -L0066 bra L0077 -L0068 lda <PD.BAU,y - anda #$0F - cmpa #$07 - beq L0077 - ldx #$0001 - os9 F$Sleep -L0077 pshs y - ldy #$FFFF -L007D lda >PIA1Base+2 - leay -$01,y - beq L008B - lsra - bcs L007D - puls y - bra L0090 -L008B puls y - lsra - bcs L0068 -L0090 orcc #IntMasks - clra - bsr L00D5 -L0095 bsr L00CE - ldb >PIA1Base+2 - lsrb - rora - dec $01,s - bne L0095 - bsr L00D5 - tst <u001E,u - beq L00A8 - lsra -L00A8 puls b,cc - clrb - rts -L00AC pshs a - lda <PD.BAU,y - anda #$0F - cmpa #$08 - bcc L00C4 - lsla - leax >DelayTbl,pcr - ldd a,x - std <u0020,u - clrb - puls pc,a -L00C4 ldb #E$BMode - puls a -L00C8 orcc #Carry - rts -L00CB stb >PIA1Base -L00CE pshs b,a - ldd <u0020,u - bra L00DC -L00D5 pshs b,a - ldd <u0020,u - lsra - rorb -L00DC subd #$0001 - bne L00DC - puls pc,b,a - -* Write -* -* Entry: -* A = character to write -* Y = address of path descriptor -* U = address of device memory area -* -* Exit: -* CC = carry set on error -* B = error code -* -Write bsr L00AC - bcs L00C8 - ldb #$09 - pshs b,cc - orcc #IntMasks - tst <u001E,u - beq L00F4 - dec $01,s -L00F4 andcc #^Carry -L00F6 ldb #$02 - bcs L00FB - clrb -L00FB bsr L00CB - lsra - dec $01,s - bne L00F6 - ldb <u001D,u - beq L010B - andb #$FE - bsr L00CB -L010B ldb #$02 - bsr L00CB - tst <u001F,u - beq L0118 - ldb #$02 - bsr L00CB -L0118 puls pc,b,cc - -* GetStat -* -* Entry: -* A = function code -* Y = address of path descriptor -* U = address of device memory area -* -* Exit: -* CC = carry set on error -* B = error code -* -GetStat cmpa #SS.EOF - bne L0120 -L011E clrb - rts -L0120 ldx PD.RGS,y - cmpa #SS.ScSiz - beq L0131 - cmpa #SS.ComSt - bne L017E - ldd <u0022,u - std R$Y,x - bra L011E -L0131 ldx PD.RGS,y - clra - ldb <u0024,u - std R$X,x - ldb <u0025,u - std R$Y,x - bra L011E - -* SetStat -* -* Entry: -* A = function code -* Y = address of path descriptor -* U = address of device memory area -* -* Exit: -* CC = carry set on error -* B = error code -* -SetStat cmpa #SS.ComSt - bne L017E - ldx PD.RGS,y - ldd R$Y,x -L0148 std <u0022,u - clra - clrb - std <u001D,u - sta <u001F,u - ldd <u0022,u - tstb - bpl L015C - inc <u001F,u -L015C bitb #$40 - bne L017A - bitb #$20 - beq L0167 - inc <u001E,u -L0167 bita #$20 - beq L0179 - bita #$80 - beq L017A - inc <u001D,u - bita #$40 - bne L0179 - inc <u001D,u -L0179 rts -L017A comb - ldb #E$BMode - rts -L017E comb - ldb #E$UnkSvc - rts - - emod -eom equ * - end
--- a/level2/modules/t1.asm Mon Dec 15 15:02:46 2003 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -******************************************************************** -* T1 - CoCo serial device descriptor -* -* $Id$ -* -* Edt/Rev YYYY/MM/DD Modified by -* Comment -* ------------------------------------------------------------------ - - nam T1 - ttl CoCo serial device descriptor - -* Disassembled 98/08/23 21:16:45 by Disasm v1.6 (C) 1988 by RML - - ifp1 - use defsfile - endc - -tylg set Devic+Objct -atrv set ReEnt+rev -rev set $00 - - mod eom,name,tylg,atrv,mgrnam,drvnam - - fcb READ.+WRITE. mode byte - fcb $07 extended controller address - fdb $FF20 physical controller address - fcb initsize-*-1 initilization table size - fcb DT.SCF device type:0=scf,1=rbf,2=pipe,3=scf - fcb $00 case:0=up&lower,1=upper only - fcb $01 backspace:0=bsp,1=bsp then sp & bsp - fcb $00 delete:0=bsp over line,1=return - fcb $01 echo:0=no echo - fcb $01 auto line feed:0=off - fcb $00 end of line null count - fcb $01 pause:0=no end of page pause - fcb 24 lines per page - fcb C$BSP backspace character - fcb C$DEL delete line character - fcb C$CR end of record character - fcb C$EOF end of file character - fcb C$RPRT reprint line character - fcb C$RPET duplicate last line character - fcb C$PAUS pause character - fcb C$INTR interrupt character - fcb C$QUIT quit character - fcb C$BSP backspace echo character - fcb C$BELL line overflow character (bell) - fcb WORD8+PARNONE+STOP1 init value for dev ctl reg - fcb B2400 baud rate - fdb name copy of descriptor name address - fcb $00 acia xon char - fcb $00 acia xoff char - fcb 80 (szx) number of columns for display - fcb 24 (szy) number of rows for display -initsize equ * - -name fcs /t1/ -mgrnam fcs /SCF/ -drvnam fcs /sio/ - - emod -eom equ * - end -