;;; -*- Mode: asm; indent-tabs-mode: t; tab-width: 8 -*- .scope line_test ;; Program for testing of line-drawing. It draws a bunch of lines ;;Start line-timer-here .include "line.inc" .include "../memory/mem.inc" Y_pos_ = $0D X_pos_ = $0E Y_end_ = $10 X_end_ = $11 LDA #$d2 STA X_pos_ LDA #$62 STA Y_pos_ LDA #$ff STA X_end LDA #$0 STA Y_end ;; Short test for timing @loop: LDA Y_pos_ STA Y_pos LDA X_pos_ STA X_pos jsr line INC Y_end LDA Y_end CMP #$aa BEQ end__ jmp @loop end__: ;; Full anfle test @loop: LDA Y_pos_ STA Y_pos LDA X_pos_ STA X_pos jsr line INC Y_end LDA Y_end CMP #$bb BEQ end jmp @loop end: ;;Long lines ;;Lets clear bitmap VIC_bank = $4000 ;;Paint the bitmap black. More bitmap: https://www.c64-wiki.com/wiki/53272, https://www.c64-wiki.com/wiki/Screen_RAM#Moving_of_screen_RAM Mov_16 A_start, A_start + 1, #VIC_bank Mov_16 length, length + 1, #<$1f40, #>$1f40 LDA #$00 jsr memset LDA #$00 STA X_pos_ LDA #$60 STA Y_pos_ LDA #$ff STA X_end LDA #$0 STA Y_end @loop: LDA Y_pos_ STA Y_pos LDA X_pos_ STA X_pos jsr line INC Y_end LDA Y_end CMP #$bb BEQ end_ jmp @loop end_: .endscope