-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDispMenu.asm
More file actions
58 lines (56 loc) · 789 Bytes
/
DispMenu.asm
File metadata and controls
58 lines (56 loc) · 789 Bytes
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
;display titles
ld HL, TitleLength
ld C, (HL)
ld B, C
ld HL, $0001
ld (pencol), HL
ld HL, titles
TitleDispLoop:
ld A, C
sub B
inc A
cp D
call Z, SetTI
call VPutS
res TextInverse, (IY + TextFlags)
ld A, (pencol)
inc A
ld (pencol), A
djnz TitleDispLoop
;display options
push DE
ld C, D
ld HL, optionLengths
xor A
OptionLengthLoop:
dec C
jr Z, OptionBreakLengthLoop
add A, (HL)
inc HL
jr OptionLengthLoop
OptionBreakLengthLoop:
ld C, (HL)
ld HL, options
ld B, A
or A
jr Z, Option0LoopSkip
Option0Loop:
inc HL
ld A, (HL)
or A
jr NZ, Option0Loop
inc HL
djnz Option0Loop
Option0LoopSkip:
ld B, C
ld E, $01
ld A, $00
OptionDispLoop:
add A, $06
ld D, A
ld (pencol), DE
call VputS
djnz OptionDispLoop
pop DE
;highlight option 1
call SelectOptionE