๐Ÿ•น๏ธ

ATARI 2600 ASSEMBLER

"Because 128 bytes of RAM should be enough for anybody."

6507 CPU
ROM:THEME:
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
58
59
60
61
62
63
64
65
66
67
68
; Solid Color Background ; Classic "Hello World" for Atari 2600 ; Sets the background color and draws a stable frame processor 6502 org $F000 Start: SEI ; Disable interrupts CLD ; Clear decimal mode LDX #$FF TXS ; Set stack pointer ; Clear zero page RAM LDA #0 LDX #$FF ClearMem: STA $00,X DEX BNE ClearMem MainLoop: ; โ”€โ”€ VSYNC (3 scanlines) โ”€โ”€ LDA #2 STA VSYNC ; Turn on VSYNC STA WSYNC ; Wait for scanline 1 STA WSYNC ; Wait for scanline 2 STA WSYNC ; Wait for scanline 3 LDA #0 STA VSYNC ; Turn off VSYNC ; โ”€โ”€ VBLANK (37 scanlines) โ”€โ”€ LDA #2 STA VBLANK ; Turn on VBLANK LDX #37 VBlankLoop: STA WSYNC DEX BNE VBlankLoop LDA #0 STA VBLANK ; Turn off VBLANK ; โ”€โ”€ VISIBLE AREA (192 scanlines) โ”€โ”€ LDA #$84 ; Color: blue STA COLUBK ; Set background color LDX #192 ScanLoop: STA WSYNC ; Wait for scanline DEX BNE ScanLoop ; โ”€โ”€ OVERSCAN (30 scanlines) โ”€โ”€ LDA #2 STA VBLANK ; Turn on VBLANK LDX #30 OverscanLoop: STA WSYNC DEX BNE OverscanLoop JMP MainLoop ; Back to top ; โ”€โ”€ Reset/Interrupt Vectors โ”€โ”€ org $FFFC .word Start ; Reset vector .word Start ; IRQ vector
Made with ๐Ÿ“ and questionable life choicesRemix on Berrry