source/page01/routines.asm
author brandonlw
Thu, 22 May 2014 01:52:19 -0400
changeset 44 f4f75ec42b53
parent 43 source/page01/initial.asm@486c42a314bc
permissions -rw-r--r--
Basic page 1 cleanup.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
     1
p01sub_55B5:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
     2
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
     3
		out		(11h), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
     4
		jr		p01loc_55C6
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
     5
sOK:	call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
     6
		in		a, (11h)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
     7
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
     8
		in		a, (11h)
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
     9
p01loc_55C6:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
    10
		push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    11
		ld		a, (curXRow)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    12
		jr		p01loc_55DD
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
    13
p01sub_55CC:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
    14
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    15
		in		a, (11h)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
    16
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    17
		in		a, (11h)
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
    18
p01sub_55D6:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
    19
		push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    20
		ld		a, (curXRow)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    21
		add		a, 8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    22
		sub		b
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
    23
p01loc_55DD:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
    24
		call	p01sub_55E5
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
    25
		call	SetXUp
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    26
		pop		af
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
    27
		ret
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
    28
p01sub_55E5:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
    29
		call	SetYUp
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
    30
		cp		80h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    31
		ret		c
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
    32
		cp		0C0h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    33
		ret		nc
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
    34
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    35
		out		(10h), a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
    36
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
    37
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
    38
