More BASIC fixes

This commit is contained in:
burniouf 2022-03-15 20:33:19 +01:00
parent 14ef9a85fe
commit 38cbd00f7e
9 changed files with 263 additions and 234 deletions

Binary file not shown.

View File

@ -106,17 +106,29 @@ BS.SetCSWKSW2VDOS
rts
*--------------------------------------
BS.IO.IN bit GP.EXECACTV
bpl L9AC5
bpl .1
jsr BS.SaveAXY
jmp BS.IO.IN.EXEC
L9AC5 jsr BS.ResetCSWKSW
.1 jsr BS.ResetCSWKSW
jsr MON.KEYIN0
cmp #$8D
beq .5
cmp #$FF
bne L9AEB
jsr BS.SaveAXY
lda #$88
jsr MON.COUT
lda #$A0
jsr MON.COUT
lda #$88
bra L9AEB
.5 jsr BS.SaveAXY
sta IO.LINEBUF,x
BS.CheckDOSCMD jsr BS.DOSCMD
@ -131,8 +143,9 @@ BS.CheckDOSCMD jsr BS.DOSCMD
beq L9AEB
L9AE8 jsr BS.RestoreAXY
L9AEB jmp BS.SaveCSWKSW
L9AEB jmp BS.SaveCSWKSW
*--------------------------------------
BS.NODEVERR lda #$03
BS.ERROUT sta GP.ERRCODE
@ -148,8 +161,7 @@ BS.ERROUT sta GP.ERRCODE
stz GP.PFXACTV
stz GP.MLICF.REFNUM
lda #MLI.C.CLOSE
jsr GP.GOSYSTEM
jsr BS.MLIClose
bcs L9B27
jsr LA004
@ -191,7 +203,7 @@ L9B4D ldx AS.REMSTK
L9B53 lda #$03
jmp AS.BITERRFLG
*--------------------------------------
L9B58 stz AS.ERRNUM
lda #$A3
sta X9F65
@ -201,7 +213,7 @@ L9B58 stz AS.ERRNUM
jsr BS.SetState0
jsr BS.RestoreAXY
jmp BS.IO.IN
*--------------------------------------
BS.IO.IN0 jsr BS.SaveAXY
bit GP.PFXACTV
bpl L9B7E
@ -236,7 +248,7 @@ L9B94 lda GP.PREGA
L9BAA lda #$88
L9BAC jmp BS.SaveCSWKSW
*--------------------------------------
BS.IO.IN.EXEC sta (ZP.BASL),y
lda ZP.PROMPT
cmp #$BE
@ -298,7 +310,7 @@ L9C0E lda (ZP.BASL),y
jmp (ZP.KSW)
L9C13 jmp BS.ERROUT
*--------------------------------------
BS.IO.IN.FILE lda ZP.PROMPT
cmp #$DD
bne L9C1F
@ -331,7 +343,7 @@ L9C42 jsr BS.ReadOneByte
bcs L9C13
rts
*--------------------------------------
BS.ReadOneByte lda GP.MLIRW.COUNT
sta GP.ParamL
lda #$01
@ -346,7 +358,7 @@ BS.ReadOneByte lda GP.MLIRW.COUNT
lda IO.LINEBUF,x
L9C66 rts
*--------------------------------------
L9C67 lda GP.PREGA
sta (ZP.BASL),y
@ -488,7 +500,7 @@ L9D5D dec GP.CATFLAG
L9D65 jsr LA4D2
jmp L9CF5
*--------------------------------------
BS.IO.IN.CAT cmp #$DD
bne L9D72
@ -508,7 +520,7 @@ L9D7F lda BS.CMDBUF.LEN,x
ldx BS.CMDBUF.LEN
lda #$8D
rts
*--------------------------------------
BS.Setup4readEFBytesAt200
lda XBBFE
sta GP.MLIRW.REFNUM
@ -520,16 +532,16 @@ BS.Setup4readEFBytesAt200
stz GP.MLIRW.COUNT+1
stz GP.MLIRW.DATAPTR
rts
*--------------------------------------
BS.VSYSO jsr BS.SaveAXY
cmp #$84
bne L9DC5
jsr BS.WriteTBUF
sta GP.INPTR
sta GP.IFILACTV
sta GP.OFILACTV
sta GP.PFXACTV
stz GP.INPTR
stz GP.IFILACTV
stz GP.OFILACTV
stz GP.PFXACTV
ldx #$08
jsr BS.SetState
jmp BS.RestoreAXY
@ -538,7 +550,7 @@ L9DC5 ldx #$04
jsr BS.SetState
jsr BS.RestoreAXY
jmp BS.JMP.GP.VSYSO
*--------------------------------------
BS.IO.OUT.CAT jsr BS.SaveAXY
ldx GP.INPTR
sta IO.LINEBUF,x
@ -596,7 +608,7 @@ L9E15 ldy GP.TBUFPTR
jsr BS.RestoreAXY
L9E2F rts
*--------------------------------------
BS.IO.OUT.TRACE pha
stx GP.PREGX
tsx
@ -719,35 +731,36 @@ L9EF2 jmp AS.EXECSTMT
L9EF5 sta ZP.PROMPT
tay
lda BS.BYTES-$80,y
lda BS.AS.KW-$80,y
bmi L9EF2
sta X9F00+1
X9F00 bne L9F02 SELF MODIFIED
L9F02 sta ZP.PROMPT
X9F00 bne BS.AS.KW0 SELF MODIFIED
BS.AS.KW0
BS.AS.KW.IF
BS.AS.KW.PRINT
sta ZP.PROMPT
sta GP.CHRLAST
lda BS.VSYSO.LO
lda #BS.VSYSO
sta GP.VSYSO
lda BS.VSYSO.HI
lda /BS.VSYSO
sta GP.VSYSO+1
bne L9F32
lda #$01
BS.AS.KW.LIST lda #$01
.HS 2C BIT ABS
BS.AS.KW.CALL lda #$02
sta ZP.PROMPT
bne L9F32
lda #$02
sta ZP.PROMPT
bne L9F32
tya
BS.AS.KW.LET tya
jmp L9ED2
sty GP.DTRACE
BS.AS.KW.TRACE sty GP.DTRACE
bne L9F2E
BS.AS.KW.NOTRACE
sta GP.DTRACE
dey
@ -757,13 +770,9 @@ L9F2E lda #$4A
L9F32 tya
jmp AS.EXECSTMT
brk
* UNREACHABLE CODE ????
* lda #$00
* sta AS.ERRNUM
* tya
* bne L9EF0
BS.AS.KW.RESUME stz AS.ERRNUM
tya
bne L9EF0
L9F3D jsr BS.ResetCSWKSW
lda #$A3
@ -776,30 +785,29 @@ L9F3D jsr BS.ResetCSWKSW
jsr BS.SaveCSWKSW
sec
jmp L9ECA
BS.AS.KW.FLASH
lda #$E3
bne L9F5E
BS.AS.KW.NORMAL
BS.AS.KW.INVERSE
lda #$A3
L9F5E sta X9F65
tya
bne L9EF0
brk
X9F65 .DA #$A3
*--------------------------------------
BS.SaveAXY sta GP.PREGA
stx GP.PREGX
sty GP.PREGY
rts
*--------------------------------------
BS.RestoreAXY lda GP.PREGA
ldx GP.PREGX
ldy GP.PREGY
rts
*--------------------------------------
BS.SetState stx GP.STATE
ldy #$00
@ -811,7 +819,7 @@ BS.SetState stx GP.STATE
bne .1
rts
*--------------------------------------
BS.PRINTERR tay
ldx BS.ERRCODES-1,y
@ -853,7 +861,7 @@ L9FC4 tay
bne L9FBA
L9FD5 rts
*--------------------------------------
L9FD6 lda BS.TBL7,x
bcs L9FED
@ -879,7 +887,7 @@ L9FED inx
*--------------------------------------
BS.WriteTBUF256 lda #$00
ldy #$01
bne LA00B
bne BS.WriteTBUFAY
BS.WriteTBUF jsr LA004
bcc LA020
@ -889,12 +897,12 @@ BS.WriteTBUF jsr LA004
pla
tya
jmp BS.ERROUT
*--------------------------------------
LA004 ldy #$00
lda GP.TBUFPTR
beq LA01F
LA00B sta GP.MLIRW.COUNT
BS.WriteTBUFAY sta GP.MLIRW.COUNT
sty GP.MLIRW.COUNT+1
lda #MLI.C.WRITE
jsr GP.GOSYSTEM
@ -905,7 +913,7 @@ LA00B sta GP.MLIRW.COUNT
LA01F clc
LA020 rts
*--------------------------------------
LA021 jsr BS.KW.01
bcs LA047

