]> Joshua Wise's Git repositories - fpgaboy.git/blobdiff - fpgaboot.asm
Fix the UART, and set it to 19k2 for more stable operation. Make the downloader a...
[fpgaboy.git] / fpgaboot.asm
index 0a714b136deaec0bdd8238be5dbf7cc3d49b8a4f..6cb96137856398593e4cec4c97a98f8c8cdfe95b 100644 (file)
@@ -98,20 +98,26 @@ bootcmd:
 .data:
        call getc       ; byte count
        ld c, a
-.dl:   call getc
+.dl:   dec c
+       jr z, .done
+       call getc
        ld [$FF63], A
-       dec c
-       jp nz, .dl
-       ld A, $44       ;D
-       ret
+       jr .dl
+.done: ld A, $44       ;D
+       jr putc
+
 .prog:
        ld hl, $FF80
        ld c, $7F
 .pl:   dec c
-       jp z, $FF80
+       jp z, .progboot
        call getc
        ld [hli], a
        jr .pl
+.progboot:
+       ld a, $50       ;P
+       call putc
+       jp $FF80
        
        SECTION "a", HOME[$100]
        nop     ; Make sure we don't overflow.
This page took 0.020881 seconds and 4 git commands to generate.