diff --git a/wip-hugo/routines/line/line.inc b/wip-hugo/routines/line/line.inc index 1ecc5ab..2d9c24b 100644 --- a/wip-hugo/routines/line/line.inc +++ b/wip-hugo/routines/line/line.inc @@ -1,15 +1,12 @@ ;;; -*- Mode: asm; indent-tabs-mode: t; tab-width: 8 -*- - -;;Not values but register position in memory - ;; F4 - EB - X_end = $EF - Y_end = $F0 - dx = $F3 - dy = $F1 - dy_2 = $F1 ; 16-bit value (uses F2) - dx_2 = $F3 ; 16-bit value (uses F4) - V = $ED ; 16-bit value (uses EE) - D = $EB ; 16-bit value (uses EC) - ;; These come from pixel.inc - ;; Takes up FF - F5 - .include "../pixel/pixel.inc" +.include "../pixel/pixel.inc" + ;; public args + X_end = ARGVEC + 2 + Y_end = ARGVEC + 3 + ;; private args + dx = $E0 + dy = $E2 + dy_2 = dy ; 16-bit value (uses E1) + dx_2 = dx ; 16-bit value (uses E3) + V = $E4 ; 16-bit value (uses E5) + D = $E6 ; 16-bit value (uses E7) diff --git a/wip-hugo/routines/line/line_test.s b/wip-hugo/routines/line/line_test.s index 1db169c..0e67891 100644 --- a/wip-hugo/routines/line/line_test.s +++ b/wip-hugo/routines/line/line_test.s @@ -3,7 +3,7 @@ ;; 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 @@ -48,9 +48,7 @@ end__: jmp @loop end: ;;Long lines - ;;Lets cleer bitmap - B_start = $FC ;16-bit value (uses FD) - B_end = $FE ;16-bit value (uses FF) + ;;Lets clear bitmap VIC_bank = $4000 VIC_bank_end = VIC_bank + $3FFF ;;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 diff --git a/wip-hugo/routines/memory/mem.inc b/wip-hugo/routines/memory/mem.inc index 0eb2250..60777b9 100644 --- a/wip-hugo/routines/memory/mem.inc +++ b/wip-hugo/routines/memory/mem.inc @@ -1,6 +1,6 @@ ;;; -*- Mode: asm; indent-tabs-mode: t; tab-width: 8 -*- -;;In use of in memcpy and memset - A_start = $FA ; 16-bit value (uses FB) - B_start = $FC ; 16-bit value (uses FD) - B_end = $FE ; 16-bit value (uses FF) + ;;Public args + A_start = $D0 ; 16-bit value (uses D1) + B_start = $D2 ; 16-bit value (uses D3) + B_end = $D4 ; 16-bit value (uses D5) diff --git a/wip-hugo/routines/pixel/pixel.inc b/wip-hugo/routines/pixel/pixel.inc index 91a68da..bd800df 100644 --- a/wip-hugo/routines/pixel/pixel.inc +++ b/wip-hugo/routines/pixel/pixel.inc @@ -1,6 +1,9 @@ - Y_pos = $FB - X_pos = $FC - byte_to_paint = $FE - btp_mem_pos = $F9 ; 16-bit value (uses FA), byte to paint memory position - C = $F7 ; 16-bit value (uses F8) - B = $F5 ; 16-bit value (uses F6) +;;; -*- Mode: asm; indent-tabs-mode: t; tab-width: 8 -*- + ;; public args + Y_pos = ARGVEC + 0 + X_pos = ARGVEC + 1 + ;; Private args + byte_to_paint = $E8 + btp_mem_pos = $E9 ; 16-bit value (uses EA), byte to paint memory position + C = $EB ; 16-bit value (uses EC) + B = $ED ; 16-bit value (uses EE)