View File

@ -5,6 +5,7 @@ BS.WHICHBITS .HS 8040201008040201
BS.GETBUFR jsr LA1FB
bcs LA304
pha
sbc #$03
sta XBBB8
@ -120,7 +121,7 @@ LA376 cpy XBBED
bne LA376
LA382 rts
*--------------------------------------
LA383 ldy XBBED
XA386 beq LA38F SELF MODIFIED
@ -133,7 +134,7 @@ LA38F cpy XBBEE
dec XBBEE
jmp LA388
*--------------------------------------
LA39A dey
lda (ZP.PCL),y
sta (ZP.A1L),y
@ -141,7 +142,7 @@ LA39A dey
bne LA39A
LA3A2 rts
*--------------------------------------
LA3A3 lda AS.VARSTART+1
sta ZP.A2H
lda AS.VARSTART
@ -823,8 +824,7 @@ LA7ED lda GP.FoundBITS+1
stz BS.CMDBUF
lda #$01
ora GP.FoundBITS
sta GP.FoundBITS
tsb GP.FoundBITS
LA806 jsr BS.GetVolAtSxDy
bcs LA849
@ -993,8 +993,7 @@ LA90A lda #$04
and GP.AllowedBITS
beq LA931
ora GP.FoundBITS
sta GP.FoundBITS
tsb GP.FoundBITS
stz XBC08
@ -1031,8 +1030,7 @@ LA935 lda BS.KW.OPT.PBITSLO,y
sta GP.ParamD
lda #$04
LA94F ora GP.FoundBITS+1
sta GP.FoundBITS+1
LA94F tsb GP.FoundBITS+1
LA955 lda BS.KW.OPT.PBITSHI,y
and #$03
@ -1327,7 +1325,7 @@ BS.IsIntCmd ldx #$1F
LAB03 ldy #$08
sty GP.XLEN
LAB08 lda BS.KW.LEN,x
LAB08 lda BS.KW.LEN-1,x
bpl LAB13
and #$7F
@ -1383,8 +1381,10 @@ BS.KW.APPEND lda GP.FITYPE
LAB63 cmp #$FF
beq LAB6F
cmp #$B3
beq LAB6F
lda #$0D
sec
rts
@ -1517,7 +1517,7 @@ LAC5E lda #$0E
jsr BS.ReadXYBytes
bcs LAC33
jsr BS.FileClose
jsr BS.MLIClose
bcs LAC33
jsr LAC80
@ -1626,7 +1626,7 @@ LACFE lda #$02
jsr GP.GOSYSTEM
bcs LAD47
jsr BS.FileClose
jsr BS.MLIClose
bcs LAD47
lda AS.PGRMSTART+1
@ -1646,7 +1646,7 @@ LAD48 stx GP.FIAUXTYPE
*--------------------------------------
BS.KW.CREATE stz GP.CRAUXTYPE
stz GP.CRAUXTYPE+1
>DEBUG
lda GP.FoundBITS
and #CMDBITS0.T
bne BS.CreateFileOrDir
@ -1677,7 +1677,7 @@ LAD82 stx GP.CRACCESS
LAD8D lda #$0C
rts
*--------------------------------------
BS.KW.RENAME lda GP.FoundBITS
lsr
lsr
@ -1685,24 +1685,24 @@ BS.KW.RENAME lda GP.FoundBITS
bcs LAD9E
jmp BS.ERR10
*--------------------------------------
BS.KW.DELETE lda #MLI.C.DESTROY
LAD9E jmp GP.GOSYSTEM
*--------------------------------------
BS.KW.LOCK jsr BS.GetFileInfo
lda GP.FIACCESS
and #$3C
ora #$01
sta GP.FIACCESS
jmp BS.SetFileInfo
bra BS.KW.UNLOCK1
*--------------------------------------
BS.KW.UNLOCK jsr BS.GetFileInfo
lda #$C3
ora GP.FIACCESS
sta GP.FIACCESS
jmp BS.SetFileInfo
BS.KW.UNLOCK1 sta GP.FIACCESS
jmp BS.SetFileInfo
*--------------------------------------
BS.KW.PREFIX lda GP.FoundBITS+1
and #$04
sec
@ -1711,7 +1711,7 @@ BS.KW.PREFIX lda GP.FoundBITS+1
lda GP.FoundBITS
lsr
LADCB lda #$C6
LADCB lda #MLI.C.SETPREFIX
bcs LAD9E
lda ZP.PROMPT
@ -1734,8 +1734,8 @@ LADE8 jsr BS.CROUT
clc
rts
LADF0 lda #$FF
sta GP.PFXACTV
LADF0 sec
ror GP.PFXACTV
clc
rts
*--------------------------------------

