-
Notifications
You must be signed in to change notification settings - Fork 0
/
05-better-symbols.asm
40 lines (33 loc) · 1019 Bytes
/
05-better-symbols.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
; Example that is used in following article:
; Kouzlo minimalismu potřetí: vývoj her a dem pro slavné ZX Spectrum
; https://www.root.cz/clanky/kouzlo-minimalismu-potreti-vyvoj-her-a-dem-pro-slavne-zx-spectrum/
;
; This article is part of series:
; "Vývoj pro slavné ZX Spectrum"
; https://www.root.cz/serialy/vyvoj-pro-slavne-zx-spectrum/
;
; Repository:
; https://github.com/tisnik/8bit-fame
;
; Example #5:
; Symbolic names are usually written in uppercase
;
; This source code is available at:
; https://github.com/tisnik/8bit-fame/blob/master/Speccy-asm/05-better-symbols.asm
ATTRIBUTE_ADR equ $5800
ENTRY_POINT equ $8000
BLINK_BIT equ %10000000
INTENSITY_BIT equ %01000000
BLACK_COLOR equ %000
BLUE_COLOR equ %001
RED_COLOR equ %010
MAGENTA_COLOR equ %011
GREEN_COLOR equ %100
CYAN_COLOR equ %101
YELLOW_COLOR equ %110
WHITE_COLOR equ %111
org ENTRY_POINT
start:
ld a,BLINK_BIT | INTENSITY_BIT | (BLUE_COLOR << 3) | WHITE_COLOR
ld (ATTRIBUTE_ADR),a
ret