diff options
-rw-r--r-- | dla.s | 56 |
1 files changed, 44 insertions, 12 deletions
@@ -363,8 +363,6 @@ waitkey: bne notredo jmp main notredo: - cmp #$2e ; WriteCSV - beq writecsv cmp #$3e ; Save beq saveimage cmp #$2a ; Exit @@ -372,12 +370,44 @@ notredo: ;rts ; exit to DOS jmp COLDSV ; reboot -writecsv: saveimage: -notyet: - lda #$40 - sta COLOR2 - + ldx #$10 + lda #3 ; OPEN + sta ICCOM,x + lda #<filename + sta ICBAL,x + lda #>filename + sta ICBAH,x + lda #fnlen + sta ICBLL,x + lda #0 + sta ICBLH,x + sta ICAX2,x + lda #8 + sta ICAX1,x + jsr CIOV + + ldx #$10 + lda #$0b ; write binary record + sta ICCOM,x + lda #<screen + sta ICBAL,x + lda #>screen + sta ICBAH,x + lda #<(maxlines * linelen) + sta ICBLL,x + lda #>(maxlines * linelen) + sta ICBLH,x + jsr CIOV + + ldx #$10 + lda #$0c ; close + sta ICCOM,x + jsr CIOV + jmp keyloop + +diskerr: + sty textbuf hang: jmp hang ; TODO: code to save image goes here. ;;; End of main() @@ -388,19 +418,21 @@ menumsg: .byte $00 ; 1 decimal point .byte $00,$00 ; 2 digits fractional minutes .byte $00 ; 1 the letter "m" - .byte $00 ; 1 space + .byte $00,$00 ; 2 spaces .byte 'S'-$20+$80 ; 1 scrcode "ave " ; 3 - .byte 'W'-$20+$80 ; 1 - scrcode "rtCSV " ; 6 .byte 'R'-$20+$80 ; 1 scrcode "edo " ; 4 .byte 'E'-$20+$80 ; 1 - scrcode "xit? " ; 5 + scrcode "xit?" ; 4 .byte $80 ; 1 (cursor) - .byte $00 ; 1 space (filler) to make 32 bytes + .byte $00,$00,$00 ; 3 (filler) menulen = * - menumsg +; filename for Save command +filename: .byte "D:DLA.IMG" +fnlen = *-filename+1 + ;;; Subroutine: set_limits ;;; Sets the X/Y min/max limits based on circlesize set_limits: |