View File

@ -35,7 +35,7 @@ LAE31 lda #$06
LAE33 sec
rts
*--------------------------------------
BS.KW.BRUN jsr BS.KW.BLOAD
bcs LAE33
@ -44,7 +44,7 @@ BS.KW.BRUN jsr BS.KW.BLOAD
rts
LAE3F jmp (GP.MLIRW.DATAPTR)
*--------------------------------------
BS.KW.BLOAD lda #$01
LAE44 ldx #$06
jsr BS.CheckFTypeXAccessA
@ -152,7 +152,7 @@ LAEDD lda #MLI.C.SETMARK
rts
LAEF7 ldx GP.XCNUM
lda #$CA
lda #MLI.C.READ
cpx #$0F
bne LAF24
@ -182,11 +182,11 @@ LAF24 jsr GP.GOSYSTEM
jsr BS.SetFileInfoNoDate
LAF35 jmp BS.FileClose
LAF35 jmp BS.MLIClose
LAF38 sec
rts
*--------------------------------------
BS.KW.SAVE bcc LAF4E
lda #$FD
@ -230,7 +230,7 @@ LAF4E jsr LA411
jsr BS.SetFileInfoNoDate
bcs LAF95
jsr BS.FileClose
jsr BS.MLIClose
LAF95 php
pha
@ -238,7 +238,7 @@ LAF95 php
pla
plp
LAF9C rts
*--------------------------------------
BS.SetupRW5AtBBE4
lda #$E4
sta GP.MLIRW.DATAPTR
@ -247,7 +247,7 @@ BS.SetupRW5AtBBE4
ldy #$00
ldx #$05
rts
*--------------------------------------
BS.KW.LOAD ldx #$FD
lda #$01
jsr BS.CheckFTypeXAccessA
@ -281,29 +281,28 @@ BS.KW.LOAD ldx #$FD
jsr BS.ReadXYBytes
bcs LAF9C
jsr BS.FileClose
jsr BS.MLIClose
jmp LAF95
LAFF3 lda #$0E
sec
rts
BS.FileClose lda #MLI.C.CLOSE
bne LB007
*--------------------------------------
BS.ReadXYBytes lda #MLI.C.READ
bne LB001
.HS 2C BIT ABS
BS.WriteXYBytes lda #MLI.C.WRITE
LB001 sty GP.MLIRW.COUNT+1
sty GP.MLIRW.COUNT+1
stx GP.MLIRW.COUNT
LB007 jmp GP.GOSYSTEM
.HS 2C BIT ABS
BS.MLIClose lda #MLI.C.CLOSE
jmp GP.GOSYSTEM
*--------------------------------------
BS.KW.IN lda #$00
sta BS.GetCharSep
beq LB018
*--------------------------------------
BS.KW.PR lda #$02
sta BS.GetCharSep
lda #$08
@ -341,7 +340,7 @@ LB04A jsr LB05C
lda GP.ParamA
sta GP.OUTVECT0,x
LB05B rts
*--------------------------------------
LB05C lda GP.ParamA
sta ZP.PCL
lda GP.ParamA+1
@ -447,7 +446,7 @@ LB0FD lda IO.KBD
LB10E lda #$FF
bne LB0E8
LB113 jsr BS.FileClose
LB113 jsr BS.MLIClose
bcs LB127
jsr BS.CROUT
@ -488,10 +487,7 @@ LB142 lda DIRENTBUF,y
rts
LB157 ldx #BS.CMDBUF
* sta GP.SBUFADR
ldy /BS.CMDBUF
* sta GP.SBUFADR+1
jsr BS.SetSBUFADRXY
lda MLI.DEVNUM
@ -649,16 +645,18 @@ LB268 adc #$04
lda DIRENTBUF
and #$F0
beq LB241
* BUG on DEC word
dec XBC14
bne LB28D
lda XBC14
bne .1
dec XBC15
.1 dec XBC14
LB28D rts
BS.JMP.XTRNADDR jmp (GP.XTRNADDR)
*--------------------------------------
BS.KW.EXEC jsr BS.CheckFilename
bcs LB2C0
@ -716,6 +714,7 @@ LB2D5 jsr LA1F9
asl
adc XBBE3
pha
LB2F2 cmp XBBEE,x
beq LB2FB
@ -780,7 +779,7 @@ LB364 lda #$FF
sta GP.EXECACTV
clc
rts
*--------------------------------------
LB36B lda GP.EXECACTV
bpl LB37B
@ -1060,8 +1059,7 @@ LB515 sta GP.MLICF.REFNUM
LB53F stz MLI.LEVEL
lda #MLI.C.CLOSE
jsr GP.GOSYSTEM
jsr BS.MLIClose
bcs LB572
jsr LA250
@ -1090,9 +1088,8 @@ LB573 stz GP.MLICF.REFNUM
lda #$07
sta MLI.LEVEL
lda #MLI.C.CLOSE
jmp GP.GOSYSTEM
jmp BS.MLIClose
*--------------------------------------
BS.KW.CLOSE jsr BS.CheckFilename
bcs LB5EF
@ -1100,7 +1097,7 @@ BS.KW.CLOSE jsr BS.CheckFilename
sta GP.NEWLREF
bit GP.DIRFLG
bmi LB5F0
*--------------------------------------
LB592 lda GP.FoundBITS+1
and #$03
beq LB5ED
@ -1150,7 +1147,7 @@ LB5CB lda GP.ParamF
LB5ED lda #$0B
LB5EF sec
LB5F0 rts
*--------------------------------------
LB5F1 lda XBBFF
sta BS.TMPBUF4
lda XBC00
@ -1197,7 +1194,7 @@ LB62F rol BS.TMPBUF4,x
LB642 lda #$02
sec
rts
*--------------------------------------
BS.KW.X04 jsr BS.CheckFilename
bcs LB69B
@ -1270,7 +1267,7 @@ LB6CB lda #$02
tax
sec
rts
*--------------------------------------
LB6D0 lda GP.FoundBITS+1
and #$43
beq LB719
@ -1318,7 +1315,7 @@ LB712 lda #MLI.C.SETMARK
LB719 clc
LB71A ldx #$00
rts
*--------------------------------------
BS.KW.X08 jsr BS.CheckFilename
bcs LB732
@ -1360,7 +1357,7 @@ LB757 lda AS.HIMEM
sta GP.OFILACTV
clc
rts
*--------------------------------------
BS.KW.X09 php
jsr BS.CheckFilename
bcc LB77A
@ -1394,6 +1391,7 @@ LB78A ldx GP.ParamL
ldx GP.FIAUXTYPE
ldy GP.FIAUXTYPE+1
LB79D txa
pha
jsr BS.GetFTableIdx
@ -1418,7 +1416,7 @@ LB7C8 jsr LB7D0
bcs LB788
LB7CD jmp LB74B
*--------------------------------------
LB7D0 ldx #$03
LB7D2 lda GP.MLIMRKEOFBUF.REFNUM,x
sta XBC09,x
@ -1472,7 +1470,7 @@ LB805 dey
lda #$02
LB839 rts
*--------------------------------------
BS.GetFileInfo lda #$0A
sta GP.SSGINFO
lda #MLI.C.GETFILEINFO