PutMap:	di
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
    39
		push	af
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
    40
		push	bc
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
    41
		push	de
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
    42
		push	hl
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
    43
		push	ix
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
    44
		res		plotDisp, (iy+plotFlags)
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
    45
		bit		appTextSave, (iy+appFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    46
		jr		z, p01loc_5609
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
    47
		call	getcurloc
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    48
		ld		(hl), a
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
    49
p01loc_5609:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    50
		or		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    51
		jr		z, p01loc_5610
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
    52
		cp		0F5h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    53
		jr		c, p01loc_5612
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
    54
p01loc_5610:
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
    55
		ld		a, 0D0h
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
    56
p01loc_5612:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    57
		ld		l, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    58
		ld		h, 0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    59
		add		hl, hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    60
		add		hl, hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    61
		add		hl, hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
    62
		call	Page0Call_3BC7
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
    63
		push	hl
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    64
		pop		ix
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    65
		ld		a, (curRow)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
    66
		call	MAKEROWCMD
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    67
		ld		(curXRow), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    68
		ld		a, (curRow+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    69
		and		1Fh
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
    70
		add		a, 20h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    71
		ld		b, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    72
		xor		a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
    73
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    74
		out		(10h), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    75
		ld		a, (curXRow)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
    76
		call	p01sub_55E5
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
    77
		call	SetXUp
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    78
		ld		a, b
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
    79
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    80
		out		(10h), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    81
		ld		b, 8
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
    82
p01loc_5646:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    83
		xor		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    84
		dec		b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    85
		jr		z, p01loc_564F
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    86
		ld		a, (ix+0)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    87
		inc		ix
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
    88
p01loc_564F:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    89
		inc		b
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
    90
		sla	a
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
    91
		bit		textInverse, (iy+textFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    92
		jr		z, p01loc_568D
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
    93
		xor		3Eh
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
    94
p01loc_565A:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
    95
		push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    96
		ld		a, (curRow+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    97
		and		1Fh
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    98
		jr		z, p01loc_568A
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
    99
		add		a, 1Fh
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   100
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   101
		out		(10h), a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   102
		call	p01sub_55CC
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   103
		or		1
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
   104
		bit		preClrForMode, (iy+newDispF)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   105
		jr		z, p01loc_5676
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   106
		and		3Eh
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   107
p01loc_5676:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   108
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   109
		out		(11h), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   110
		ld		a, (curRow+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   111
		and		1Fh
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   112
		add		a, 20h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   113
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   114
		out		(10h), a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   115
		call	p01sub_55D6
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   116
p01loc_568A:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   117
		pop		af
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   118
		jr		p01loc_5693
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   119
p01loc_568D:
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
   120
		bit		preClrForMode, (iy+newDispF)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   121
		jr		nz, p01loc_565A
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   122
p01loc_5693:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   123
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   124
		out		(11h), a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   125
		djnz	p01loc_5646
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   126
		ld		a, 1
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   127
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   128
		out		(10h), a
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   129
p01loc_56A1:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   130
		pop		ix
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   131
p01loc_56A3:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   132
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   133
		pop		de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   134
		pop		bc
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   135
		pop		af
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   136
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   137
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   138
PutC:	push	af
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   139
		push	hl
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   140
		cp		0D6h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   141
		jr		nz, p01loc_56C0
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   142
		call	EraseEOL
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   143
		call	newline
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   144
		ld		a, (winTop+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   145
		ld		l, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   146
		ld		a, (curRow)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   147
		cp		l
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   148
		jr		nc, p01loc_56D1
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   149
		ld		a, 3Ah
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   150
p01loc_56C0:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   151
		call	PutMap
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
   152
		res		preClrForMode, (iy+newDispF)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   153
		ld		hl, curCol
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   154
		inc		(hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   155
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   156
		cp		10h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   157
		call	nc, newline
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   158
p01loc_56D1:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   159
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   160
		pop		af
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   161
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   162
17
41d98670c2d3 Fix the page 0 labels to have the proper address in their name.
brandonlw
parents: 16
diff changeset
   163
Page01_3C75:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   164
		push	bc
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   165
p01loc_56D5:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   166
		ld		bc, (unk_839F)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   167
		ld		(OP1), bc
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   168
		ld		bc, (unk_83A1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   169
		ld		(OP1M), bc
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   170
		ld		hl, 848Dh
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   171
		ld		e, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   172
		ld		d, 0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   173
		add		hl, de
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   174
		push	de
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   175
		push	hl
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   176
		ld		b, a
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   177
p01loc_56EF:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   178
		ld		de, 0Ah
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   179
		push	hl
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   180
		push	bc
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   181
		rst		28h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   182
		.dw		80B1h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   183
		pop		bc
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   184
		pop		hl
29
1c4ed1f8d543 Eliminate all the unnecessary OPx equates.
brandonlw
parents: 25
diff changeset
   185
		ld		a, (OP2+3)
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   186
		add		a, 30h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   187
		ld		(hl), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   188
		dec		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   189
		djnz	p01loc_56EF
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   190
		sub		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   191
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   192
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   193
		ld		(hl), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   194
		ld		hl, 848Dh
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   195
		ld		a, 30h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   196
		pop		bc
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   197
		ld		b, c
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   198
		dec		b
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   199
p01loc_570E:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   200
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   201
		cp		(hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   202
		jr		nz, p01loc_5716
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   203
		ld		(hl), 20h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   204
		djnz	p01loc_570E
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   205
p01loc_5716:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   206
		ld		hl, OP3
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   207
		ld		a, c
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   208
		cp		7
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   209
		jr		nz, p01loc_5724
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   210
		ld		a, 20h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   211
		cp		(hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   212
		jr		nz, p01loc_5727
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   213
		inc		hl
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   214
p01loc_5724:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   215
		pop		bc
17
41d98670c2d3 Fix the page 0 labels to have the proper address in their name.
brandonlw
parents: 16
diff changeset
   216
		jr		Page01_3C81
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   217
p01loc_5727:
29
1c4ed1f8d543 Eliminate all the unnecessary OPx equates.
brandonlw
parents: 25
diff changeset
   218
		ld		a, (OP3+4)
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   219
		cp		35h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   220
		jr		nc, p01loc_573E
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   221
		ld		a, 4Bh
29
1c4ed1f8d543 Eliminate all the unnecessary OPx equates.
brandonlw
parents: 25
diff changeset
   222
		ld		(OP3+4), a
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   223
		xor		a
29
1c4ed1f8d543 Eliminate all the unnecessary OPx equates.
brandonlw
parents: 25
diff changeset
   224
		ld		(OP3+5), a
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   225
		ld		a, 20h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   226
		call	PutC
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   227
		jr		p01loc_5724
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   228
p01loc_573E:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   229
		ld		hl, 83A2h
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   230
		ld		a, 0F4h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   231
		add		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   232
		ld		(hl), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   233
		dec		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   234
		ld		a, 1
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   235
		adc	a, (hl)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   236
		ld		(hl), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   237
		dec		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   238
		ld		a, 0
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   239
		adc	a, (hl)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   240
		ld		(hl), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   241
		ld		a, c
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   242
		jr		p01loc_56D5
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   243
DispHL:	push	bc
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   244
		ld		de, 847Ch
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   245
		ld		b, 5
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   246
p01loc_5758:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   247
		call	DivHLBy10
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   248
		add		a, 30h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   249
		ld		(de), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   250
		dec		de
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   251
		djnz	p01loc_5758
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   252
		sub		a
29
1c4ed1f8d543 Eliminate all the unnecessary OPx equates.
brandonlw
parents: 25
diff changeset
   253
		ld		(OP1+5), a
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   254
		ex		de, hl
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   255
		ld		a, 30h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   256
		ld		b, 4
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   257
p01loc_576A:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   258
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   259
		cp		(hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   260
		jr		nz, p01loc_5772
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   261
		ld		(hl), 20h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   262
		djnz	p01loc_576A
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   263
p01loc_5772:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   264
		ld		hl, OP1
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   265
		pop		bc
17
41d98670c2d3 Fix the page 0 labels to have the proper address in their name.
brandonlw
parents: 16
diff changeset
   266
Page01_3C81:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   267
		push	bc
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   268
		push	af
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   269
p01loc_5778:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   270
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   271
		or		a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   272
		scf
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   273
		jr		z, p01loc_5791
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   274
		ld		a, (curRow+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   275
		cp		0Fh
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   276
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   277
		jr		c, p01loc_578B
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   278
		call	PutMap
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   279
		xor		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   280
		jr		p01loc_5791
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   281
p01loc_578B:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   282
		call	PutC
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   283
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   284
		jr		p01loc_5778
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   285
p01loc_5791:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   286
		pop		bc
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   287
		ld		a, b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   288
		pop		bc
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   289
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   290
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   291
PutS:	push	bc
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   292
		push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   293
		ld		a, (winTop+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   294
		ld		b, a
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   295
p01loc_579B:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   296
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   297
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   298
		or		a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   299
		scf
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   300
		jr		z, p01loc_57AA
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   301
		call	PutC
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   302
		ld		a, (curRow)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   303
		cp		b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   304
		jr		c, p01loc_579B
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   305
p01loc_57AA:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   306
		pop		bc
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   307
		ld		a, b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   308
		pop		bc
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   309
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   310
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   311
putpsb:	ld		b, (hl)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   312
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   313
		ld		a, b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   314
		or		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   315
		ret		z
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   316
		ld		a, (hl)
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   317
		cp		20h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   318
		jr		z, p01loc_57CB
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   319
		jr		p01loc_57C8
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   320
p01loc_57BA:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   321
		ld		a, (curRow+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   322
		cp		0Fh
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   323
		jr		c, p01loc_57C7
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   324
		ld		a, (hl)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   325
		call	PutMap
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   326
		jr		p01loc_57CB
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   327
p01loc_57C7:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   328
		ld		a, (hl)
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   329
p01loc_57C8:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   330
		call	PutC
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   331
p01loc_57CB:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   332
		inc		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   333
		djnz	p01loc_57BA
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   334
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   335
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   336
PutPS:	ld		b, (hl)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   337
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   338
		ld		a, b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   339
		or		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   340
		ret		z
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   341
p01loc_57D4:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   342
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   343
		inc		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   344
		call	PutC
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   345
		ld		a, (curRow)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   346
		ld		c, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   347
		ld		a, (winTop+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   348
		cp		c
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   349
		ret		z
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   350
		djnz	p01loc_57D4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   351
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   352
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   353
wputps:	ld		b, (hl)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   354
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   355
		ld		a, b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   356
		or		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   357
		ret		z
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   358
p01loc_57EA:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   359
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   360
		inc		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   361
		call	wputc
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   362
		ret		c
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   363
		djnz	p01loc_57EA
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   364
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   365
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   366
putbuf:	xor		a
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   367
putbuf1:bit		1, (iy+2Ah)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   368
		jr		z, p01loc_57FE
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
   369
		call	j_BCALL_4CC9
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   370
		ret
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   371
p01loc_57FE:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   372
		push	af
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   373
		push	de
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   374
		ld		hl, (editCursor)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   375
		ld		de, (editBtm)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   376
		call	CpHLDE
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   377
		jr		nz, p01loc_5824
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   378
		ld		a, (mcxCurApp)
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   379
		cp		42h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   380
		jr		nz, p01loc_5824
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   381
		ld		a, (curRow)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   382
		or		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   383
		jr		nz, p01loc_5824
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   384
		pop		de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   385
		ld		a, e
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   386
		call	PutMap
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
   387
		call	j_BufLeft
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   388
		ld		a, e
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   389
		pop		bc
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   390
		ret
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   391
p01loc_5824:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   392
		pop		de
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   393
		call	GETTOKSTRING
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   394
		push	hl
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   395
		ld		b, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   396
		inc		b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   397
		ld		hl, curCol
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   398
		ld		a, 10h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   399
		push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   400
		sub		(hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   401
		cp		b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   402
		jr		c, p01loc_583C
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   403
		pop		af
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   404
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   405
		ld		a, (curRow+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   406
		jr		p01loc_585F
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   407
p01loc_583C:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   408
		pop		af
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   409
		sub		b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   410
		ld		(hl), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   411
		pop		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   412
		push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   413
		ld		c, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   414
		ld		a, (winLeftEdge)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   415
		inc		c
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   416
		cp		c
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   417
		jr		c, p01loc_5860
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   418
		pop		hl
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   419
p01loc_584A:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   420
		pop		de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   421
		ld		a, 0Eh
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   422
		ld		(curRow+1), a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   423
		call	fdispEOL
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   424
		ld		a, 0Eh
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   425
		ld		(curRow+1), a
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
   426
		call	j_FDISPBOL
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   427
		ld		a, 0Eh
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   428
		jr		p01loc_5893
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   429
p01loc_585F:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   430
		push	af
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   431
p01loc_5860:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   432
		push	hl
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   433
		call	PutPS
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   434
		call	fdispEOL
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   435
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   436
		pop		bc
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   437
		ld		a, (curRow+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   438
		bit		1, (iy+0Eh)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   439
		jr		z, p01loc_5889
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   440
		cp		0Fh
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   441
		jr		nz, p01loc_5889
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   442
		ld		c, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   443
		pop		af
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   444
		ld		a, c
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   445
		jr		c, p01loc_588A
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   446
		push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   447
		ld		a, (winLeftEdge)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   448
		cp		b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   449
		jr		z, p01loc_584A
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   450
		ld		a, b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   451
		dec		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   452
		ld		(curRow+1), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   453
		jr		p01loc_585F
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   454
p01loc_5889:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   455
		pop		de
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   456
p01loc_588A:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   457
		push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   458
		ld		a, b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   459
		ld		(curRow+1), a
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
   460
		call	j_FDISPBOL1
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   461
		pop		af
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   462
p01loc_5893:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   463
		ld		(curRow+1), a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   464
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   465
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   466
wputc:	push	bc
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   467
		push	de
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   468
		push	hl
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   469
		ld		c, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   470
		ld		hl, (winRow)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   471
		ld		de, (winAbove)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   472
		or		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   473
		sbc		hl, de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   474
		jp		p, p01loc_58AE
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   475
p01loc_58A8:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   476
		set		2, (iy+0Eh)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   477
		jr		p01loc_5910
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   478
p01loc_58AE:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   479
		ld		a, (winTop+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   480
		ld		e, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   481
		ld		d, 0
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   482
		call	CpHLDE
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   483
		jr		c, p01loc_58C0
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   484
		scf
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   485
		set		3, (iy+0Eh)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   486
		jr		p01loc_5910
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   487
p01loc_58C0:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   488
		ld		a, l
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   489
		ld		hl, winTop
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   490
		cp		(hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   491
		jr		c, p01loc_58A8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   492
		ld		(curRow), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   493
		ld		hl, (winLeft)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   494
		ld		a, (winLeftEdge)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   495
		ld		e, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   496
		add		hl, de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   497
		ex		de, hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   498
		ld		hl, (winCol)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   499
		call	CpHLDE
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   500
		jp		m, p01loc_5914
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   501
		ld		hl, (winLeft)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   502
		ld		de, 10h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   503
		add		hl, de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   504
		ex		de, hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   505
		ld		hl, (winCol)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   506
		call	CpHLDE
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   507
		jp		p, p01loc_5928
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   508
		ld		de, (winLeft)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   509
		or		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   510
		sbc		hl, de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   511
		ld		a, l
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   512
		ld		hl, winLeftEdge
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   513
		cp		(hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   514
		jr		nz, p01loc_5901
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   515
		bit		0, (iy+0Eh)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   516
		jr		nz, p01loc_5909
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   517
p01loc_5901:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   518
		ld		(curRow+1), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   519
		ld		a, c
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   520
		call	PutC
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   521
		or		a
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   522
p01loc_5909:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   523
		ld		hl, (winCol)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   524
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   525
		ld		(winCol), hl
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   526
p01loc_5910:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   527
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   528
		pop		de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   529
		pop		bc
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   530
		ret
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   531
p01loc_5914:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   532
		or		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   533
		bit		0, (iy+0Eh)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   534
		jr		nz, p01loc_5909
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   535
		set		0, (iy+0Eh)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   536
		set		4, (iy+0Eh)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   537
		ld		a, (winLeftEdge)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   538
		jr		p01loc_5939
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   539
p01loc_5928:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   540
		scf
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   541
		bit		1, (iy+0Eh)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   542
		jr		nz, p01loc_5909
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   543
		set		1, (iy+0Eh)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   544
		set		5, (iy+0Eh)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   545
		ld		a, 0Fh
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   546
p01loc_5939:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   547
		ld		(curRow+1), a
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   548
		ld		a, 0CEh
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   549
		call	PutMap
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   550
		jr		p01loc_5909
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   551
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   552
wputs:	ld		de, (curRow)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   553
		push	de
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   554
p01loc_5948:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   555
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   556
		or		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   557
		jr		z, p01loc_5952
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   558
		call	wputc
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   559
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   560
		jr		nc, p01loc_5948
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   561
p01loc_5952:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   562
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   563
		ld		(curRow), hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   564
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   565
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   566
wputsEOL:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   567
		ld		de, (curRow)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   568
		push	de
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   569
p01loc_595C:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   570
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   571
		or		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   572
		jr		z, p01loc_5968
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   573
		call	wputc
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   574
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   575
		jr		nc, p01loc_595C
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   576
		jr		p01loc_596F
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   577
p01loc_5968:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   578
		ld		a, (curRow+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   579
		or		a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   580
		call	nz, EraseEOL
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   581
p01loc_596F:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   582
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   583
		ld		(curRow), hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   584
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   585
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   586
wdispEOL:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   587
		ld		hl, (curRow)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   588
		push	hl
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   589
		ld		hl, (editTail)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   590
		ld		de, (editBtm)
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   591
p01loc_597F:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   592
		call	CpHLDE
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   593
		jr		z, p01loc_598D
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   594
		ld		a, (hl)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   595
		call	wputc
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   596
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   597
		jr		nc, p01loc_597F
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   598
		jr		p01loc_5994
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   599
p01loc_598D:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   600
		ld		a, (curRow+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   601
		or		a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   602
		call	nz, EraseEOL
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   603
p01loc_5994:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   604
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   605
		ld		(curRow), hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   606
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   607
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   608
whomeup:ld		hl, 0
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   609
		call	CheckSplitFlag
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   610
		jr		z, p01loc_59A3
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   611
		ld		l, 4
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   612
p01loc_59A3:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   613
		ld		(winRow), hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   614
		ld		l, 0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   615
		ld		(winCol), hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   616
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   617
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   618
setNumWindow:
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   619
		call	whomeup
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   620
		ld		a, (curRow)
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
   621
		call	j_setwinabove
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   622
		ld		a, (curRow+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   623
		ld		(winLeftEdge), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   624
		ld		e, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   625
		ld		hl, 0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   626
		or		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   627
		sbc		hl, de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   628
		ld		(winLeft), hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   629
		res		1, (iy+0Eh)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   630
		res		0, (iy+0Eh)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   631
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   632
		push	de
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   633
		push	hl
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   634
		ld		l, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   635
		ld		h, 0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   636
		add		hl, hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   637
		add		hl, hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   638
		add		hl, hl
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
   639
		call	j_Load_SFont
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   640
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   641
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   642
		pop		de
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   643
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   644
17
41d98670c2d3 Fix the page 0 labels to have the proper address in their name.
brandonlw
parents: 16
diff changeset
   645
Page01_3CCF:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   646
		push	hl
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   647
		ld		a, (curRow)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   648
		ld		hl, winBtm
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   649
		cp		(hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   650
		pop		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   651
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   652
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   653
newline:push	af
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   654
		push	bc
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   655
		push	de
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   656
		push	hl
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   657
		push	ix
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   658
		sub		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   659
		ld		(curRow+1), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   660
		ld		hl, curRow
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   661
		ld		ix, winTop
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   662
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   663
		inc		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   664
		cp		(ix+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   665
		jr		c, p01loc_5A3B
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
   666
		bit		appAutoScroll, (iy+appFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   667
		jr		z, p01loc_5A3B
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
   668
		set		textScrolled, (iy+textFlags)
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
   669
		call	j_SCREENUP
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   670
		ld		a, e
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   671
		call	ClearRow
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   672
		ei
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
   673
		bit		appTextSave, (iy+appFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   674
		jr		z, p01loc_5A3C
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   675
		ld		a, (ix+0)
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   676
		call	ATimes16
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   677
		ld		l, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   678
		ld		h, 0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   679
		ld		de, textShadow
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   680
		add		hl, de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   681
		ld		e, l
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   682
		ld		d, h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   683
		ld		bc, 10h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   684
		add		hl, bc
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   685
		call	p01sub_5B68
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   686
		jr		z, p01loc_5A31
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   687
		ldir
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   688
p01loc_5A31:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   689
		ld		b, 10h
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   690
		ld		a, 20h
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   691
p01loc_5A35:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   692
		ld		(de), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   693
		inc		de
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   694
		djnz	p01loc_5A35
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   695
		jr		p01loc_5A3C
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   696
p01loc_5A3B:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   697
		ld		(hl), a
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   698
p01loc_5A3C:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   699
		jp		p01loc_56A1
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   700
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   701
p01sub_5A3F:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   702
		push	af
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   703
		push	de
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   704
		push	hl
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   705
		ld		a, 0Fh
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   706
		ld		(curRow+1), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   707
		ld		de, curRow
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   708
		ld		a, (de)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   709
		dec		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   710
		ld		hl, winTop
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   711
		cp		(hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   712
		jp		p, p01loc_5A5E
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
   713
		bit		appAutoScroll, (iy+appFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   714
		jr		z, p01loc_5A5E
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   715
		call	scrollDown
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   716
		jr		p01loc_5A5F
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   717
p01loc_5A5E:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   718
		ld		(de), a
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   719
p01loc_5A5F:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   720
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   721
		pop		de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   722
		pop		af
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   723
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   724
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   725
moveDown:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   726
		ld		a, (curRow)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   727
		inc		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   728
		ld		hl, winBtm
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   729
		cp		(hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   730
		jr		nc, scrollUp
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   731
		ld		(curRow), a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   732
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   733
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   734
scrollUp:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   735
		push	af
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   736
		push	bc
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   737
		push	de
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   738
		push	hl
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   739
		push	ix
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   740
		ld		ix, winTop
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
   741
		call	j_SCREENUP
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   742
		ld		a, e
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   743
		call	ClearRow
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   744
		ei
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
   745
		bit		appTextSave, (iy+appFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   746
		jp		z, p01loc_56A1
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   747
		ld		a, (ix+0)
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   748
		call	ATimes16
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   749
		ld		l, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   750
		ld		h, 0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   751
		ld		de, textShadow
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   752
		add		hl, de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   753
		ld		e, l
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   754
		ld		d, h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   755
		ld		bc, 10h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   756
		add		hl, bc
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   757
		call	p01sub_5B68
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   758
		jr		z, p01loc_5AA4
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   759
		ldir
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   760
p01loc_5AA4:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   761
		ld		b, 10h
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   762
		ld		a, 20h
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   763
p01loc_5AA8:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   764
		ld		(de), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   765
		inc		de
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   766
		djnz	p01loc_5AA8
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   767
		jp		p01loc_56A1
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   768
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   769
shrinkWindow:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   770
		ld		a, (curRow)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   771
		add		a, b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   772
		sub		7
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   773
		cp		1
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   774
		ret		m
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   775
		ld		b, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   776
		ld		hl, curRow
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   777
p01loc_5ABC:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   778
		call	scrollUp
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   779
		dec		(hl)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   780
		djnz	p01loc_5ABC
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   781
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   782
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   783
moveUp:	ld		a, (curRow)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   784
		dec		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   785
		ld		hl, winTop
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   786
		cp		(hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   787
		jp		m, scrollDown
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   788
		ld		(curRow), a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   789
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   790
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   791
p01sub_5AD2:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   792
		push	af
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   793
		push	bc
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   794
		push	de
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   795
		push	hl
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   796
		push	ix
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   797
		ld		hl, winBtm
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   798
		cp		(hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   799
		jr		nz, p01loc_5AE8
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   800
		call	scrollUp
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   801
		ld		hl, curRow
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   802
		dec		(hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   803
		jp		p01loc_56A1
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   804
p01loc_5AE8:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   805
		ld		hl, winTop
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   806
		ld		b, (hl)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   807
		push	bc
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   808
		ld		(hl), a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   809
		call	scrollDown
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   810
		pop		af
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   811
		ld		(hl), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   812
		jp		p01loc_56A1
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   813
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   814
scrollDown:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   815
		push	af
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   816
		push	bc
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   817
		push	de
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   818
		push	hl
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   819
		push	ix
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   820
		call	RunIndicOff
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
   821
		set		textScrolled, (iy+textFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   822
		ld		ix, winTop
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   823
		ld		a, (ix+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   824
		sub		(ix+0)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   825
		dec		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   826
		jr		nz, p01loc_5B19
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   827
		ld		a, (ix+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   828
		dec		a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   829
		call	MAKEROWCMD
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   830
		jr		p01loc_5B24
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   831
p01loc_5B19:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   832
		ld		b, a
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   833
		ld		c, 0F8h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   834
		ld		a, (ix+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   835
		dec		a
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
   836
		call	j_ScreenUpDown
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   837
		ld		a, e
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   838
p01loc_5B24:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   839
		call	ClearRow
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   840
		ei
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   841
		call	RunIndicOn
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
   842
		bit		appTextSave, (iy+appFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   843
		jr		z, p01loc_5B53
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   844
		ld		a, (ix+1)
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   845
		call	ATimes16
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   846
		ld		l, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   847
		ld		h, 0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   848
		ld		de, asm_ind_call
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   849
		add		hl, de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   850
		ld		e, l
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   851
		ld		d, h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   852
		ld		bc, 0FFF0h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   853
		add		hl, bc
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   854
		call	p01sub_5B68
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   855
		jr		z, p01loc_5B4B
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   856
		lddr
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   857
p01loc_5B4B:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   858
		ld		b, 10h
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   859
		ld		a, 20h
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   860
p01loc_5B4F:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   861
		ld		(de), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   862
		dec		de
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   863
		djnz	p01loc_5B4F
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   864
p01loc_5B53:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   865
		jp		p01loc_56A1
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   866
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   867
#ifndef DEVIATE_FROM_ORIGINAL_FILE
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   868
;Apparently not referenced anywhere.
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   869
		ld		a, (ix+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   870
		sub		(ix+0)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   871
		dec		a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   872
		push	hl
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   873
		push	de
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   874
		ld		b, a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   875
		call	p01sub_6100
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   876
		ld		b, h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   877
		ld		c, l
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   878
		pop		de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   879
		pop		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   880
		ret
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   881
#endif
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   882
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   883
p01sub_5B68:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   884
		ld		a, (ix+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   885
		sub		(ix+0)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   886
		dec		a
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   887
		call	ATimes16
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   888
		ld		c, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   889
		ld		b, 0
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   890
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   891
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   892
ClrLCDFull:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   893
		push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   894
		ld		hl, 8A02h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   895
		push	hl
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   896
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   897
		and		1
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   898
		push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   899
		res		0, (hl)
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   900
		ld		b, 80h
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   901
		ld		a, 0B8h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   902
		jr		p01loc_5BAB
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   903
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   904
ClrLCD:	push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   905
		ld		hl, 8A02h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   906
		push	hl
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   907
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   908
		and		1
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   909
		push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   910
		res		0, (hl)
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   911
		ld		a, 0B8h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   912
		push	af
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   913
		ld		b, 80h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   914
		call	CheckSplitFlag
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   915
		jr		z, p01loc_5BAA
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   916
		ld		b, 0A0h
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
   917
		bit		plotDisp, (iy+plotFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   918
		jr		z, p01loc_5BAA
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   919
		pop		af
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   920
		ld		a, 98h
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   921
		ld		b, 80h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   922
		push	af
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   923
p01loc_5BAA:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   924
		pop		af
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   925
p01loc_5BAB:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   926
		di
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   927
p01loc_5BAC:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   928
		push	bc
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   929
		push	af
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   930
		call	ClearRow
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   931
		pop		af
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   932
		sub		8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   933
		pop		bc
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   934
		cp		b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   935
		jr		nc, p01loc_5BAC
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   936
		ei
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   937
		pop		af
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   938
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   939
		or		(hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   940
		ld		(hl), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   941
		pop		af
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   942
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   943
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   944
p01sub_5BBF:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   945
		push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   946
		ld		a, i
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   947
		push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   948
		ld		hl, 8A02h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   949
		push	hl
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   950
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   951
		and		1
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   952
		push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   953
		res		0, (hl)
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   954
		ld		a, 0B8h
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   955
		ld		b, 80h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   956
		di
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   957
p01loc_5BD2:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   958
		push	bc
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   959
		push	af
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   960
		call	ClearRow
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   961
		pop		af
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   962
		sub		8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   963
		pop		bc
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   964
		cp		b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   965
		jr		nc, p01loc_5BD2
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   966
		pop		af
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   967
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   968
		or		(hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   969
		ld		(hl), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   970
		pop		af
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   971
		jp		po, p01loc_5BE7
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   972
		ei
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   973
p01loc_5BE7:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   974
		pop		af
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   975
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   976
17
41d98670c2d3 Fix the page 0 labels to have the proper address in their name.
brandonlw
parents: 16
diff changeset
   977
Page01_3D05:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   978
		call	p01sub_5BBF
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   979
		jr		p01loc_5BF6
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   980
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   981
ClrScrnFull:
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   982
		call	ClrLCDFull
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   983
		jr		p01loc_5BF6
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   984
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   985
ClrScrn:
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   986
		call	ClrLCD
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
   987
p01loc_5BF6:
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
   988
		bit		appTextSave, (iy+appFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   989
		ret		z
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   990
ClrTxtShd:
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   991
		ld		bc, 7Fh
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   992
		ld		de, 8509h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
   993
		ld		hl, textShadow
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
   994
		ld		(hl), 20h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   995
		ldir
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   996
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   997
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   998
ClrWindow:
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
   999
		call	HomeUp
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1000
		ld		a, (winTop+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1001
		dec		a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1002
		call	MAKEROWCMD
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1003
		push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1004
		ld		a, (winTop)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1005
		call	MAKEROWCMD
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1006
		di
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1007
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1008
p01loc_5C1B:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1009
		call	ClearRow
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1010
		pop		af
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1011
		cp		d
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1012
		jr		z, p01loc_5C28
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1013
		push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1014
		ld		a, d
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1015
		add		a, 8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1016
		jr		p01loc_5C1B
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1017
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1018
p01loc_5C28:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1019
		ei
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  1020
		bit		appTextSave, (iy+appFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1021
		ret		z
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1022
		ld		a, (winTop)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1023
		ld		b, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1024
		ld		a, (winTop+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1025
		sub		b
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1026
		call	ATimes16
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1027
		dec		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1028
		ld		c, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1029
		ld		a, (winTop)
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1030
		call	ATimes16
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1031
		ld		l, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1032
		ld		h, 0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1033
		ld		b, h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1034
		ld		de, textShadow
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1035
		add		hl, de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1036
		ld		e, l
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1037
		ld		d, h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1038
		inc		de
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1039
		ld		(hl), 20h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1040
		ldir
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1041
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1042
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1043
EraseEOL:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1044
		push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1045
		bit		1, (iy+2Ah)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1046
		jr		z, p01loc_5C5D
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1047
		pop		af
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
  1048
		call	j_VEraseEOL
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1049
		ret
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1050
p01loc_5C5D:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1051
		push	bc
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1052
		push	de
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1053
		push	hl
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1054
		ld		a, (curRow+1)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1055
		push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1056
		sub		10h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1057
		jr		nc, p01loc_5C79
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1058
		neg
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1059
		ld		b, a
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1060
		ld		a, 20h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1061
		dec		b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1062
		jr		z, p01loc_5C75
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1063
p01loc_5C70:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1064
		call	PutC
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1065
		djnz	p01loc_5C70
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1066
p01loc_5C75:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1067
		call	PutMap
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1068
		ei
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1069
p01loc_5C79:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1070
		pop		af
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1071
		ld		(curRow+1), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1072
		jp		p01loc_56A3
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1073
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1074
EraseEOW:
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1075
		push	af
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1076
		push	hl
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1077
		ld		hl, (curRow)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1078
		push	hl
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1079
		ld		a, l
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1080
		ld		hl, winBtm
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1081
		sub		(hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1082
		jr		z, p01loc_5C98
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1083
p01loc_5C8D:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1084
		call	EraseEOL
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1085
		inc		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1086
		jr		z, p01loc_5C98
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1087
		call	newline
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1088
		jr		p01loc_5C8D
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1089
p01loc_5C98:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1090
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1091
		ld		(curRow), hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1092
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1093
		pop		af
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1094
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1095
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1096
HomeUp:	push	hl
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1097
		ld		hl, (winTop)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1098
		ld		h, 0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1099
		ld		(curRow), hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1100
		pop		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1101
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1102
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1103
getcurloc:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1104
		push	af
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1105
		push	bc
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1106
		push	de
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1107
		ld		hl, (curRow)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1108
		ld		a, l
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1109
		call	ATimes16
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1110
		add		a, h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1111
		ld		l, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1112
		ld		h, 0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1113
		ld		de, textShadow
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1114
		add		hl, de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1115
		pop		de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1116
		pop		bc
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1117
		pop		af
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1118
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1119
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1120
VPutMapRec:
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1121
		call	p01sub_5CCC
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1122
		res		6, (iy+32h)
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  1123
		res		fracDrawLFont, (iy+fontFlags)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1124
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1125
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1126
p01sub_5CCC:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1127
		push	bc
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1128
		ld		b, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1129
		ld		a, i
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1130
		push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1131
		ld		a, b
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1132
		di
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1133
		push	hl
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  1134
		res		fracDrawLFont, (iy+fontFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1135
		cp		8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1136
		jr		z, p01loc_5D19
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  1137
		res		fracDrawLFont, (iy+fontFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1138
		jr		p01loc_5D19
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1139
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1140
LoadPattern:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1141
		ld		l, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1142
		ld		h, 0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1143
		add		hl, hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1144
		add		hl, hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1145
		add		hl, hl
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  1146
		bit		fracDrawLFont, (iy+fontFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1147
		jr		z, p01loc_5CF2
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1148
		call	Page0Call_3C03
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1149
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1150
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1151
p01loc_5CF2:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1152
		bit		6, (iy+32h)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1153
		jr		z, p01loc_5D0A
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1154
		call	Page0Call_3BC7
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1155
		ld		de, 8461h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1156
		ld		hl, 8460h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1157
		ld		bc, 7
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1158
		lddr
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1159
		ex		de, hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1160
		ld		(hl), 5
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1161
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1162
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1163
p01loc_5D0A:
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
  1164
		call	j_Load_SFont
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1165
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1166
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1167
VPutMap:push	bc
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1168
		ld		b, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1169
		ld		a, i
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1170
		push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1171
		ld		a, b
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1172
		di
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1173
		push	hl
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1174
		call	LoadPattern
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1175
p01loc_5D19:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1176
		push	hl
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1177
		pop		ix
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1178
		ld		e, (ix+0)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1179
		ld		d, 0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1180
		ld		hl, LCDTable-1
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1181
		add		hl, de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1182
		ld		d, (hl)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1183
		push	de
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1184
		ld		a, (penCol+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1185
		ld		b, a
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1186
		or		80h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1187
		ld		(curXRow), a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1188
		call	p01sub_55E5
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1189
		call	SetXUp
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1190
		call	p01sub_6100
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1191
		ld		a, (penCol)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1192
		ld		e, a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1193
		srl	a
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1194
		srl	a
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1195
		srl	a
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1196
		or		20h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1197
		ld		(curY), a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1198
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1199
		out		(10h), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1200
		ld		d, 0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1201
		add		hl, de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1202
		ld		a, e
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1203
		pop		de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1204
		add		a, e
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  1205
		bit		write_on_graph, (iy+sGrFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1206
		jr		z, p01loc_5D6C
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1207
		call	Bit_VertSplit
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1208
		jr		z, p01loc_5D6C
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1209
		bit		3, (iy+11h)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1210
		jr		nz, p01loc_5D68
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1211
		cp		30h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1212
		jr		p01loc_5D82
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1213
p01loc_5D68:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1214
		cp		17h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1215
		jr		p01loc_5D82
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1216
p01loc_5D6C:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1217
		bit		3, (iy+11h)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1218
		jr		z, p01loc_5D76
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1219
		cp		30h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1220
		jr		p01loc_5D82
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1221
p01loc_5D76:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1222
		bit		4, (iy+24h)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1223
		jr		z, p01loc_5D80
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1224
		cp		61h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1225
		jr		p01loc_5D82
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1226
p01loc_5D80:
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1227
		cp		60h
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1228
p01loc_5D82:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1229
		ccf
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1230
		jp		c, p01loc_5E78
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1231
		push	de
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1232
		ld		(penCol), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1233
		ld		a, l
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1234
		and		7
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1235
		ld		c, a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1236
		srl	h
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1237
		rr	l
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1238
		srl	h
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1239
		rr	l
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1240
		srl	h
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1241
		rr	l
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1242
		ld		de, plotSScreen
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1243
		add		hl, de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1244
		pop		de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1245
		ld		a, (customHeight)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1246
		ld		b, a
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  1247
		bit		customFont, (iy+fontFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1248
		jr		nz, p01loc_5DC0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1249
		ld		b, 7
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1250
		bit		6, (iy+32h)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1251
		jr		nz, p01loc_5DC0
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  1252
		bit		fracDrawLFont, (iy+fontFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1253
		jr		nz, p01loc_5DBF
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1254
		ld		b, 6
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  1255
		bit		textEraseBelow, (iy+textFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1256
		jr		z, p01loc_5DC0
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1257
p01loc_5DBF:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1258
		inc		b
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1259
p01loc_5DC0:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1260
		ld		a, 8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1261
		sub		c
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1262
		sub		(ix+0)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1263
		inc		ix
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1264
		jp		m, p01loc_5E0E
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1265
		ld		c, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1266
		inc		c
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1267
p01loc_5DCD:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1268
		push	bc
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1269
		ld		b, c
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1270
		ld		a, (hl)
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  1271
		bit		textWrite, (iy+sGrFlags)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1272
		call	z, sOK
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1273
		jr		p01loc_5DDA
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1274
p01loc_5DD9:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1275
		rrca
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1276
p01loc_5DDA:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1277
		djnz	p01loc_5DD9
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1278
		call	p01sub_5E81
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1279
		jr		p01loc_5DE2
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1280
p01loc_5DE1:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1281
		rlca
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1282
p01loc_5DE2:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1283
		djnz	p01loc_5DE1
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  1284
		bit		textWrite, (iy+sGrFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1285
		jr		z, p01loc_5DF4
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1286
		ld		(hl), a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1287
		push	de
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1288
		ld		de, 0Ch
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1289
		add		hl, de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1290
		pop		de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1291
		pop		bc
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1292
		jr		p01loc_5E03
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1293
p01loc_5DF4:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1294
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1295
		out		(11h), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1296
		ld		hl, curXRow
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1297
		inc		(hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1298
		pop		bc
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1299
		ld		a, (hl)
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1300
		cp		0C0h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1301
		jr		nc, p01loc_5E05
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1302
p01loc_5E03:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1303
		djnz	p01loc_5DCD
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1304
p01loc_5E05:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1305
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1306
		pop		af
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1307
		jp		po, p01loc_5E0B
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1308
		ei
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1309
p01loc_5E0B:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1310
		pop		bc
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1311
		xor		a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1312
		ret
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1313
p01loc_5E0E:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1314
		neg
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1315
		ld		c, a
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1316
p01loc_5E11:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1317
		push	bc
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1318
		ld		b, c
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  1319
		bit		textWrite, (iy+sGrFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1320
		jr		z, p01loc_5E1E
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1321
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1322
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1323
		ld		e, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1324
		jr		p01loc_5E30
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1325
p01loc_5E1E:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1326
		call	sOK
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1327
		push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1328
		ld		a, (curY)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1329
		inc		a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1330
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1331
		out		(10h), a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1332
		call	sOK
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1333
		ld		e, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1334
		pop		af
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1335
p01loc_5E30:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1336
		sla	e
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1337
		rla
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1338
		jr		nc, p01loc_5E36
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1339
		inc		e
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1340
p01loc_5E36:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1341
		djnz	p01loc_5E30
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1342
		call	p01sub_5E81
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1343
p01loc_5E3B:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1344
		srl	a
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1345
		rr	e
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1346
		jr		nc, p01loc_5E43
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1347
		add		a, 80h
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1348
p01loc_5E43:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1349
		djnz	p01loc_5E3B
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  1350
		bit		textWrite, (iy+sGrFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1351
		jr		z, p01loc_5E57
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1352
		ld		(hl), e
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1353
		dec		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1354
		ld		(hl), a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1355
		push	de
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1356
		ld		de, 0Ch
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1357
		add		hl, de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1358
		pop		de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1359
		pop		bc
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1360
		jr		p01loc_5E74
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1361
p01loc_5E57:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1362
		push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1363
		ld		a, e
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1364
		call	p01sub_55B5
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1365
		ld		a, (curY)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1366
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1367
		out		(10h), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1368
		pop		af
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1369
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1370
		out		(11h), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1371
		ld		hl, curXRow
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1372
		inc		(hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1373
		pop		bc
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1374
		ld		a, (hl)
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1375
		cp		0C0h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1376
		jr		nc, p01loc_5E05
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1377
p01loc_5E74:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1378
		djnz	p01loc_5E11
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1379
		jr		p01loc_5E05
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1380
p01loc_5E78:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1381
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1382
		pop		af
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1383
		jp		po, p01loc_5E7E
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1384
		ei
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1385
p01loc_5E7E:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1386
		pop		bc
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1387
		scf
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1388
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1389
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1390
p01sub_5E81:
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  1391
		bit		textInverse, (iy+textFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1392
		jr		z, p01loc_5E8E
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1393
		ld		b, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1394
		ld		a, 0FFh
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1395
		xor		d
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1396
		or		b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1397
		jr		p01loc_5E8F
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1398
p01loc_5E8E:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1399
		and		d
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1400
p01loc_5E8F:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1401
		xor		(ix+0)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1402
		inc		ix
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1403
		ld		b, c
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1404
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1405
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1406
LCDTable:
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1407
		.db		0FEh
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1408
		.db		0FCh
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1409
		.db		0F8h
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1410
		.db		0F0h
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1411
		.db		0E0h
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1412
		.db		0C0h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1413
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1414
VPutS:	push	af
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1415
		push	de
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1416
		push	ix
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1417
p01loc_5EA0:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1418
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1419
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1420
		or		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1421
		jr		z, p01loc_5EAA
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1422
		call	VPutMap
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1423
		jr		nc, p01loc_5EA0
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1424
p01loc_5EAA:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1425
		pop		ix
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1426
		pop		de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1427
		pop		af
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1428
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1429
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1430
VPutSN:	push	af
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1431
		push	de
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1432
		push	ix
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1433
p01loc_5EB3:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1434
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1435
		inc		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1436
		call	VPutMap
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1437
		jr		c, p01loc_5EBC
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1438
		djnz	p01loc_5EB3
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1439
p01loc_5EBC:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1440
		pop		ix
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1441
		pop		de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1442
		pop		af
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1443
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1444
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1445
vputsnG:scf
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1446
		push	af
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1447
		push	de
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1448
		push	ix
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1449
p01loc_5EC6:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1450
		bit		4, (iy+11h)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1451
		jr		z, p01loc_5F15
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1452
		ld		a, (hl)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1453
		push	hl
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1454
		push	bc
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1455
		ld		l, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1456
		ld		h, 0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1457
		add		hl, hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1458
		add		hl, hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1459
		add		hl, hl
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
  1460
		call	j_SFont_Len
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1461
		ld		a, (penCol)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1462
		add		a, b
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1463
		call	Bit_VertSplit
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1464
		jr		z, p01loc_5EEF
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1465
		bit		3, (iy+11h)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1466
		jr		nz, p01loc_5EEB
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1467
		cp		2Ch
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1468
		jr		p01loc_5EFB
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1469
p01loc_5EEB:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1470
		cp		14h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1471
		jr		p01loc_5EFB
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1472
p01loc_5EEF:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1473
		bit		3, (iy+11h)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1474
		jr		z, p01loc_5EF9
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1475
		cp		2Ch
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1476
		jr		p01loc_5EFB
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1477
p01loc_5EF9:
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1478
		cp		5Ch
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1479
p01loc_5EFB:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1480
		ccf
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1481
		jr		nc, p01loc_5F13
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1482
		ld		a, 0CEh
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1483
		call	VPutMap
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1484
		pop		bc
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1485
		pop		hl
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1486
p01loc_5F05:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1487
		pop		ix
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1488
		pop		de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1489
		pop		af
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1490
		res		6, (iy+32h)
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  1491
		res		fracDrawLFont, (iy+fontFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1492
		or		a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1493
		ret
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1494
p01loc_5F13:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1495
		pop		bc
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1496
		pop		hl
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1497
p01loc_5F15:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1498
		bit		4, (iy+24h)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1499
		jr		z, p01loc_5F1F
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  1500
		set		fracDrawLFont, (iy+fontFlags)
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1501
p01loc_5F1F:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1502
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1503
		inc		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1504
		call	VPutMap
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1505
		jr		c, p01loc_5F05
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1506
		djnz	p01loc_5EC6
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  1507
		res		fracDrawLFont, (iy+fontFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1508
		jr		p01loc_5EBC
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1509
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1510
vputsnT:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1511
		ld		a, (hl)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1512
		push	hl
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1513
		push	bc
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1514
		ld		l, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1515
		ld		h, 0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1516
		add		hl, hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1517
		add		hl, hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1518
		add		hl, hl
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
  1519
		call	j_SFont_Len
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1520
		ld		a, (penCol)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1521
		add		a, b
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1522
		cp		5Ch
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1523
		ccf
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1524
		jr		nc, p01loc_5F4C
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1525
		ld		a, 0CEh
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1526
		call	VPutMap
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1527
		pop		bc
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1528
		pop		hl
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1529
p01loc_5F4A:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1530
		or		a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1531
		ret
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1532
p01loc_5F4C:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1533
		pop		bc
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1534
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1535
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1536
		inc		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1537
		call	VPutMap
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1538
		jr		c, p01loc_5F4A
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1539
		djnz	vputsnT
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1540
		scf
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1541
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1542
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1543
RunIndicOn:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1544
		push	af
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1545
		push	bc
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1546
		push	de
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1547
		push	hl
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1548
		ld		a, 0F0h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1549
		ld		(indicBusy), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1550
		ld		a, 1
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1551
		ld		(indicCounter), a
22
dea09e588bf1 Cleanup of page 0's boot.asm.
brandonlw
parents: 19
diff changeset
  1552
		call	HandleRunIndicator
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1553
		ei
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  1554
		set		indicRun, (iy+indicFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1555
		jp		p01loc_56A3
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1556
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1557
RunIndicOff:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1558
		push	bc
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1559
		push	de
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1560
		push	hl
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  1561
		res		indicRun, (iy+indicFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1562
		ld		b, 8
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1563
		call	p01sub_60C2
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1564
		ld		d, a
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1565
p01loc_5F7F:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1566
		ld		a, d
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1567
		call	p01sub_55E5
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1568
		call	SetXUp
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1569
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1570
		in		a, (11h)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1571
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1572
		in		a, (11h)
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1573
		and		0FEh
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1574
		ld		e, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1575
		ld		a, d
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1576
		call	p01sub_55E5
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1577
		call	SetXUp
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1578
		ld		a, e
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1579
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1580
		out		(11h), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1581
		inc		d
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1582
		djnz	p01loc_5F7F
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1583
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1584
		pop		de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1585
		pop		bc
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1586
		ei
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1587
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1588
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1589
saveCmdShadow:
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1590
		call	saveShadow
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1591
		ld		de, cmdShadow
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1592
		ld		hl, textShadow
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1593
		ld		bc, 80h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1594
		ldir
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1595
		ld		hl, (curRow)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1596
		ld		(cmdShadCur), hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1597
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1598
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1599
saveShadow:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1600
		ld		hl, (curRow)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1601
		ld		(textShadCur), hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1602
		ld		a, (winTop)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1603
		ld		(textShadTop), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1604
		ld		a, (unk_8A02)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1605
		ld		(textShadAlph), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1606
		ld		a, (unk_89F5)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1607
		and		10h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1608
		ld		(textShadIns), a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1609
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1610
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1611
#ifndef DEVIATE_FROM_ORIGINAL_FILE
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1612
		ld		a, (textShadTop)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1613
		ld		(winTop), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1614
		ld		a, 8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1615
		ld		hl, menuAppDepth
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1616
		sub		(hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1617
		cp		6
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1618
		jr		nc, p01loc_5FEA
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1619
		ld		a, 6
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1620
p01loc_5FEA:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1621
		ld		(winTop+1), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1622
		ld		hl, 0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1623
		jr		p01loc_601B
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1624
#endif
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1625
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1626
rstrShadow:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1627
		ld		a, (textShadTop)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1628
		ld		(winTop), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1629
		ld		a, 8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1630
		ld		hl, menuAppDepth
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1631
		sub		(hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1632
		cp		6
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1633
		jr		nc, p01loc_6004
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1634
		ld		a, 6
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1635
p01loc_6004:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1636
		ld		(winTop+1), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1637
		ld		hl, 0
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1638
		call	CheckSplitFlag
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1639
		jr		z, p01loc_601B
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1640
		sub		4
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1641
		ld		l, 4
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1642
		ld		(curRow), hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1643
		ld		hl, 8548h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1644
		jr		p01loc_6021
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1645
p01loc_601B:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1646
		ld		(curRow), hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1647
		ld		hl, textShadow
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1648
p01loc_6021:
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1649
		call	ATimes16
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1650
		ld		b, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1651
		dec		b
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1652
p01loc_6026:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1653
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1654
		inc		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1655
		call	PutC
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1656
		djnz	p01loc_6026
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1657
		ld		a, (hl)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1658
		call	PutMap
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1659
BCALL_4D6B:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1660
		ld		hl, (textShadCur)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1661
		ld		(curRow), hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1662
		ld		a, (textShadAlph)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1663
		ld		(unk_8A02), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1664
		ld		a, (textShadIns)
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1665
		and		0EFh
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1666
		ld		hl, 89F5h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1667
		or		(hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1668
		ld		(hl), a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1669
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1670
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1671
rstrpartial:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1672
		ld		a, (textShadTop)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1673
		ld		(winTop), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1674
		ld		a, 8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1675
		ld		(winTop+1), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1676
		jr		BCALL_4D6B
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1677
rstrCurRow:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1678
		ld		hl, (textShadCur)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1679
		ld		h, 0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1680
		ld		(curRow), hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1681
		call	getcurloc
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1682
		ld		b, 0Fh
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1683
		jr		p01loc_6026
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1684
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1685
rstrUnderMenu:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1686
		ld		a, (curRow)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1687
		cp		6
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1688
		ret		c
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1689
		ld		hl, (curRow)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1690
		push	hl
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1691
		sub		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1692
		ld		(curRow+1), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1693
		ld		b, 0Fh
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1694
		call	getcurloc
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1695
p01loc_6077:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1696
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1697
		inc		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1698
		call	PutC
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1699
		djnz	p01loc_6077
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1700
		ld		a, (hl)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1701
		call	PutMap
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1702
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1703
		ld		(curRow), hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1704
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1705
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1706
rstrbotrow:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1707
		ld		hl, (curRow)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1708
		push	hl
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1709
		sub		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1710
		ld		(curRow+1), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1711
		ld		b, 0Fh
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1712
		ld		hl, 978Fh
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1713
		jr		p01loc_6077
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1714
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1715
saveTR:	bit		indicInUse, (iy+indicFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1716
		ret		nz
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1717
		push	af
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1718
		push	bc
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1719
		push	de
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1720
		push	hl
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1721
		push	ix
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  1722
		set		indicInUse, (iy+indicFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1723
		ld		b, 8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1724
		ld		ix, indicMem
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1725
		call	p01sub_60C2
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1726
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1727
		in		a, (11h)
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1728
p01loc_60B3:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1729
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1730
		in		a, (11h)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1731
		ld		(ix+0),	a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1732
		inc		ix
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1733
		djnz	p01loc_60B3
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1734
		jp		p01loc_56A1
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1735
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1736
p01sub_60C2:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1737
		di
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1738
		ld		a, 2Bh
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1739
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1740
		out		(10h), a
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1741
		ld		a, 80h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1742
		call	p01sub_55E5
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1743
		call	SetXUp
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1744
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1745
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1746
restoreTR:
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  1747
		bit		indicInUse, (iy+indicFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1748
		ret		z
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1749
		push	af
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1750
		push	bc
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1751
		push	de
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1752
		push	hl
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1753
		push	ix
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1754
		ld		b, 8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1755
		ld		ix, indicMem
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1756
		call	p01sub_60C2
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1757
p01loc_60E7:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1758
		ld		a, (ix+0)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1759
		inc		ix
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1760
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1761
		out		(11h), a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1762
		djnz	p01loc_60E7
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  1763
		res		indicInUse, (iy+indicFlags)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1764
		ei
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1765
		jp		p01loc_56A1
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1766
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1767
ATimes16:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1768
		add		a, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1769
		add		a, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1770
		add		a, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1771
		add		a, a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1772
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1773
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1774
p01sub_6100:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1775
		inc		b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1776
		ld		hl, 0
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1777
		ld		de, 60h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1778
		jr		p01loc_610A
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1779
p01loc_6109:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1780
		add		hl, de
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1781
p01loc_610A:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1782
		djnz	p01loc_6109
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1783
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1784
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1785
GetKeyPress:
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1786
		call	GETTOKSTRING
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1787
		dec		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1788
		ld		a, (hl)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1789
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1790
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1791
GetTokLen:
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1792
		call	GETTOKSTRING
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1793
		ld		a, (hl)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1794
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1795
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1796
GET_TOK_STRNG:
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1797
		push	hl
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
  1798
		call	j_BUFPEEK3
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1799
		call	GETTOKSTRING
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1800
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1801
		ld		c, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1802
		ld		b, 0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1803
		inc		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1804
		push	bc
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1805
		ld		de, OP3
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1806
		ldir
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1807
		ex		de, hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1808
		ld		(hl), 0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1809
		pop		bc
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1810
		pop		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1811
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1812
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1813
GETTOKSTRING:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1814
		ld		l, e
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1815
		ld		h, 0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1816
		ld		a, d
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1817
		or		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1818
		jr		z, p01loc_61A6
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1819
		ld		de, StringTable4200
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1820
		cp		5Dh
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1821
		jr		c, p01loc_61A9
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1822
		ld		de, StringTable4214
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1823
		jr		z, p01loc_61A9
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1824
		ld		de, StringTable4220
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1825
		cp		60h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1826
		jr		nc, p01loc_616A
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1827
		ld		a, l
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1828
		res		4, l
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1829
		bit		4, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1830
		jr		nz, p01loc_61A9
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1831
		ld		de, StringTable4234
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1832
		res		5, l
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1833
		bit		5, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1834
		jr		nz, p01loc_61A9
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1835
		ld		de, StringTable424C
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1836
		res		6, l
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1837
		bit		6, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1838
		jr		nz, p01loc_61A9
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1839
		res		7, l
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1840
		ld		de, StringTable4258
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1841
		jr		p01loc_61A9
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1842
p01loc_616A:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1843
		ld		de, StringTable425E
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1844
		cp		61h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1845
		jr		c, p01loc_61A9
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1846
		ld		de, StringTable4272
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1847
		jr		z, p01loc_61A9
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1848
		ld		de, StringTable429A
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1849
		cp		63h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1850
		jr		c, p01loc_61A9
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1851
		ld		de, StringTable4314
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1852
		jr		z, p01loc_61A9
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1853
		cp		7Eh
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1854
		jr		z, p01loc_61A1
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1855
		ld		de, StringTable4286
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1856
		cp		0BBh
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1857
		jr		c, p01loc_61A9
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1858
		ld		de, StringTable43AA
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1859
		ld		a, l
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1860
		jr		nz, p01loc_619B
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1861
		cp		0F6h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1862
		jr		c, p01loc_61A9
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1863
		ld		l, 0F6h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1864
		jr		p01loc_61A9
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1865
p01loc_619B:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1866
		cp		13h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1867
		jr		c, p01loc_61A1
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1868
		ld		l, 13h
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1869
p01loc_61A1:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1870
		ld		de, StringTable4384
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1871
		jr		p01loc_61A9
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1872
p01loc_61A6:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1873
		ld		de, StringTable4000
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1874
p01loc_61A9:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1875
		add		hl, hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1876
		add		hl, de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1877
		ld		e, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1878
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1879
		ld		d, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1880
		ex		de, hl
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  1881
		bit		tokenHookActive, (iy+hookflags3)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1882
		jr		z, p01loc_61D8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1883
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1884
		ld		(localTokStr), a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1885
		push	bc
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1886
		push	hl
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1887
		ld		hl, StringTable4000+1
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1888
		ex		de, hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1889
		or		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1890
		sbc		hl, de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1891
		ex		de, hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1892
		ld		bc, 0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1893
		or		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1894
		ld		hl, 546h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1895
		sbc		hl, de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1896
		jr		nc, p01loc_61D3
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1897
		ld		b, d
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1898
		ld		c, e
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1899
		ld		de, 0Ch
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1900
p01loc_61D3:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1901
		pop		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1902
		call	Page0Call_3C15
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1903
		pop		bc
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1904
p01loc_61D8:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1905
		inc		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1906
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1907
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1908
SGetTokString:
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1909
		call	GETTOKSTRING
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1910
		ld		de, ioPrompt
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1911
		ld		bc, 11h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1912
		ldir
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1913
		ld		hl, ioPrompt
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1914
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1915
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1916
PUTBPATBUF2:
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1917
		push	bc
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1918
		push	de
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1919
		push	hl
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1920
		push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1921
		ld		b, 1
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1922
		jr		p01loc_61FB
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1923
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1924
PUTBPATBUF:
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
  1925
		call	j_GetPrevTok
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1926
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1927
putbPAT:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1928
		xor		a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1929
		push	bc
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1930
		push	de
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1931
		push	hl
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1932
		push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1933
		ld		b, 0
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1934
p01loc_61FB:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1935
		push	bc
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1936
		call	GETTOKSTRING
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1937
		ld		b, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1938
		ld		e, b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1939
		ld		d, 0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1940
		add		hl, de
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1941
p01loc_6204:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1942
		ld		a, (winLeftEdge)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1943
		pop		de
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1944
		push	de
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1945
		bit		0, d
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1946
		jr		nz, p01loc_6250
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1947
		ld		a, (hl)
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1948
		cp		0D6h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1949
		jr		nz, p01loc_624F
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1950
		ld		hl, curCol
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1951
		dec		(hl)
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  1952
		ld		a, 3Ah
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1953
		call	PutMap
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1954
		call	p01sub_5A3F
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1955
		ld		a, (curRow)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1956
		ld		hl, winTop
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1957
		cp		(hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1958
		jp		m, p01loc_6281
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1959
		ld		hl, (editCursor)
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1960
p01loc_622B:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1961
		ld		de, (editTop)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1962
		dec		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1963
		call	CpHLDE
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1964
		jr		c, p01loc_623E
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1965
		inc		hl
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
  1966
		call	j_GetPrevTok
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1967
		call	page0_17C7
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1968
		jr		nz, p01loc_622B
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1969
p01loc_623E:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1970
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1971
		ld		de, (editCursor)
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
  1972
		call	j_stringwidth
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1973
		ld		a, e
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1974
		inc		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1975
		and		0Fh
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1976
		ld		(curRow+1), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1977
		jr		p01loc_6265
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1978
p01loc_624F:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1979
		xor		a
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1980
p01loc_6250:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1981
		ld		c, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1982
		ld		a, (curRow+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1983
		dec		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1984
		jp		m, p01loc_626C
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1985
		cp		c
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1986
		jr		c, p01loc_626C
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1987
		ld		(curRow+1), a
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1988
p01loc_625E:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1989
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1990
		dec		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1991
		call	PutMap
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1992
		djnz	p01loc_6204
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1993
p01loc_6265:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1994
		pop		de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1995
		pop		af
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  1996
		scf
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  1997
p01loc_6268:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1998
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  1999
		pop		de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2000
		pop		bc
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2001
		ret
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2002
p01loc_626C:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2003
		pop		de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2004
		pop		af
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2005
		jr		nz, p01loc_6283
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2006
		push	af
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2007
		push	de
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2008
		call	p01sub_5A3F
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2009
		ld		a, (curRow)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2010
		push	hl
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2011
		ld		hl, winTop
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2012
		cp		(hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2013
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2014
		jp		p, p01loc_625E
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2015
p01loc_6281:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2016
		pop		de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2017
		pop		af
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2018
p01loc_6283:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2019
		or		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2020
		jr		p01loc_6268
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2021
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2022
putcCheckScrolL:
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2023
		push	af
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  2024
		res		textScrolled, (iy+textFlags)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2025
		call	GETTOKSTRING
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2026
		ld		a, (mcxCurApp)
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2027
		cp		49h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2028
		jr		nz, p01loc_62B2
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2029
		pop		af
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2030
		jr		nz, p01loc_62AB
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2031
		push	hl
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2032
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2033
		ld		de, (curRow)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2034
		add		a, d
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2035
		cp		10h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2036
		ld		a, e
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2037
		inc		a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2038
		call	nc, p01sub_5AD2
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2039
		pop		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2040
		call	PutPS
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2041
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2042
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2043
p01loc_62AB:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2044
		call	PutPS
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
  2045
		call	j_DISPYEOS
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2046
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2047
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2048
p01loc_62B2:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2049
		pop		af
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2050
		call	PutPS
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  2051
		bit		textScrolled, (iy+textFlags)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2052
		ret		z
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
  2053
		call	j_DispEOW
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2054
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2055
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2056
DispEOL:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2057
		ld		a, (curRow+1)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2058
		push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2059
		ld		hl, (editTail)
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2060
p01loc_62C6:
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
  2061
		call	j_BUFPEEK1
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2062
		jr		z, p01loc_62E8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2063
		inc		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2064
		push	hl
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2065
		call	GETTOKSTRING
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2066
		ld		b, (hl)
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2067
p01loc_62D1:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2068
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2069
		ld		a, (curRow+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2070
		cp		0Fh
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2071
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2072
		jr		z, p01loc_62E2
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2073
		call	PutC
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2074
		djnz	p01loc_62D1
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2075
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2076
		jr		p01loc_62C6
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2077
p01loc_62E2:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2078
		call	PutMap
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2079
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2080
		jr		p01loc_62EB
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2081
p01loc_62E8:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2082
		call	EraseEOL
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2083
p01loc_62EB:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2084
		pop		af
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2085
		ld		(curRow+1), a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2086
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2087
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2088
fdispEOL:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2089
		bit		1, (iy+2Ah)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2090
		jr		z, p01loc_62FA
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
  2091
		call	j_BCALL_4CCC
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2092
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2093
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2094
p01loc_62FA:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2095
		ld		a, (curRow+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2096
		or		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2097
		ret		z
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2098
		call	Page0Call_3C3F
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2099
		push	af
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2100
		ld		hl, (editTail)
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2101
p01loc_6306:
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
  2102
		call	j_BUFPEEK1
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2103
		jr		z, p01loc_6349
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2104
		inc		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2105
		push	hl
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2106
		call	GETTOKSTRING
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2107
		ld		b, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2108
		inc		hl
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2109
p01loc_6312:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2110
		ld		a, (curRow+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2111
		cp		0Fh
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2112
		jr		z, p01loc_6323
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2113
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2114
		inc		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2115
		call	PutC
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2116
		djnz	p01loc_6312
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2117
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2118
		jr		p01loc_6306
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2119
p01loc_6323:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2120
		ld		c, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2121
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2122
		ld		a, b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2123
		cp		2
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2124
		jr		nc, p01loc_6335
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2125
		ld		de, (editBtm)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2126
		or		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2127
		sbc		hl, de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2128
		ld		a, h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2129
		or		l
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2130
		jr		z, p01loc_633D
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2131
p01loc_6335:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2132
		set		1, (iy+0Eh)
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2133
		ld		a, 0CEh
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2134
		jr		p01loc_6341
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2135
p01loc_633D:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2136
		ld		a, c
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2137
		call	Page0Call_3C3F
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2138
p01loc_6341:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2139
		call	PutMap
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2140
		pop		af
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2141
		ld		(curRow+1), a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2142
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2143
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2144
p01loc_6349:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2145
		call	EraseEOL
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2146
		call	Page0Call_3C3F
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2147
		pop		af
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2148
		ld		(curRow+1), a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2149
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2150
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2151
ClearRow:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2152
		di
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2153
		ld		d, a
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2154
		ld		e, 20h
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2155
p01loc_6358:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2156
		ld		a, d
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2157
		call	p01sub_55E5
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2158
		call	SetXUp
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2159
		ld		b, 8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2160
		ld		a, e
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2161
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2162
		out		(10h), a
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2163
p01loc_6367:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2164
		xor		a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2165
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2166
		out		(11h), a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2167
		djnz	p01loc_6367
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2168
		inc		e
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2169
		ld		a, e
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2170
		cp		2Ch
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2171
		jr		nz, p01loc_6358
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2172
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2173
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2174
MAKEROWCMD:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2175
		add		a, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2176
		add		a, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2177
		add		a, a
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2178
		add		a, 80h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2179
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2180
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2181
TOTOSTRP:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2182
		ld		b, a
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2183
p01loc_637D:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2184
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2185
		ld		(de), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2186
		inc		de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2187
		ld		a, (unk_865E)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2188
		inc		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2189
		ld		(unk_865E), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2190
		cp		10h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2191
		ret		z
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2192
		inc		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2193
		djnz	p01loc_637D
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2194
		or		1
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2195
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2196
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2197
SETVARNAME:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2198
		ld		a, (OP1+1)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2199
		ld		d, 0
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2200
		cp		5Ch
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2201
		jr		c, p01loc_63BA
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2202
		cp		5Dh
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2203
		ld		d, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2204
		ld		a, (OP1M)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2205
		jr		nz, p01loc_63BA
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2206
		cp		6
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2207
		jr		c, p01loc_63BA
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2208
		ld		hl, OP1M
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2209
		ld		de, ioPrompt
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2210
p01loc_63AB:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2211
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2212
		or		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2213
		jr		z, p01loc_63C7
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2214
		cp		5Bh
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2215
		jr		nz, p01loc_63B5
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2216
		ld		a, 5Bh
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2217
p01loc_63B5:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2218
		ld		(de), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2219
		inc		de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2220
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2221
		jr		p01loc_63AB
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2222
p01loc_63BA:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2223
		ld		e, a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2224
		call	GETTOKSTRING
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2225
		ld		c, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2226
		ld		b, 0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2227
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2228
		ld		de, ioPrompt
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2229
		ldir
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2230
p01loc_63C7:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2231
		ld		hl, {+}
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2232
		jp		strcopy
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2233
+:		.asc '=?',0
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2234
DispDone:
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  2235
		bit		localizeHookActive, (iy+hookflags3)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2236
		jr		z, p01loc_63DC
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2237
		ld		a, 0Dh
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
  2238
		call	j_call_character_hook
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2239
		ret		z
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2240
p01loc_63DC:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2241
		ld		hl, curCol
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2242
		ld		(hl), 0Ch
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2243
		ld		hl, aDone
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2244
		call	PutS
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2245
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2246
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2247
finishoutput:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2248
		call	CpHLDE
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2249
		ret		z
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2250
		push	de
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
  2251
		call	j_BUFPEEK3
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2252
		inc		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2253
		push	hl
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2254
		call	GETTOKSTRING
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2255
		ld		b, (hl)
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2256
p01loc_63F6:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2257
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2258
		ld		a, (hl)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2259
		call	PutC
17
41d98670c2d3 Fix the page 0 labels to have the proper address in their name.
brandonlw
parents: 16
diff changeset
  2260
		call	Page01_3CCF
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2261
		jr		nc, p01loc_6407
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2262
		djnz	p01loc_63F6
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2263
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2264
		pop		de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2265
		jr		finishoutput
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2266
		ret
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2267
p01loc_6407:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2268
		pop		de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2269
		pop		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2270
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2271
42
adad2f097dcb Except for one nasty certificate-related page 0 call, system.asm should be fully
brandonlw
parents: 38
diff changeset
  2272
DisplayCalcModelAndOSVersion:
adad2f097dcb Except for one nasty certificate-related page 0 call, system.asm should be fully
brandonlw
parents: 38
diff changeset
  2273
		call	DisplayCalculatorModel
adad2f097dcb Except for one nasty certificate-related page 0 call, system.asm should be fully
brandonlw
parents: 38
diff changeset
  2274
		call	PutS_penColPrefixed
11
fea1578031ed Cleanup to page 0.
brandonlw
parents: 8
diff changeset
  2275
		ld		hl, aOSVersionString
42
adad2f097dcb Except for one nasty certificate-related page 0 call, system.asm should be fully
brandonlw
parents: 38
diff changeset
  2276
PutS_penColPrefixed:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2277
		push	hl
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2278
		call	ldHLind
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2279
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2280
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2281
		ld		(penCol), hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2282
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2283
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2284
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2285
		jp		VPutS
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2286
aHelpEducation_:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2287
		.db		0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2288
		.db		3Ah
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2289
		.asc 'Help:  education.ti.com',0
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2290
aTi83Plus:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2291
		.db		1Ah
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2292
		.db		8
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2293
		.asc 'TI-83 Plus',0
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2294
aTi83PlusSilver:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2295
		.db		6
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2296
		.db		8
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2297
		.asc 'TI-83 Plus  Silver  Edition',0
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2298
aCopyright19982:.asc 'Copyright 1998-2001, Texas Instruments Inc.',0
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2299
17
41d98670c2d3 Fix the page 0 labels to have the proper address in their name.
brandonlw
parents: 16
diff changeset
  2300
Page01_3E07:
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
  2301
		call	j_CursorOff
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2302
		call	ClrLCD
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2303
		call	RunIndicOff
42
adad2f097dcb Except for one nasty certificate-related page 0 call, system.asm should be fully
brandonlw
parents: 38
diff changeset
  2304
		call	DisplayCalculatorModel
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2305
		call	p01sub_65B0
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2306
		ld		hl, 62h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2307
		call	p01sub_65B0
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2308
		ld		hl, aProd
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2309
		ld		a, 7Dh
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  2310
		bit		localizeHookActive, (iy+hookflags3)
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
  2311
		call	nz, j_call_character_hook
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2312
		call	p01sub_65B0
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2313
		rst		28h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2314
		.dw		80C3h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2315
		ld		a, e
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2316
		ld		(OP4), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2317
		ld		ix, OP4
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2318
		ld		hl, OP1
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2319
		ld		b, 1
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2320
		call	Page0Call_3C4B
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2321
		ld		a, 2Dh
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2322
		ld		(OP1M), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2323
		xor		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2324
		ld		(OP1M+1), a
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2325
		call	VPutS
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2326
		ld		de, 80A0h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2327
		call	p01sub_657F
43
486c42a314bc First pass at the rest of page 0 cleanup.
brandonlw
parents: 42
diff changeset
  2328
		ld		hl, OP1+1
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2329
		call	VPutS
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2330
		ld		a, 2Dh
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2331
		ld		(OP1), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2332
		xor		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2333
		ld		(OP1+1), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2334
		ld		hl, OP1
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2335
		call	VPutS
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2336
		ld		de, 8020h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2337
		call	p01sub_657F
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2338
		call	VPutS
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2339
		ld		a, 2Dh
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2340
		ld		(OP1), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2341
		xor		a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2342
		ld		(OP1+1), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2343
		ld		hl, OP1
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2344
		call	VPutS
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2345
		ld		de, 8030h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2346
		call	p01sub_657F
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2347
		call	VPutS
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2348
		rst		28h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2349
		.dw		807Eh
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2350
		jr		nz, p01loc_654E
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2351
		ld		hl, aId_01
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2352
		call	p01sub_65B0
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2353
		ld		ix, OP4
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2354
		ld		hl, OP1
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2355
		ld		d, 1
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2356
		call	Page0Call_3C4B
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2357
		push	hl
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2358
		ld		hl, 8482h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2359
		ld		de, OP2
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2360
		ld		bc, 6
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2361
		lddr
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2362
		ld		a, 2Dh
29
1c4ed1f8d543 Eliminate all the unnecessary OPx equates.
brandonlw
parents: 25
diff changeset
  2363
		ld		(OP1+5), a
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2364
		pop		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2365
		call	VPutS
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2366
		ld		a, 2Dh
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2367
		call	VPutMap
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2368
		call	Page0Call_3C51
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2369
		inc		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2370
		call	Page0Call_3C57
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2371
		dec		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2372
		call	Page0Call_3C57
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2373
p01loc_654E:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2374
		ld		hl, 2504h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2375
		ld		(penCol), hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2376
		call	Page0Call_3C5D
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2377
		ld		hl, 2D00h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2378
		ld		(penCol), hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2379
		call	Page0Call_3C63
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2380
		jr		nz, p01loc_656F
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2381
		ld		a, b
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2382
		cp		31h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2383
		jr		c, p01loc_6569
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2384
		ld		b, 30h
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2385
p01loc_6569:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2386
		ld		hl, tempSwapArea
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2387
		call	p01sub_65D6
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2388
p01loc_656F:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2389
		ld		hl, aHelpEducation_
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2390
		ld		a, 70h
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  2391
		bit		localizeHookActive, (iy+hookflags3)
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
  2392
		call	nz, j_call_character_hook
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2393
		call	p01sub_65B0
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2394
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2395
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2396
p01sub_657F:
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2397
		ld		a, 7Ah
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2398
		ld		hl, 4000h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2399
		rst		28h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2400
		.dw		8075h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2401
		jr		nz, p01loc_6593
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2402
		ld		a, 7Ah
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2403
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2404
		rst		28h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2405
		.dw		805Ah
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2406
		ld		a, b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2407
		or		c
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2408
		jr		nz, p01loc_659A
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2409
p01loc_6593:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2410
		ld		(OP4), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2411
		ld		c, 1
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2412
		jr		p01loc_65A4
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2413
p01loc_659A:
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2414
		ld		a, 7Ah
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2415
		ld		de, OP4
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2416
		push	bc
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2417
		rst		28h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2418
		.dw		8054h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2419
		pop		bc
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2420
p01loc_65A4:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2421
		ld		ix, OP4
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2422
		ld		hl, OP1
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2423
		ld		b, c
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2424
		call	Page0Call_3C4B
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2425
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2426
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2427
p01sub_65B0:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2428
		push	hl
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2429
		call	ldHLind
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2430
		ld		(penCol), hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2431
		pop		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2432
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2433
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2434
		jp		VPutS
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2435
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2436
p01loc_65BD:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2437
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2438
		ld		a, b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2439
		or		b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2440
		ret		z
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2441
		dec		b
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2442
p01loc_65C2:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2443
		ld		de, (penCol)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2444
		ld		e, 0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2445
		ld		a, 6
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2446
		add		a, d
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2447
		ld		d, a
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2448
		cp		37h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2449
		ret		nc
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2450
		ld		(penCol), de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2451
		ld		a, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2452
		jr		p01loc_65DF
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2453
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2454
p01sub_65D6:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2455
		ld		a, b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2456
		or		b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2457
		ret		z
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2458
		dec		b
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2459
		ld		a, (hl)
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2460
		cp		0D6h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2461
		jr		z, p01loc_65BD
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2462
p01loc_65DF:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2463
		call	VPutMap
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2464
		jr		c, p01loc_65C2
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2465
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2466
		jr		p01sub_65D6
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2467
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2468
aProd:	.db		4
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2469
		.db		16h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2470
		.asc 'PROD #:  ',0
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2471
aId_01:	.db		4
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2472
		.db		1Eh
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2473
		.asc 'ID:  ',0
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2474
17
41d98670c2d3 Fix the page 0 labels to have the proper address in their name.
brandonlw
parents: 16
diff changeset
  2475
Page01_3FA5:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2476
		di
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2477
		ld		a, 2Bh
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2478
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2479
		out		(10h), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2480
		ld		(hl), 14h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2481
		ld		hl, indicBusy
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2482
		rrc		(hl)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2483
		ld		c, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2484
		ld		b, 8
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2485
		ld		d, 80h
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2486
p01loc_660F:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2487
		ld		a, d
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2488
		call	p01sub_55E5
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2489
		call	SetXUp
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2490
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2491
		in		a, (11h)
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2492
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2493
		in		a, (11h)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2494
		ld		e, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2495
		ld		a, d
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2496
		call	p01sub_55E5
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2497
		call	SetXUp
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2498
		ld		a, e
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2499
		rr	c
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2500
		jr		c, p01loc_6631
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2501
		res		0, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2502
		jr		p01loc_6633
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2503
p01loc_6631:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2504
		set		0, a
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2505
p01loc_6633:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2506
		call	lcd_busy
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2507
		out		(11h), a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2508
		inc		d
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2509
		djnz	p01loc_660F
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2510
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2511
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2512
JForceGraphNoKey:
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2513
		ld		a, kGraph
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2514
JForceGraphKey:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2515
		ld		b, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2516
		ld		sp, (onSP)
38
a4c5f839b738 Cleanup of _Mon. This sucked a lot.
brandonlw
parents: 29
diff changeset
  2517
		res		cmdExec, (iy+cmdFlags)
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2518
		ld		a, kGraph
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2519
		call	newContext0
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2520
		jp		sendKPress
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2521
42
adad2f097dcb Except for one nasty certificate-related page 0 call, system.asm should be fully
brandonlw
parents: 38
diff changeset
  2522
DisplayCalculatorModel:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2523
		ld		hl, aTi83Plus
42
adad2f097dcb Except for one nasty certificate-related page 0 call, system.asm should be fully
brandonlw
parents: 38
diff changeset
  2524
		ld		a, 65h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2525
		call	NZIf83Plus
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2526
		jr		nz, p01loc_665E
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2527
		ld		hl, aTi83PlusSilver
42
adad2f097dcb Except for one nasty certificate-related page 0 call, system.asm should be fully
brandonlw
parents: 38
diff changeset
  2528
		ld		a, 7Ch
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2529
p01loc_665E:
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  2530
		bit		localizeHookActive, (iy+hookflags3)
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
  2531
		call	nz, j_call_character_hook
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2532
		ret
42
adad2f097dcb Except for one nasty certificate-related page 0 call, system.asm should be fully
brandonlw
parents: 38
diff changeset
  2533
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2534
KeyToString:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2535
		ld		a, d
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2536
		cp		0FFh
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2537
		jr		z, p01loc_667C
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2538
		cp		0FBh
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2539
		jr		z, p01loc_6673
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2540
		cp		0FCh
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2541
		jr		nz, p01loc_667A
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2542
p01loc_6673:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2543
		ld		h, 2
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2544
		call	Page0Call_3BB5
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2545
		jr		p01loc_6691
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2546
p01loc_667A:
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2547
		cp		0FEh
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2548
p01loc_667C:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2549
		ld		a, e
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2550
		jr		z, p01loc_668C
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2551
		cp		5Ah
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2552
		jr		c, p01loc_6697
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2553
		call	p01sub_6720
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2554
		ret		z
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
  2555
		call	j_ConvKeyToTok
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2556
		jr		p01loc_6691
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2557
p01loc_668C:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2558
		ld		h, 1
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2559
		call	Page0Call_3BB5
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2560
p01loc_6691:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2561
		call	GETTOKSTRING
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2562
		jp		p01loc_670D
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2563
p01loc_6697:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2564
		cp		1Fh
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2565
		jr		z, p01loc_66D6
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2566
		cp		40h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2567
		jr		c, p01loc_66EA
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2568
		cp		59h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2569
		jp		z, p01loc_66BC
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2570
		cp		40h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2571
		jr		nz, p01loc_66CA
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2572
		ld		a, d
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2573
		cp		10h
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2574
		ld		a, e
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2575
		jr		nz, p01loc_66CA
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2576
		ld		hl, Condition8Table
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  2577
		bit		localizeHookActive, (iy+hookflags3)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2578
		ld		a, 8
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
  2579
		call	nz, j_call_character_hook
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2580
		jr		p01loc_670D
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2581
p01loc_66BC:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2582
		ld		a, d
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2583
		cp		0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2584
		jr		c, p01loc_66C5
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2585
		ld		a, 61h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2586
		jr		p01loc_66D8
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2587
p01loc_66C5:
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2588
		ld		a, 40h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2589
		ld		(kbdKey), a
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2590
p01loc_66CA:
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2591
		cp		55h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2592
		jr		z, p01loc_66E7
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2593
		cp		4Ch
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2594
		jr		nz, p01loc_66DB
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2595
		ld		a, 5Fh
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2596
		jr		p01loc_66D8
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2597
p01loc_66D6:
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2598
		ld		a, 50h
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2599
p01loc_66D8:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2600
		add		a, d
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2601
		jr		p01loc_66EC
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2602
p01loc_66DB:
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2603
		cp		56h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2604
		jr		z, p01loc_66E3
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2605
		cp		42h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2606
		jr		nz, p01loc_66E8
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2607
p01loc_66E3:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2608
		add		a, 9
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2609
		add		a, 0Dh
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2610
p01loc_66E7:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2611
		add		a, d
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2612
p01loc_66E8:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2613
		sub		1Bh
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2614
p01loc_66EA:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2615
		sub		10h
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2616
p01loc_66EC:
44
f4f75ec42b53 Basic page 1 cleanup.
brandonlw
parents: 43
diff changeset
  2617
		cp		63h
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2618
		jr		c, p01loc_66F2
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2619
		ld		a, 13h
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2620
p01loc_66F2:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2621
		ld		l, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2622
		ld		h, 0
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2623
		add		hl, hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2624
		ld		de, MenuItems2Table
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2625
		add		hl, de
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  2626
		bit		localizeHookActive, (iy+hookflags3)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2627
		jr		z, p01loc_6708
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2628
		ld		e, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2629
		ld		a, 9
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
  2630
		call	j_call_character_hook
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2631
		jr		z, p01loc_670D
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2632
p01loc_6708:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2633
		ld		e, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2634
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2635
		ld		d, (hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2636
		ex		de, hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2637
		cp		a
7
89b82476a75f Get rid of (most) of the godawful IDA comments.
brandonlw
parents: 6
diff changeset
  2638
p01loc_670D:
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2639
		push	af
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2640
		push	bc
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2641
		push	de
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2642
		dec		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2643
		ld		de, keyForStr
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2644
		ld		bc, 12h
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2645
		ldir
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2646
		pop		de
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2647
		pop		bc
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2648
		pop		af
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2649
		ld		hl, keyToStrRam
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2650
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2651
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2652
p01sub_6720:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2653
		ld		hl, MenuFunctionStringTable
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2654
		ld		b, 13
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2655
		jr		p01loc_6727
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2656
p01loc_6727:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2657
		cp		(hl)
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2658
		jr		z, p01loc_6730
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2659
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2660
		inc		hl
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2661
		inc		hl
4
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2662
		djnz	p01loc_6727
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2663
		ret
59f60baeaf6a Initial commit
brandonlw
parents:
diff changeset
  2664
p01loc_6730:
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2665
		inc		hl
19
271dfee8e3ad Set all known flags -- I'm amazed this actually worked.
brandonlw
parents: 17
diff changeset
  2666
		bit		localizeHookActive, (iy+hookflags3)
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2667
		jr		z, p01loc_6708
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2668
		ld		e, a
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2669
		ld		a, 0Ah
16
27ca02d0d8aa Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents: 11
diff changeset
  2670
		call	j_call_character_hook
8
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2671
		jr		p01loc_670D
795326a8c258 More formatting cleanup.
brandonlw
parents: 7
diff changeset
  2672
		jr		p01loc_6708