From 238fc5de490a724e10dee4d0db898b6fb855d5e3 Mon Sep 17 00:00:00 2001 From: Bobbi Webber-Manners Date: Fri, 4 Jun 2021 00:30:49 -0400 Subject: [PATCH] setmac routine is now slot-independent --- apps/setmac/setmac.s | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/apps/setmac/setmac.s b/apps/setmac/setmac.s index 003e573..ce46f05 100644 --- a/apps/setmac/setmac.s +++ b/apps/setmac/setmac.s @@ -160,13 +160,20 @@ Main1: cld .byte $8D ; CR hasc "Uthernet-II SETMAC Utility" .byte $8D,$00 ; CR, done + lda #5 ; Slot 5 jsr setmac jmp NextSys .endproc .proc setmac ; Set the MAC address on the Uthernet-II -; TODO: Hard-coded for slot 5. - ldy $d5 ; Slot 5 mode reg offset +; Expects slot number in A + asl + asl + asl + asl + clc + adc #$85 + tay ; Mode register offset lda #$80 ; Reset W5100 sta $bfff,y ; Store in MODE register lda #$03 ; Address autoinc, indirect