View File

@ -12,29 +12,30 @@ BS.SYSIOVECTS .DA BS.IO.OUT
.DA BS.IO.IN0
.DA BS.IO.OUT.CAT
.DA BS.IO.IN0
BS.VSYSO.LO .DA #BS.VSYSO
BS.VSYSO.HI .DA /BS.VSYSO
BS.ParamLByte .DA #$A0
.DA #$AC
.DA #$AF
.DA #$B4
.DA #$B4
.DA #$C6
.DA #$AC
.DA #$AC
.DA #$CB
.DA #$D1
.DA #$D5
.DA #$D5
.DA #$DD
.DA #$DD
.DA #$C6
.DA #$C6
.DA #$C6
.DA #$C6
.DA #$C6
.DA #$C6
BS.BYTES .DA #$80
.DA BS.VSYSO
*--------------------------------------
BS.ParamLByte .DA #GP.SCREATE
.DA #GP.SDSTROY
.DA #GP.SRECNAME
.DA #GP.SSGINFO
.DA #GP.SSGINFO
.DA #GP.MLIMRKEOFBUF
.DA #GP.SDSTROY
.DA #GP.SDSTROY
.DA #GP.SOPEN
.DA #GP.SNEWLIN
.DA #GP.MLIRW
.DA #GP.MLIRW
.DA #GP.MLICF
.DA #GP.MLICF
.DA #GP.MLIMRKEOFBUF
.DA #GP.MLIMRKEOFBUF
.DA #GP.MLIMRKEOFBUF
.DA #GP.MLIMRKEOFBUF
.DA #GP.MLIMRKEOFBUF
.DA #GP.MLIMRKEOFBUF
*--------------------------------------
BS.AS.KW .DA #$80
.DA #$81
.DA #$82
.DA #$83
@ -46,7 +47,7 @@ BS.BYTES .DA #$80
.DA #$89
.DA #$8A
.DA #$8B
.DA #$19
.DA #BS.AS.KW.CALL-BS.AS.KW0
.DA #$8D
.DA #$8E
.DA #$8F
@ -61,25 +62,25 @@ BS.BYTES .DA #$80
.DA #$98
.DA #$99
.DA #$9A
.DA #$23
.DA #$28
.DA #$5A
.DA #$5A
.DA #$56
.DA #BS.AS.KW.TRACE-BS.AS.KW0
.DA #BS.AS.KW.NOTRACE-BS.AS.KW0
.DA #BS.AS.KW.NORMAL-BS.AS.KW0
.DA #BS.AS.KW.INVERSE-BS.AS.KW0
.DA #BS.AS.KW.FLASH-BS.AS.KW0
.DA #$A0
.DA #$A1
.DA #$A2
.DA #$A3
.DA #$A4
.DA #$A5
.DA #$34
.DA #BS.AS.KW.RESUME-BS.AS.KW0
.DA #$A7
.DA #$A8
.DA #$A9
.DA #$1F
.DA #BS.AS.KW.LET-BS.AS.KW0
.DA #$AB
.DA #$AC
.DA #$00
.DA #BS.AS.KW.IF-BS.AS.KW0
.DA #$AE
.DA #$AF
.DA #$B0
@ -92,13 +93,14 @@ BS.BYTES .DA #$80
.DA #$B7
.DA #$B8
.DA #$B9
.DA #$00
.DA #BS.AS.KW.PRINT-BS.AS.KW0
.DA #$BB
.DA #$13
.DA #BS.AS.KW.LIST-BS.AS.KW0
.DA #$BD
.DA #$BE
BS.KW.LEN .DA #$BF
.DA #$47
.DA #$BF
*--------------------------------------
BS.KW.LEN .DA #$47
.DA #$5F
.DA #$18
.DA #$30
@ -129,7 +131,9 @@ BS.KW.LEN .DA #$BF
.DA #$1C
.DA #$B5
.DA #$D8
*--------------------------------------
BS.KW.TABLE .AS "BSAVERIFYBLOADELETEBYECATALOGOPENWRITEXECREATEFRESTORENAMEBRUNLOCKCHAIN#FLUSHREADPOSITIONOMONPR#PREFIXCLOSEAPPEND"
*--------------------------------------
BS.KW.JMP .DA BS.JMP.XTRNADDR $00
.DA BS.KW.PR
.DA BS.KW.IN
@ -163,6 +167,7 @@ BS.KW.JMP .DA BS.JMP.XTRNADDR $00
.DA BS.KW.LOAD
.DA BS.KW.CLOSE
.DA BS.KW.APPEND $40
*--------------------------------------
BS.KW.PBITS .DA $8040
.DA $8040
.DA $0495
@ -587,15 +592,19 @@ BS.TBL7 .DA #$2A
XBBB5 .BS 2
XBBB7 .BS 1
XBBB8 .BS 1
BS.IsIntCmdMTR ldy #$02
LBBBB lda BS.CMDBUF,y
cmp BS.MTR,y
bne LBBCF
dey
bpl LBBBB
jsr BS.SetState0
jsr MON.CLREOL
jmp MON.ENTERMON
LBBCF jmp BS.IsIntCmd
BS.MTR .AS "MTR"

