-
Notifications
You must be signed in to change notification settings - Fork 0
/
twsrbd.asm
58 lines (46 loc) · 1.86 KB
/
twsrbd.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
; --------------------------------------------------------------------
; 6502 assembly on Atari.
; Built with eclipse/wudsn/atasm.
;
; The World's Smallest Raster Bar Demo.
;
; Three instructions, 9 bytes of executing code.
; Load value of scan line counter.
; Write that value to the background color.
; do it again until there is no more electricity.
;
; https://github.com/kenjennings/Random-Acts-Of-Asm
; --------------------------------------------------------------------
;===============================================================================
; ATARI SYSTEM INCLUDES
;===============================================================================
; Various Include files that provide equates defining
; registers and the values used for the registers.
;
; For these include files refer to
; https://github.com/kenjennings/Atari-Atasm-Includes
;
.include "ANTIC.asm"
.include "GTIA.asm"
.include "POKEY.asm"
.include "PIA.asm"
.include "OS.asm"
.include "DOS.asm"
.include "macros.asm"
; --------------------------------------------------------------------
mDiskPoke SDMCTL, 0 ; turn off screen DMA
; --------------------------------------------------------------------
; LOMEM_DOS_DUP = $3308 ; First usable memory after DOS and DUP
*=LOMEM_DOS_DUP ; Start "program" after DOS and DUP
PRG_START
lda VCOUNT ; Load VCOUNT scan line counter
sta COLBK ; COLOR!
jmp PRG_START
; --------------------------------------------------------------------
; Store the program start location in the Atari DOS RUN Address.
; When DOS is done loading the executable file into memory it will
; automatically jump to the address placed here in DOS_RUN_ADDR.
; DOS_RUN_ADDR = $02e0 ; Execute at address stored here when file loading completes.
mDiskDPoke DOS_RUN_ADDR, PRG_START
; --------------------------------------------------------------------
.end ; finito