mirror of
https://github.com/A2osX/A2osX.git
synced 2024-08-14 13:29:02 +00:00
157 lines
3.2 KiB
Plaintext
157 lines
3.2 KiB
Plaintext
PR#3
|
||
PREFIX /A2OSX.BUILD
|
||
NEW
|
||
INC 1
|
||
AUTO 6
|
||
.LIST OFF
|
||
.OP 65C02
|
||
.OR $2000
|
||
.TF /A2OSX.BUILD/SYS/KM.APPLETALK
|
||
*--------------------------------------
|
||
.INB /A2OSX.BUILD/INC/MACROS.I
|
||
.INB /A2OSX.BUILD/INC/IO.I
|
||
.INB /A2OSX.BUILD/INC/MONITOR.I
|
||
.INB /A2OSX.BUILD/INC/PRODOS.I
|
||
*--------------------------------------
|
||
TmpPtr1 .EQ $0
|
||
*--------------------------------------
|
||
AT.INIT >LDAXI MSG.INIT
|
||
jsr PrintCStrAX
|
||
|
||
lda #$F9
|
||
sta TmpPtr1
|
||
lda #$C7
|
||
sta TmpPtr1+1
|
||
|
||
.1 ldy #3
|
||
|
||
.2 lda (TmpPtr1),y
|
||
cmp SIG.ATLK,y
|
||
bne .3
|
||
dey
|
||
bpl .2
|
||
|
||
ldy #4
|
||
lda (TmpPtr1),y
|
||
|
||
ldx #0
|
||
cmp #1
|
||
beq .4
|
||
|
||
ldx #$80
|
||
cmp #2
|
||
beq .4
|
||
|
||
pha
|
||
>LDAXI MSG.FAILED
|
||
jsr PrintCStrAX
|
||
rts
|
||
|
||
.3 dec TmpPtr1+1
|
||
lda TmpPtr1+1
|
||
cmp #$C0
|
||
bne .1
|
||
|
||
>LDAXI MSG.NOHW
|
||
jsr PrintCStrAX
|
||
rts
|
||
|
||
.4 stx WC.Flag
|
||
tay
|
||
|
||
lda TmpPtr1+1
|
||
and #$0f
|
||
pha Push slot #
|
||
phy Push Type #
|
||
>LDAXI MSG.HWOK
|
||
jsr PrintCStrAX
|
||
|
||
>LDYA MLI+1
|
||
>STYA GO.OLDMLI+1
|
||
|
||
ldy #$14
|
||
lda TmpPtr1+1 Cn
|
||
sta MLIALLOCIRQ.PARAMS.SLOT
|
||
|
||
>STYA GO.WSCARD+1
|
||
bit WC.Flag
|
||
bmi .5
|
||
|
||
>STYA MLI+1
|
||
|
||
.5 >LDAXI MSG.ATINIT
|
||
jsr PrintCStrAX
|
||
|
||
jsr GO.WSCARD
|
||
.DA #MLIATALK
|
||
.DA MLIATALK.PARAMS
|
||
bcs .9
|
||
|
||
>LDAXI MSG.PRODOS
|
||
jsr PrintCStrAX
|
||
|
||
jsr MLI
|
||
.DA #MLIALLOCIRQ
|
||
.DA MLIALLOCIRQ.PARAMS
|
||
bcs .9
|
||
|
||
cli
|
||
|
||
jsr GO.OLDMLI
|
||
.DA #MLIGETPREFIX
|
||
.DA MLIGETPREFIX.PARAMS
|
||
bcs .9
|
||
|
||
jsr GO.WSCARD
|
||
.DA #MLISETPREFIX
|
||
.DA MLIGETPREFIX.PARAMS
|
||
bcs .9
|
||
|
||
>LDAXI MSG.OK
|
||
jsr PrintCStrAX
|
||
rts
|
||
|
||
.9 pha
|
||
>LDAXI MSG.KO
|
||
jsr PrintCStrAX
|
||
rts
|
||
*--------------------------------------
|
||
GO.WSCARD jmp $ffff Self Modifed
|
||
GO.OLDMLI jmp $ffff
|
||
*--------------------------------------
|
||
.INB /A2OSX.SRC/X.PRINTF.S
|
||
*--------------------------------------
|
||
MSG.INIT >CSTR "AppleTalk Driver For A2osX\n"
|
||
MSG.FAILED >CSTR "AppleTalk Workstation Card Failed Power Up Diagnostics : EC=%h.\n"
|
||
MSG.NOHW >CSTR "AppleTalk Workstation Card Not Found.\n"
|
||
MSG.HWOK >CSTR "AppleTalk Workstation Card Type #%d Found In Slot #%d.\n"
|
||
MSG.ATINIT >CSTR "Calling ATINIT...\n"
|
||
MSG.PRODOS >CSTR "Registering Into ProDOS...\n"
|
||
MSG.OK >CSTR "AppleTalk Driver Successfully Installed.\n"
|
||
MSG.KO >CSTR "AppleTalk Driver Install Failed : EC=%h.\n"
|
||
*--------------------------------------
|
||
SIG.ATLK .AS "ATLK"
|
||
WC.Flag .BS 1
|
||
*--------------------------------------
|
||
MLIATALK.PARAMS .DA #0 Sync
|
||
.DA #1 INIT
|
||
.BS 2 RC
|
||
.DA #$40 ??? from ATINIT disassembly
|
||
*--------------------------------------
|
||
MLIALLOCIRQ.PARAMS
|
||
.DA #2 Param Count
|
||
.BS 1 Int Num returned
|
||
.DA #$19 Lo byte always $19 for WS Card
|
||
MLIALLOCIRQ.PARAMS.SLOT
|
||
.BS 1 hi byte : $Cn
|
||
*--------------------------------------
|
||
MLIGETPREFIX.PARAMS
|
||
.DA #1
|
||
.DA BUF.PREFIX
|
||
*--------------------------------------
|
||
BUF.PREFIX .BS MLI.MAXPATH
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE /A2OSX.SRC/SYS/KM.APPLETALK.S
|
||
ASM
|