View File

@ -100,6 +100,7 @@ LBE97 lda BS.BIERRTBL,x
GP.RTS rts
*--------------------------------------
GP.CISPARE1 .BS 1
*--------------------------------------
GP.SCREATE .DA #7
GP.SCREATEPATH .DA BS.CMDBUF.LEN
GP.CRACCESS .DA #$C3
@ -107,11 +108,14 @@ GP.CRTYPE .BS 1
GP.CRAUXTYPE .BS 2
GP.CRSTTYPE .BS 1
GP.DATETIME .BS 4
*--------------------------------------
GP.SDSTROY .DA #1
GP.SDSTROYPATH .DA BS.CMDBUF.LEN
*--------------------------------------
GP.SRECNAME .DA #2
GP.SRECNAMEOLD .DA BS.CMDBUF.LEN
GP.SRECNAMENEW .DA MLI.PATHBUF
*--------------------------------------
GP.SSGINFO .BS 1
GP.SSGINFOPATH .DA BS.CMDBUF.LEN
GP.FIACCESS .BS 1
@ -123,27 +127,33 @@ GP.FIMDATE .BS 2
GP.FICDATE .BS 2
.BS 4
*--------------------------------------
GP.MLIMRKEOFBUF .DA #2
GP.MLIMRKEOFBUF.REFNUM
.BS 1
GP.SBUFADR .BS 3
*--------------------------------------
GP.SOPEN .DA #3
GP.TXTBUF .DA BS.CMDBUF.LEN
GP.OSYSBUF .BS 2
GP.OREFNUM .BS 1
*--------------------------------------
GP.SNEWLIN .DA #3
GP.NEWLREF .BS 1
GP.NLINEMASK .DA #$7F
GP.NLINECHAR .DA #13
*--------------------------------------
GP.MLIRW .DA #4
GP.MLIRW.REFNUM .BS 1
GP.MLIRW.DATAPTR .BS 2
GP.MLIRW.COUNT .BS 2
GP.MLIRW.TRANS .BS 2
*--------------------------------------
GP.MLICF .DA #1
GP.MLICF.REFNUM .BS 1
*--------------------------------------
GP.CCCSPARE .BS 1
*--------------------------------------
GP.COPYRIGHT .AS -"COPYRIGHT APPLE, 1983"
GP.GETBUFR jmp BS.GETBUFR
GP.FREEBUFR jmp BS.FREEBUFR

