summary refs log tree commit diff
path: root/code/move-bootloader.a
diff options
context:
space:
mode:
authorWlodekM <wlodzio.maly@gmail.com>2025-03-31 19:47:54 +0300
committerWlodekM <wlodzio.maly@gmail.com>2025-03-31 19:47:54 +0300
commitcccb99226d3951fd9dfe1c4cf1c43126a1309d51 (patch)
tree518d3e965558ba313f103cee6161cd2b6aedb3b9 /code/move-bootloader.a
parentef4e8c20719822eebd6318a878cc37902c2b85a5 (diff)
move to pc-thing/
Diffstat (limited to 'code/move-bootloader.a')
-rw-r--r--code/move-bootloader.a62
1 files changed, 0 insertions, 62 deletions
diff --git a/code/move-bootloader.a b/code/move-bootloader.a
deleted file mode 100644
index 306f2fe..0000000
--- a/code/move-bootloader.a
+++ /dev/null
@@ -1,62 +0,0 @@
-start:
-    ; init stack
-    mov a 0x6000
-    mov b 0x7000
-    str b a
-    copyLoop:
-        mov a [codePointer]
-        ld a a
-        mov b 0x6000
-        add c a b
-        mov a [targetPointer]
-        str c a
-
-        mov a codeStart
-        mov b [codePointer]
-        ld b b
-        add c a b
-        
-        mov a [targetPointer]
-        ld a a
-        ; swp a c
-        ; a <- $b
-        ld d c
-        push d ; push b
-        ld d a
-        ; push a ; push a
-        str c d ; $b <- a
-        pop d
-        ; $a <- b
-        str a d
-        ; swpm c b
-        
-        mov a [codePointer]
-        ld a a
-        mov b 1
-        add c a b
-        ; mov a
-        str c [codePointer] 
-        ; continue loop
-            mov b [targetPointer]
-            ; (byte we just copied) -> B
-            ld b b
-            ; (next byte) -> A
-            ld a c
-            ; C = A (aka next byte) == 0
-            cmr c a 0
-            ; A = B (aka last byte) == 1E (end instruction)
-            cmr a b 0x1e
-            swp c b ; C -> B
-            and c a b; c=a&&b
-            mov a 1
-            cmp c a ; c==1?
-            jz copyLoop ; continue if c != 1
-    jmp 0x6001
-
-
-targetPointer:
-.hex 0
-codePointer:
-.hex 0
-; start of bootloader
-codeStart:
\ No newline at end of file