mirror of
https://github.com/RevCurtisP/C02.git
synced 2024-11-25 06:31:25 +00:00
20 lines
575 B
Plaintext
20 lines
575 B
Plaintext
;Atari 2600 Initialization Code - C02 Assembly Language File
|
|
; From CLEAN_START macro by Andrew Davie
|
|
; Standardised start-up code, clears stack, all TIA registers and RAM to 0
|
|
; Sets stack pointer to $FF, and all registers to 0
|
|
; Sets decimal mode off, sets interrupt flag (kind of un-necessary)
|
|
; Use as very first section of code on boot (ie: at reset)
|
|
; Code written to minimise total ROM usage - uses weird 6502 knowledge :)
|
|
|
|
START: SEI
|
|
CLD
|
|
LDX #0
|
|
TXA
|
|
TAY
|
|
STARTC: DEX
|
|
TXS
|
|
PHA
|
|
BNE STARTC
|
|
JMP MAIN
|
|
|