View File

@ -26,12 +26,12 @@ LDR.START1 lda #$9A
jsr MON.SETNORM
jsr MON.INIT
jsr MON.MON
ldx #$17
lda #$00
L2076 sta MLI.MEMTABL,x
ldx #$17
.1 stz MLI.MEMTABL,x
dex
bne L2076
bne .1
lda #$CF
sta MLI.MEMTABL
@ -45,33 +45,33 @@ L2076 sta MLI.MEMTABL,x
sta MLI.MEMTABL+23
lda AS.COLDBOOT
cmp #$4C
bne L20B1
bne .3
lda MLI.MACHID
and #$20
beq L20B1
beq .3
ldx #$03
L20A6 lda LDR.CSWVECT,x
.2 lda LDR.CSWVECT,x
sta ZP.CSW,x
dex
bpl L20A6
bpl .2
jmp AS.COLDBOOT
L20B1 ldx #$27
.3 ldx #$27
L20B3 lda LDR.UNABLE,x
.4 lda LDR.UNABLE,x
sta $628,x
dex
bpl L20B3
bpl .4
sta MON.POWERUPBYTE
sta MON.POWERUP+1
L20C2 bmi L20C2
bmi *
*--------------------------------------
LDR.MoveXpages dey
lda (Ptr1),y
sta (Ptr2),y
@ -272,7 +272,6 @@ LDR.KSW lda GP.INVECT0
LDR.CSWVECT .DA LDR.CSW
LDR.KSWVECT .DA LDR.KSW
LDR.GFINFO.P .DA #10
LDR.GFINFO.P.PATHBUF
.DA LDR.STARTUP.LEN
.BS 16

