mirror of
https://github.com/bobbimanners/emailler.git
synced 2025-04-11 17:39:50 +00:00
Less lazy code.
This commit is contained in:
parent
dee0ebce3f
commit
d4e3bc4109
@ -167,33 +167,29 @@ Main1: cld
|
||||
; Actually set the MAC address on the Uthernet-II
|
||||
; TODO: Make this slot independent and not hard-coded
|
||||
; Hard-coded for slot 5
|
||||
lda #$80 ; Reset W5100
|
||||
sta $bfff+$d5 ; Store in MODE register
|
||||
lda #$03 ; Address autoinc, indirect
|
||||
sta $bfff+$d5 ; Store in MODE register
|
||||
lda #$00 ; High byte of MAC reg addr
|
||||
ldx #$09 ; Low byte
|
||||
sta $bfff+$d6 ; Set high byte of pointer
|
||||
stx $bfff+$d7 ; Set low byte
|
||||
lda #$00 ; First byte of MAC
|
||||
sta $bfff+$d8 ; Set and autoinc
|
||||
lda #$08 ; Second byte of MAC
|
||||
sta $bfff+$d8 ; Set and autoinc
|
||||
lda #$dc ; Third byte of MAC
|
||||
sta $bfff+$d8 ; Set and autoinc
|
||||
lda #$de ; Fourth byte of MAC
|
||||
sta $bfff+$d8 ; Set and autoinc
|
||||
lda #$ad ; Fifth byte of MAC
|
||||
sta $bfff+$d8 ; Set and autoinc
|
||||
lda #$00 ; Sixth byte of MAC
|
||||
sta $bfff+$d8 ; Set and autoinc
|
||||
lda #$00 ; High byte of $001a reg addr
|
||||
ldx #$1a ; Low byte
|
||||
sta $c0d5 ; Set high byte of pointer
|
||||
stx $c0d6 ; Set low byte
|
||||
lda #$06 ; Magic value: MAC set!
|
||||
sta $bfff+$d8 ; Set and autoinc
|
||||
ldy $d0 ; Slot 5 offset
|
||||
lda #$80 ; Reset W5100
|
||||
sta $bfff+$d5 ; Store in MODE register
|
||||
lda #$03 ; Address autoinc, indirect
|
||||
sta $bfff+$d5 ; Store in MODE register
|
||||
lda #$00 ; High byte of MAC reg addr
|
||||
ldx #$09 ; Low byte
|
||||
sta $bfff+$d6 ; Set high byte of pointer
|
||||
stx $bfff+$d7 ; Set low byte
|
||||
ldx #$00
|
||||
: lda mac,x ; Load byte of MAC
|
||||
sta $bfff+$d8 ; Set and autoinc
|
||||
inx
|
||||
cpx #6
|
||||
bne :-
|
||||
lda #$00 ; High byte of $001a reg addr
|
||||
ldx #$1a ; Low byte
|
||||
sta $c0d5 ; Set high byte of pointer
|
||||
stx $c0d6 ; Set low byte
|
||||
lda #$06 ; Magic value: MAC set!
|
||||
sta $bfff+$d8 ; Set and autoinc
|
||||
rts
|
||||
mac: .byte $00,$08,$0d,$00,$de,$ad
|
||||
.endproc
|
||||
; This starts the process of finding & launching next system file
|
||||
; unfortunately it also uses block reads and can't be run from an AppleShare
|
||||
|
Loading…
x
Reference in New Issue
Block a user