diff --git a/sw/bios/boot2.s b/sw/bios/boot2.s new file mode 100644 index 0000000..a9d5482 --- /dev/null +++ b/sw/bios/boot2.s @@ -0,0 +1,18 @@ +.importzp sp, ptr1, ptr2, ptr3, ptr4, tmp1, tmp2, tmp3, sreg + +.autoimport on + +.feature string_escapes + +.MACPACK generic + +.segment "BOOTLOADER" + +_start: + lda #str + jsr _cputs + +str: .byte "This is a very long message which would otherwise" + .byte "take up a lot of space in the bootsector, where space" + .byte "is at quite a premium.", $00 \ No newline at end of file diff --git a/sw/bios/bootloader.s b/sw/bios/bootloader.s index 7cec63c..e4b60b2 100644 --- a/sw/bios/bootloader.s +++ b/sw/bios/bootloader.s @@ -71,23 +71,13 @@ _main: sta ptr2 bra @1 -@2: lda #$00 +@2: ldy #11 + lda #$00 sta (ptr2),y - lda #entry - jsr _cputs - lda #name - jsr pushax - clc - tya - adc ptr2 + lda ptr2 pha ldx ptr2 + 1 phx - jsr pushax - ldy #$4 - jsr _cprintf lda #<_boot2_str ldx #>_boot2_str jsr pushax @@ -107,9 +97,6 @@ _main: @end: bra @end str: .asciiz "boot\r\n" -lfn: .asciiz "Found LFN\r\n" -entry: .asciiz "Found valid entry\r\n" -name: .asciiz "entry name: %s\r\n" _boot2_str: .asciiz "BOOT2 BIN" _fail: .asciiz "not bootloader\r\n" _good: .asciiz "found bootloader!\r\n"