View File

@ -271,9 +271,9 @@ DRV.U2.Read php
.1 >AR.SELECT S0.RX.RD
lda W5100.DR,x get the received ptr HI
sta Offset+1
sta DRV.Offset+1
ldy W5100.DR,x get the received ptr LO
sty Offset
sty DRV.Offset
and /RXTX.MASK
ora /RX.BASE
@ -282,50 +282,51 @@ DRV.U2.Read php
sta W5100.AR+1,x
lda W5100.DR,x get RX.Size HI (Frame size + 2)
sta TotalSize+1
sta DRV.TotalSize+1
lda W5100.DR,x get RX.Size LO
sta TotalSize
sta DRV.TotalSize
* lda DRV.TotalSize
sec
sbc #2 MACRAW:strip 2 bytes Header from Size
sta ZPBufCnt
sta DRV.BufSize
eor #$ff
sta ZPnCnt
sta DRV.nCnt
lda TotalSize+1
lda DRV.TotalSize+1
sbc #0
sta ZPBufCnt
sta DRV.BufSize+1
eor #$ff
sta ZPnCnt+1
sta DRV.nCnt+1
lda ZPBufPtr+1
pha
>LDYA DRV.InBuf
>STYA .4+1
ldy #0
.2 inc ZPnCnt
.2 inc DRV.nCnt
bne .3
inc ZPnCnt+1
inc DRV.nCnt+1
beq .8
.3 lda W5100.DR,x
sta (ZPBufPtr),y
.4 sta $FFFF,y SELF MODIFIED
iny
bne .2
inc ZPBufPtr+1
inc .4+2
bra .2
.8 >AR.SELECT S0.RX.RD
lda Offset
lda DRV.Offset
clc
adc TotalSize
adc DRV.TotalSize
pha save LO
lda Offset+1
adc TotalSize+1
lda DRV.Offset+1
adc DRV.TotalSize+1
sta W5100.DR,x write HI
pla
sta W5100.DR,x write LO
@ -334,9 +335,6 @@ DRV.U2.Read php
lda #W5100.AR.Sn.CR.RCVD
sta W5100.DR,x
pla
sta ZPBufPtr+1
plp
clc
rts
@ -348,17 +346,17 @@ DRV.U2.9 plp
DRV.U2.Write php
sei
>STYA ZPBufCnt
>STYA DRV.BufSize
eor #$ff
sta ZPnCnt+1
sta DRV.nCnt+1
tya
eor #$ff
sta ZPnCnt
sta DRV.nCnt
>LDYA DRV.OutBuf
>STYA ZPBufPtr
>STYA .3+1
ldx DRV.START
@ -367,8 +365,8 @@ DRV.U2.Write php
nop
nop
ldy W5100.DR,x LO
cpy ZPBufCnt
sbc ZPBufCnt+1
cpy DRV.BufSize
sbc DRV.BufSize+1
bcc DRV.U2.9
>AR.SELECT S0.TX.WR
@ -379,34 +377,34 @@ DRV.U2.Write php
and /RXTX.MASK
ora /TX.BASE
sta W5100.AR,x Write HI
sta Offset+1
sta DRV.Offset+1
tya
sta W5100.AR+1,x Write LO
sta Offset
sta DRV.Offset
ldy #0
.2 inc ZPnCnt
.2 inc DRV.nCnt
bne .3
inc ZPnCnt+1
inc DRV.nCnt+1
beq .8
.3 lda (ZPBufPtr),y
.3 lda $FFFF,y SELF MODIFIED
sta W5100.DR,x
iny
bne .2
inc ZPBufPtr+1
inc .3+2
bra .2
.8 >AR.SELECT S0.TX.WR
lda Offset
lda DRV.Offset
clc
adc ZPBufCnt
adc DRV.BufSize
pha save LO
lda Offset+1
adc ZPBufCnt+1
lda DRV.Offset+1
adc DRV.BufSize+1
sta W5100.DR,x write HI
pla
sta W5100.DR,x write LO
@ -418,7 +416,12 @@ DRV.U2.Write php
plp
clc
rts
*--------------------------------------
DRV.Offset .BS 2
DRV.BufSize .BS 2
DRV.TotalSize .BS 2
DRV.nCnt .BS 2
*--------------------------------------
.EP
.LIST ON

