-
Notifications
You must be signed in to change notification settings - Fork 0
/
ATARI_ATASM_SCREENRAM.asm
55 lines (40 loc) · 1.93 KB
/
ATARI_ATASM_SCREENRAM.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
; --------------------------------------------------------------------
; 6502 assembly on Atari.
; Built with eclipse/wudsn/atasm.
; "Hello, Whirled!" displayed by loading the text directly
; into screen memory from the file.
;
; There is no actual code doing work. This is accomplished by
; using the Atari's structured executable load file format to
; populate screen RAM directly from the file.
;
; --------------------------------------------------------------------
; $BC40 is the starting address of the screen RAM when
; there is 48K or more of memory and NO CARTRIDGE loaded.
;
SCREEN_RAM=$BC40
; --------------------------------------------------------------------
LOMEM_DOS_DUP = $3308 ; First usable memory after DOS and DUP
DOS_RUN_ADDR = $02e0 ; Execute at address stored here when file loading completes.
; --------------------------------------------------------------------
*=LOMEM_DOS_DUP ; Start program at first usable memory after DOS and DUP
; --------------------------------------------------------------------
; Yup, this is all the "program" there is. 3 bytes of JMP
PRG_START
Do_While_More_Electricity ; Infinite loop, otherwise the
jmp Do_While_More_Electricity ; program returns to DOS immediately.
; --------------------------------------------------------------------
; Create the display.
; Set load address to the screen RAM location and then load the data
; for the text directly into memory.
*=SCREEN_RAM
.sbyte "Hello, Whirled!" ; .sbyte is internal Atari format
; and that's it. Hello, Whirled! with no code.
; --------------------------------------------------------------------
; 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
.word PRG_START
; --------------------------------------------------------------------
.end ; finito