A2osX/SYS/KM.APPLETALK.S.txt

163 lines
3.3 KiB
Plaintext
Raw Normal View History

NEW
2018-11-17 17:17:13 +00:00
PREFIX
2018-08-08 15:13:37 +00:00
AUTO 4,1
.LIST OFF
.OP 65C02
.OR $2000
2019-10-28 06:32:12 +00:00
.TF SYS/KM/KM.APPLETALK
*--------------------------------------
2018-07-23 15:28:42 +00:00
.INB INC/MACROS.I
.INB INC/IO.I
.INB INC/MONITOR.I
2018-10-02 15:52:30 +00:00
.INB INC/MLI.I
*--------------------------------------
TmpPtr1 .EQ $0
*--------------------------------------
2018-08-24 10:20:23 +00:00
BUF.PREFIX .EQ $300
*--------------------------------------
2018-07-12 15:20:39 +00:00
AT.INIT >LDYAI MSG.INIT
jsr PrintFYA
2019-10-24 05:55:42 +00:00
lda #$F9
sta TmpPtr1
lda #$C7
sta TmpPtr1+1
2019-10-23 15:12:58 +00:00
.1 ldy #3
.2 lda (TmpPtr1),y
cmp SIG.ATLK,y
bne .3
2019-10-23 15:12:58 +00:00
dey
bpl .2
2019-10-23 15:12:58 +00:00
ldx #0
2019-10-23 15:12:58 +00:00
2019-10-24 05:55:42 +00:00
ldy #4
lda (TmpPtr1),y
cmp #1
beq .4
2019-10-24 05:55:42 +00:00
ldx #$80
cmp #2
beq .4
pha
2018-07-12 15:20:39 +00:00
>LDYAI MSG.FAILED
jsr PrintFYA
rts
2019-10-23 15:12:58 +00:00
.3 dec TmpPtr1+1
lda TmpPtr1+1
cmp #$C0
bne .1
2019-10-28 06:32:12 +00:00
2018-07-12 15:20:39 +00:00
>LDYAI MSG.NOHW
jsr PrintFYA
rts
2019-10-23 15:12:58 +00:00
.4 stx WC.Flag
tay
lda TmpPtr1+1
and #$0f
pha Push slot #
phy Push Type #
2018-07-12 15:20:39 +00:00
>LDYAI MSG.HWOK
jsr PrintFYA
>LDYA MLI+1
>STYA GO.OLDMLI+1
>STYA MLIATALK.PARAMS.OLDMLI
ldy #$14
lda TmpPtr1+1 Cn
sta MLIALLOCIRQ.PARAMS.SLOT
>STYA GO.WSCARD+1
bit WC.Flag
bmi .5
>STYA MLI+1
2018-07-12 15:20:39 +00:00
.5 >LDYAI MSG.ATINIT
jsr PrintFYA
2019-10-28 06:32:12 +00:00
jsr GO.WSCARD
.DA #MLIATALK
.DA MLIATALK.PARAMS
bcs .9
2019-10-28 06:32:12 +00:00
2018-07-12 15:20:39 +00:00
>LDYAI MSG.IRQ
jsr PrintFYA
jsr MLI
.DA #MLIALLOCIRQ
.DA MLIALLOCIRQ.PARAMS
bcs .9
cli
2018-07-12 15:20:39 +00:00
>LDYAI MSG.PREFIX1
jsr PrintFYA
jsr GO.OLDMLI
.DA #MLIGETPREFIX
.DA MLIGETPREFIX.PARAMS
bcs .9
2019-10-28 06:32:12 +00:00
2018-07-12 15:20:39 +00:00
>LDYAI MSG.PREFIX2
jsr PrintFYA
jsr GO.WSCARD
.DA #MLISETPREFIX
.DA MLIGETPREFIX.PARAMS
bcs .9
2019-10-28 06:32:12 +00:00
2018-07-12 15:20:39 +00:00
>LDYAI MSG.OK
jsr PrintFYA
rts
2019-10-28 06:32:12 +00:00
.9 pha
2018-07-12 15:20:39 +00:00
>LDYAI MSG.KO
jsr PrintFYA
rts
*--------------------------------------
2018-11-19 07:43:00 +00:00
GO.WSCARD jmp $ffff SELF MODIFIED
GO.OLDMLI jmp $ffff SELF MODIFIED
*--------------------------------------
2019-10-21 14:25:37 +00:00
.INB USR/SRC/SHARED/X.PRINTF.S
*--------------------------------------
MSG.INIT .AZ "AppleTalk Driver For A2osX\n"
MSG.FAILED .AZ "AppleTalk Workstation Card Failed Power Up Diagnostics : EC=%h.\n"
MSG.NOHW .AZ "AppleTalk Workstation Card Not Found.\n"
MSG.HWOK .AZ "AppleTalk Workstation Card Type #%d Found In Slot #%d.\n"
MSG.ATINIT .AZ "Calling ATInit...\n"
MSG.IRQ .AZ "Setting Up IRQ Vector...\n"
MSG.PREFIX1 .AZ "Getting ProDOS Prefix...\n"
MSG.PREFIX2 .AZ "Setting AppleTalk Prefix...\n"
MSG.OK .AZ "AppleTalk Driver Successfully Installed.\n"
MSG.KO .AZ "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
MLIATALK.PARAMS.OLDMLI
.BS 2 ??? from ATINIT disassembly
.BS 5 ??? 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
*--------------------------------------
MAN
2018-11-30 16:00:36 +00:00
SAVE USR/SRC/SYS/KM.APPLETALK.S
ASM