View File

@ -112,6 +112,7 @@ VEDRIVE.Init >LDYAI VEDRIVE.MSG0
jsr PrintFYA
* jsr VEDRIVE.SetSlot
sec
bcc .8
>LDYAI VEDRIVE.NOSLOT
@ -123,7 +124,7 @@ VEDRIVE.Init >LDYAI VEDRIVE.MSG0
>LDYAI VEDRIVE.DEVOK
jsr PrintFYA
jsr VEDRIVE.Install
* jsr VEDRIVE.Install
bcc .9
>LDYAI VEDRIVE.DRVIKO
@ -285,10 +286,10 @@ VEDRIVE.SetSlot ldx #2 Starts at Slot1
*--------------------------------------
VEDRIVE.Install ldx #PATCH.SIZE
*.1 lda PATCH-1,x
* sta DRV.EntryPoint-1,x
* dex
* bne .1
.1 lda PATCH-1,x
sta DRV.EntryPoint-1,x
dex
bne .1
bit RRAMWRAMBNK2
bit RRAMWRAMBNK2
@ -417,7 +418,7 @@ DRV.InBuf .EQ $DA00 Frame Buffer = 1536 bytes
DRV .PH $D001 Main LC Bnk 2 $D001->$DFFF
DRV.START .BS 1 SELF MODIFIED slot 0n
>DEBUG
lda DRV.COMMAND S=0,R=1,W=2,F=3
bne .1
@ -458,6 +459,7 @@ DRV.START .BS 1 SELF MODIFIED slot 0n
*--------------------------------------
DRV.DO.CMD.R ldy #S.UDP+5
lda /S.UDP+5
jsr DRV.Write