-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhello2.asm
45 lines (38 loc) · 816 Bytes
/
hello2.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
;Hello world for the zx-spectrum in z80 assembler
;by Chris Francis, [email protected]
;This version repeats forever
;'org' and 'ent' are directives probably specific to
;the Zeus assembler from Crystal Computing that I
;used to compile and test the code.
;defm might be aswell, but it just defines a series
;of bytes.
;It can be run by typing RANDOMIZE USR 32768
;in Spectrum Basic
ORG 32768
LD IY, 5C3Ah
RES 0, (IY+02)
RES 1, (IY+01)
LD HL, HELLO
LD A,22
RST 10h
LD A,0
RST 10h
LD A,0
RST 10h
LOOP LD A,(HL)
PUSH AF
PUSH HL
AND 7Fh
RST 10h
POP HL
INC HL
POP AF
BIT 7,A
JR Z, LOOP
LD A,13
RST 10h
LD HL, HELLO
JR LOOP
RET
HELLO DEFM /Hello World/
DEFB 161