mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-09-28 01:55:12 +00:00
Preparation for supporting card in any slot
This commit is contained in:
parent
d4e3bc4109
commit
bc29b3621e
@ -164,30 +164,36 @@ Main1: cld
|
|||||||
jmp NextSys
|
jmp NextSys
|
||||||
.endproc
|
.endproc
|
||||||
.proc setmac
|
.proc setmac
|
||||||
; Actually set the MAC address on the Uthernet-II
|
; Set the MAC address on the Uthernet-II
|
||||||
; TODO: Make this slot independent and not hard-coded
|
; TODO: Hard-coded for slot 5.
|
||||||
; Hard-coded for slot 5
|
ldy $d5 ; Slot 5 mode reg offset
|
||||||
ldy $d0 ; Slot 5 offset
|
|
||||||
lda #$80 ; Reset W5100
|
lda #$80 ; Reset W5100
|
||||||
sta $bfff+$d5 ; Store in MODE register
|
sta $bfff,y ; Store in MODE register
|
||||||
lda #$03 ; Address autoinc, indirect
|
lda #$03 ; Address autoinc, indirect
|
||||||
sta $bfff+$d5 ; Store in MODE register
|
sta $bfff,y ; Store in MODE register
|
||||||
lda #$00 ; High byte of MAC reg addr
|
lda #$00 ; High byte of MAC reg addr
|
||||||
ldx #$09 ; Low byte
|
ldx #$09 ; Low byte
|
||||||
sta $bfff+$d6 ; Set high byte of pointer
|
iny ; $d6
|
||||||
stx $bfff+$d7 ; Set low byte
|
sta $bfff,y ; Set high byte of pointer
|
||||||
|
iny ; $d7
|
||||||
|
stx $bfff,y ; Set low byte
|
||||||
ldx #$00
|
ldx #$00
|
||||||
|
iny ; $d8
|
||||||
: lda mac,x ; Load byte of MAC
|
: lda mac,x ; Load byte of MAC
|
||||||
sta $bfff+$d8 ; Set and autoinc
|
sta $bfff,y ; Set and autoinc
|
||||||
inx
|
inx
|
||||||
cpx #6
|
cpx #6
|
||||||
bne :-
|
bne :-
|
||||||
lda #$00 ; High byte of $001a reg addr
|
lda #$00 ; High byte of $001a reg addr
|
||||||
ldx #$1a ; Low byte
|
ldx #$1a ; Low byte
|
||||||
sta $c0d5 ; Set high byte of pointer
|
dey
|
||||||
stx $c0d6 ; Set low byte
|
dey ; $d6
|
||||||
|
sta $bfff,y ; Set high byte of pointer
|
||||||
|
iny ; $d7
|
||||||
|
stx $bfff,y ; Set low byte
|
||||||
lda #$06 ; Magic value: MAC set!
|
lda #$06 ; Magic value: MAC set!
|
||||||
sta $bfff+$d8 ; Set and autoinc
|
iny ; $d8
|
||||||
|
sta $bfff,y ; Set and autoinc
|
||||||
rts
|
rts
|
||||||
mac: .byte $00,$08,$0d,$00,$de,$ad
|
mac: .byte $00,$08,$0d,$00,$de,$ad
|
||||||
.endproc
|
.endproc
|
||||||
|
Loading…
Reference in New Issue
Block a user