diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..4a4cb69 --- /dev/null +++ b/TODO.md @@ -0,0 +1,11 @@ +TODO: + +- fix setting of pointer @45 (new uridium fails to run!) +- *DONE* properly save & restore device number (now set to 8) +- finish the INSTALL utility program: all blocks +- bootctl, prefs + +end 64 = 41349 = $a185 @45 +end 128 = 46469 = $b585 @174 + + diff --git a/defs.inc b/defs.inc index 2cf1612..1d64f8c 100644 --- a/defs.inc +++ b/defs.inc @@ -1,31 +1,31 @@ -VIC2 = $D000 ; VIC-II base -COLORAM = $D800 ; color ram +VIC2 = $D000 ; VIC-II register base +COLORAM = $D800 ; color memory SCROLY = VIC2+$11 RASTER = VIC2+$12 SCROLX = VIC2+$16 -VICIRQ = VIC2+$19 ; VIC Interrupt Flag Register -IRQMASK = VIC2+$1A ; VIC IRQ Mask Register -EXTCOL = VIC2+$20 ; border color -BGCOL0 = VIC2+$21 ; background color +VICIRQ = VIC2+$19 ; VIC Interrupt Flag Register +IRQMASK = VIC2+$1A ; VIC IRQ Mask Register +EXTCOL = VIC2+$20 ; border color +BGCOL0 = VIC2+$21 ; background color BGCOL1 = VIC2+$22 BGCOL2 = VIC2+$23 -CHROUT = $FFD2 ; output character -STOP = $FFE1 ; check for stop key +CHROUT = $FFD2 ; output character +STOP = $FFE1 ; check for stop key -T1 = $9E ; Tape pass 1 error log index -T2 = $9F ; Tape pass 2 error log correction index +T1 = $9E ; Tape pass 1 error log index +T2 = $9F ; Tape pass 2 error log correction index -TIME = $A0 ; Software Jiffy Clock (2) -SAL = $AC ; Pointer to the Starting Address of a Load/Screen Scrolling (2) (temporary) -EAL = $AE ; Pointer to Ending Address of Load (2) (End of Program) +TIME = $A0 ; (3) Software Jiffy Clock +SAL = $AC ; (2) Pointer to the Starting Address of a Load/Screen Scrolling (temporary) +EAL = $AE ; (2) Pointer to Ending Address of Load (End of Program) -FA = $BA ; Current Device Number -FNLEN = $B7 ; Length of Current Filename -FNADDR = $BB ; Pointer: Current Filename (2) +FA = $BA ; Current Device Number +FNLEN = $B7 ; Length of Current Filename +FNADDR = $BB ; (2) Pointer: Current Filename -VICSCN = $0400 +VICSCN = $0400 ; default screen memory VICGO64 = VICSCN + 40*22 VICAS64 = VICSCN + 40*15 diff --git a/raster.s b/raster.s index e8c6135..65cdf57 100644 --- a/raster.s +++ b/raster.s @@ -18,49 +18,18 @@ print: lda msg, x bne print done: -; print end program address - lda TXTTAB+1 - jsr hexout - lda TXTTAB - jsr hexout - lda #'-' - jsr CHROUT - lda VARTAB+1 - jsr hexout - lda VARTAB - jsr hexout - lda #13 - jsr CHROUT - jsr raster_setup exit: lda #0 sta resultRegister rts -; print hex A -hexout: - pha - lsr - lsr - lsr - lsr - jsr hexdig - pla - and #$0f -hexdig: - cmp #$0a - bcc hdsk1 - adc #$06 -hdsk1: adc #$30 - jsr CHROUT - rts - .rodata msg: .asciiz "HELLO RASTER WORLD " ; -------------------------- +.code raster_setup: sei @@ -123,27 +92,32 @@ raster_chk_wait: bcs raster_do_call ; not a wait instruction raster_do_wait: cmp #0 - beq raster_list_restart + beq raster_list_restart ; end of list reached stx RASTER iny sty T1 - bne raster_rti + bne raster_rti ; always, return from IRQ brk raster_do_call: - ; not implemented + ; not implemented yet iny sty T1 - bne raster_exec + bne raster_exec ; always brk raster_list_restart: ldy #0 sty T1 - beq raster_exec ; always + beq raster_exec ; always raster_rti: - jmp raster_cont + pla + tay + pla + tax + pla + rti raster_not: inc EXTCOL @@ -152,11 +126,11 @@ raster_cont: jmp $ea31 raster_list: - .word 100 ; wait for line 100 - .word $d020 ; set border to color 2 + .word 100 ; wait for line 100 + .word $d020 ; set border to color 2 .byte 2 - .word 200 ; wait for line 200 - .word $d020 ; set border to color 3 + .word 200 ; wait for line 200 + .word $d020 ; set border to color 3 .byte 2 .word 0 ; end