Kernel version 0.9 : fix in ATLK module to prevent initial crash (i hope!)

This commit is contained in:
Rémy GIBERT 2017-04-26 16:54:24 +02:00
parent d71c265058
commit f2a899c776
5 changed files with 29 additions and 24 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -79,10 +79,10 @@ AT.INIT >LDAXI MSG.INIT
>STYA MLI+1 >STYA MLI+1
>LDAXI MSG.ATINIT .5 >LDAXI MSG.ATINIT
jsr PrintCStrAX jsr PrintCStrAX
.5 jsr GO.WSCARD jsr GO.WSCARD
.DA #MLIATALK .DA #MLIATALK
.DA MLIATALK.PARAMS .DA MLIATALK.PARAMS
bcs .9 bcs .9
@ -125,8 +125,8 @@ MSG.INIT >CSTR "AppleTalk Driver For A2osX\n"
MSG.FAILED >CSTR "AppleTalk Workstation Card Failed Power Up Diagnostics : EC=%h.\n" MSG.FAILED >CSTR "AppleTalk Workstation Card Failed Power Up Diagnostics : EC=%h.\n"
MSG.NOHW >CSTR "AppleTalk Workstation Card Not Found.\n" MSG.NOHW >CSTR "AppleTalk Workstation Card Not Found.\n"
MSG.HWOK >CSTR "AppleTalk Workstation Card Type #%d Found In Slot #%d.\n" MSG.HWOK >CSTR "AppleTalk Workstation Card Type #%d Found In Slot #%d.\n"
MSG.ATINIT >CSTR "Calling ATINIT..." MSG.ATINIT >CSTR "Calling ATINIT...\n"
MSG.PRODOS >CSTR "Registering Into ProDOS..." MSG.PRODOS >CSTR "Registering Into ProDOS...\n"
MSG.OK >CSTR "AppleTalk Driver Successfully Installed.\n" MSG.OK >CSTR "AppleTalk Driver Successfully Installed.\n"
MSG.KO >CSTR "AppleTalk Driver Install Failed : EC=%h.\n" MSG.KO >CSTR "AppleTalk Driver Install Failed : EC=%h.\n"
*-------------------------------------- *--------------------------------------

View File

@ -20,25 +20,24 @@ PrintPStrAX >STAX TmpPtr1
.9 rts .9 rts
*-------------------------------------- *--------------------------------------
PrintCStrAX >STAX TmpPtr1 PrintCStrAX >STAX PrintCStrAX.Next+1
pla pla
sta .91+1 sta .91+1
pla pla
sta .9+1 sta .9+1
ldy #0
.1 stz X.b0Flag .1 stz X.b0Flag
stz X.DigitCount stz X.DigitCount
lda (TmpPtr1),y jsr PrintCStrAX.Next
beq .9 beq .9
cmp #'%' cmp #'%'
bne .5 bne .5
.11 iny .11 jsr PrintCStrAX.Next
lda (TmpPtr1),y
beq .9 beq .9
cmp #'0' cmp #'0'
bne .22 bne .22
ror X.b0Flag beq -> CS ror X.b0Flag beq -> CS
@ -55,20 +54,20 @@ PrintCStrAX >STAX TmpPtr1
bne .2 bne .2
pla pla
jsr PrintADec jsr PrintADec
bra .8 bra .1
.2 cmp #'D' .2 cmp #'D'
bne .3 bne .3
plx plx
pla pla
jsr PrintAXDec jsr PrintAXDec
bra .8 bra .1
.3 cmp #'h' .3 cmp #'h'
bne .4 bne .4
pla pla
jsr $FDDA PRBYTE jsr $FDDA PRBYTE
bra .8 bra .1
.4 cmp #'H' .4 cmp #'H'
bne .5 bne .5
@ -76,21 +75,21 @@ PrintCStrAX >STAX TmpPtr1
jsr $FDDA PRBYTE jsr $FDDA PRBYTE
pla pla
jsr $FDDA PRBYTE jsr $FDDA PRBYTE
bra .8 bra .1
.5 cmp #'\' .5 cmp #'\'
bne .7 bne .7
iny
lda (TmpPtr1),y jsr PrintCStrAX.Next
beq .9 beq .9
cmp #'n' cmp #'n'
bne .9 bne .9
lda #$0D lda #$0D
.7 ora #$80 .7 ora #$80
jsr $FDED COUT jsr $FDED COUT
.8 iny bra .1
bne .1
.9 lda #$ff Self modified RTS HI .9 lda #$ff Self modified RTS HI
pha pha
@ -98,20 +97,29 @@ PrintCStrAX >STAX TmpPtr1
pha pha
rts rts
*-------------------------------------- *--------------------------------------
PrintCStrAX.Next
lda $ffff
beq .8
inc PrintCStrAX.Next+1
bne .8
inc PrintCStrAX.Next+2 Always !=0
.8 rts
*--------------------------------------
PrintADec ldx #0 PrintADec ldx #0
PrintAXDec >STAX X.HexBuffer PrintAXDec >STAX X.HexBuffer
stz X.BCDBuffer stz X.BCDBuffer
stz X.BCDBuffer+1 stz X.BCDBuffer+1
stz X.BCDBuffer+2 stz X.BCDBuffer+2
phy
ldx #16 let's roll 16 bits ldx #16 let's roll 16 bits
sed sed
.2 asl X.HexBuffer .2 asl X.HexBuffer
rol X.HexBuffer+1 rol X.HexBuffer+1
php cpy will disturb carry while BCD adc php cpy will disturb carry while BCD adc
ldy #0 ldy #0
.3 plp .3 plp
lda X.BCDBuffer,y lda X.BCDBuffer,y
adc X.BCDBuffer,y adc X.BCDBuffer,y
@ -172,10 +180,7 @@ PrintAXDec >STAX X.HexBuffer
cpy #6 cpy #6
bne .6 bne .6
.9 ply .9 rts
rts
*--------------------------------------
*-------------------------------------- *--------------------------------------
X.HexBuffer .BS 2 X.HexBuffer .BS 2
X.BCDBuffer .BS 3 X.BCDBuffer .BS 3