make pixel drawing faster using lookup table
This commit is contained in:
parent
e89d566fbb
commit
017a337180
3 changed files with 5 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
|||
;;; -*- Mode: asm; indent-tabs-mode: t; tab-width: 8 -*-
|
||||
|
||||
;;Public args
|
||||
;; 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)
|
||||
|
|
|
@ -11,16 +11,9 @@
|
|||
AND #%00000111
|
||||
TAX
|
||||
|
||||
;;Store pixel in byte_to_paint
|
||||
LDA #%10000000
|
||||
INX
|
||||
@shift_btp: ;; check out SMB instruction here! //Hugo
|
||||
DEX
|
||||
BEQ end__;X=0 end this
|
||||
CLC
|
||||
ROR A
|
||||
jmp @shift_btp
|
||||
end__:
|
||||
# this is the same as: A = 2^X
|
||||
LDA binary_factor, X
|
||||
|
||||
STA byte_to_paint
|
||||
|
||||
;;FIND THE POSITION IN MEMORY TO WRITE PIXEL
|
||||
|
|
|
@ -18,3 +18,4 @@ JMP exit
|
|||
.include "routines/pixel/pixel_draw.s"
|
||||
.include "routines/memory/memset.s"
|
||||
.include "routines/memory/memcpy.s"
|
||||
.include "END.s"
|
||||
|
|
Loading…
Add table
Reference in a new issue