Untitled
unknown
plain_text
a year ago
1.5 kB
3
Indexable
ORG $60000 ; Set memory origin to address $60000 screen_width equ 320 ; Screen width in pixels screen_height equ 200 ; Screen height in pixels color equ $0FFF ; Example color value (white) start: move.w #color, d0 ; Load color value into register d0 move.l #screen_memory, a0 ; Load address of screen memory into register a0 moveq #0, d1 ; Clear jitter counter move.w #0, d2 ; Clear line counter draw_loop: move.b d0, (a0)+ ; Draw pixel with current color addq.w #1, d1 ; Increment jitter counter cmp.w #4, d1 ; Check if jitter counter reached maximum bne .skip_jitter ; If not, skip jitter effect addq.l #1, a0 ; Apply jitter effect (shift to the right) moveq #0, d1 ; Reset jitter counter .skip_jitter: cmp.w #screen_width, d1 ; Check if reached end of line bne .next_pixel ; If not, proceed to next pixel addq.w #1, d2 ; Increment line counter move.l #screen_memory, a0 ; Reset screen memory pointer to beginning of line add.l #screen_width, a0 ; Move to next line moveq #0, d1 ; Reset jitter counter .next_pixel: cmp.w #screen_height, d2 ; Check if reached end of screen bne draw_loop ; If not, continue drawing bra start ; Restart the effect screen_memory equ $0000 ; Address of screen memory END start
Editor is loading...
Leave a Comment