1	 	 	 	 	 	 	page	60,132
2	 	 	 	 	title	 	SCREEN.ASM--Sends escape seq's to ANSI.SYS driver.
 The IBM Personal Computer MACRO Assembler 07-18-84    	PAGE	1-1
SCREEN.ASM--Sends escape seq's to ANSI.SYS driver.


3	 	 	 	 	
4	 	 	 	 	;	Table entry macro.
5	 	 	 	 	;****************************************
6	 	 	 	 	
7	 	 	 	 	entry	 	macro	color,nn
8	 	 	 	 	 	 	local	top
9	 	 	 	 	top	 	equ	this byte	 	;; mark the top
10	 	 	 	 	 	 	db	'&color'	 	;; table entry:  color string
11	 	 	 	 	 	 	org	offset (top + 10)	;; force table entry to 10th byte
12	 	 	 	 	 	 	db	27,'[&nn&m$'	 	
13	 	 	 	 	 	 	org	offset (top + 16)	;; force table entry to be 16 bytes long
14	 	 	 	 	 	 	endm
15	 	 	 	 	
16	 	 	 	 	
17	 	 	 	 	;	Program prefix structure.
18	 	 	 	 	;****************************************
19	 	 	 	 	
20	 	 	 	 	prefix	 	struc	 	 	; layout of prefix
21	 0000     80 [	 	 	 	 	db	80h dup (?)	; don't care about 1st 80h bytes
22	                ??	 	
23	                    ]	 	
24	 	 	 	 	
25	 0080  ??	 	 	p_count	 	db	?	 	; one byte length count of parms
26	 0081     7F [	 	 	parms	 	db	07fh dup (?)	; parameter buffer
27	                ??	 	
28	                    ]	 	
29	 	 	 	 	
30	 0100	 	 	 	prefix	 	ends
31	 	 	 	 	
 The IBM Personal Computer MACRO Assembler 07-18-84    	PAGE	1-2
SCREEN.ASM--Sends escape seq's to ANSI.SYS driver.


32	 	 	 	 	 	 	page
33	 	 	 	 	
34	 	 	 	 	;	Mainline.
35	 	 	 	 	;****************************************
36	 	 	 	 	
37	 0000	 	 	 	screen	 	segment para public 'code'
38	 0100	 	 	 	 	 	org	100h	 	; .com file
39	 0100	 	 	 	scr	 	proc	far	 	; entered by a long jmp
40	 	 	 	 	 	 	assume	cs:screen	; All of the 
41	 	 	 	 	 	 	assume	ds:screen	; 	segment registers
42	 	 	 	 	 	 	assume	es:screen	;	will point to the
43	 	 	 	 	 	 	assume	ss:screen	;	prefix upon entry.
44	 	 	 	 	 	 	 	 	 	; SP points to 0fffe (end of segment).
45	 	 	 	 	
46	 	 	 	 	;	Convert parms to lower case.
47	 	 	 	 	;****************************************
48	 	 	 	 	
49	 0100  33 C9	 	 	 	 	xor	cx,cx	 	; clear the count reg.
50	 0102  8A 0E 0080	 	 	 	mov	cl,ds:p_count	; cx now=to length of parms.
51	 0106  83 F9 00	 	 	 	 	cmp	cx,0	 	; if cx=0, there were no parms
52	 0109  75 03	 	 	 	 	jne	uc_to_lc	; So, if .ne. 0, continue.
53	 010B  EB 70 90	 	 	 	 	jmp	help	 	; Else, assume help request.
54	 010E  8B F1	 	 	uc_to_lc:	mov	si,cx	 	; UC-to_LC loop.
55	 0110  8A 84 0081	 	 	 	mov	al,ds:parms[si]	; last char in the parms string into al.
56	 0114  3C 41	 	 	 	 	cmp	al,'A'	 	; Is it below an UC 'A'?
57	 0116  72 0A	 	 	 	 	jb	uc_lc_loop	; Yes--leave it alone, loop for next char.
58	 0118  3C 5A	 	 	 	 	cmp	al,'Z'	 	; Is it above an UC 'Z'?
59	 011A  77 06	 	 	 	 	ja	uc_lc_loop	; Yes--loop for next character.
60	 011C  04 20	 	 	 	 	add	al,'a'-'A'	; Convert Uc to LC.
61	 011E  88 84 0081	 	 	 	mov	ds:parms[si],al	; Store it back in parms.
62	 0122  E2 EA	 	 	uc_lc_loop:	loop	uc_to_lc	; loop control.
63	 	 	 	 	
64	 	 	 	 	
65	 	 	 	 	;	Parse for operands.
66	 	 	 	 	;****************************************
67	 	 	 	 	
68	 0124  FC	 	 	 	 	cld	 	 	; left to right.
69	 0125  8D 3E 0081	 	 	 	lea	di,ds:parms	; di=offset of parameter string
70	 0129  B0 20	 	 	 	 	mov	al,020h	 	; blanks (spaces) are delimeters
71	 012B  33 C9	 	 	 	 	xor	cx,cx	 	; clear count register (for safety's sake)
72	 012D  8A 0E 0080	 	 	 	mov	cl,ds:p_count	; count reg. now=length of parameter string.
73	 0131  F3/ AE	 	 	 	repe	scasb	 	 	; bypass leading blanks, usually just 1.
74	 0133  74 48	 	 	 	 	jz	help	 	; if all blanks, assume help request
75	 0135  4F	 	 	adjust:	 	dec	di	 	; back up so di=offset of 1st non-blank.
76	 0136  41	 	 	 	 	inc	cx	 	; correct count of bytes remaining in parms.
 The IBM Personal Computer MACRO Assembler 07-18-84    	PAGE	1-3
SCREEN.ASM--Sends escape seq's to ANSI.SYS driver.


77	 	 	 	 	 	 	page
78	 	 	 	 	
79	 	 	 	 	
80	 	 	 	 	 	;	Register usage.
81	 	 	 	 	 	;	***************
82	 	 	 	 	 	; cx=count length of parms
83	 	 	 	 	 	; di=offset of parms
84	 	 	 	 	 	; si=offset of table start
85	 	 	 	 	 	; bx=original count before scan starts
86	 	 	 	 	 	; bp=di at start (i.e., saves begining offset of operands)
87	 	 	 	 	 	; ax=count after scan (i.e., saves remaining count of the rest of the parms)
88	 	 	 	 	 	; dx=offset of next operand after the scan (i.e., saves our place)
89	 	 	 	 	
90	 0137  8D 36 05F8 R	 	table_search:	lea	si,table	; si=offset of table for comparisons
91	 013B  8B D9	 	 	 	 	mov	bx,cx	 	; save original count
92	 013D  8B EF	 	 	 	 	mov	bp,di	 	; save offset of operand start
93	 013F  F2/ AE	 	 	 	repne	scasb	 	 	; find the next blank (delimiter)
94	 0141  8B D7	 	 	 	 	mov	dx,di	 	; save offset of next operand
95	 0143  E3 04	 	 	 	 	jcxz	past	 	; if last operand, bx already=length
96	 0145  51	 	 	 	 	push	cx	 	; save remaining count
97	 0146  41	 	 	 	 	inc	cx	 	; adjust cx for length calc.
98	 0147  2B D9	 	 	 	 	sub	bx,cx	 	; calc. length; bx now=length of operand
99	 0149  8B CB	 	 	past:	 	mov	cx,bx	 	; count in cx for cmps
100	 014B  8B FD	 	 	 	 	mov	di,bp	 	; point at start of operand
101	 014D  56	 	 	 	 	push	si	 	; save current place in the table
102	 014E  F3/ A6	 	 	 	repe	cmpsb	 	 	; compare operand to table entry
103	 0150  74 0F	 	 	 	 	je	found	 	; A hit?  Yes--go process esc string.
104	 0152  58	 	 	 	 	pop	ax	 	; No--get back offset of table argument.
105	 0153  05 0010	 	 	 	 	add	ax,16	 	; Bump up to next table entry.
106	 0156  8B F0	 	 	 	 	mov	si,ax	 	; Put it in the index register.
107	 0158  B8 FFFF	 	 	 	 	mov	ax,0ffffh	; End of table mark in ax.
108	 015B  3B 04	 	 	 	 	cmp	ax,[ds:si]	; Are we at the end of the table?
109	 015D  74 2E	 	 	 	 	je	error	 	; Yes--bad operand.  Go die.
110	 015F  EB E8	 	 	 	 	jmp	past	 	; No--go check next table entry.
111	 0161  8B FA	 	 	found:	 	mov	di,dx	 	; next operand offset in di (for later)
112	 0163  5A	 	 	 	 	pop	dx	 	; offset of table entry in dx
113	 0164  83 C2 0A	 	 	 	 	add	dx,10	 	; point at escape string.
114	 0167  B4 09	 	 	 	 	mov	ah,9	 	; DOS screen function.
115	 0169  CD 21	 	 	 	 	int	021h	 	; Issue DOS call.  (will be filtered by ANSI.SYS)
116	 016B  59	 	 	 	 	pop	cx	 	; Retrieve the remaining parms string count.
117	 016C  83 F9 00	 	 	 	 	cmp	cx,0	 	; Are we at the end of the parms string?
118	 016F  74 3C	 	 	 	 	jz	quit	 	; If so--all done.
119	 0171  B0 20	 	 	 	 	mov	al,020h	 	; If not--set up for next scan.
120	 0173  3A 05	 	 	 	 	cmp	al,[ds:di]	; Is next byte is blank?
121	 0175  75 C0	 	 	 	 	jne	table_search	; No--all is well, loop back to table search.
122	 0177  F3/ AE	 	 	 	repe	scasb	 	 	; Otherwise--bypass all imbedded blanks.
123	 0179  74 32	 	 	 	 	jz	quit	 	; If all trailing blanks, quit.
124	 017B  EB B8	 	 	 	 	jmp	adjust	 	; Loop back to adjust regs. and table search.
 The IBM Personal Computer MACRO Assembler 07-18-84    	PAGE	1-4
SCREEN.ASM--Sends escape seq's to ANSI.SYS driver.


125	 	 	 	 	 	 	page
126	 	 	 	 	;	Help routine.
127	 	 	 	 	;****************************************
128	 	 	 	 	
129	 017D  BA 01FE R	 	help:	 	mov	dx,offset clear_screen	; point at clear screen esc sequece
130	 0180  B4 09	 	 	 	 	mov	ah,9	 	; DOS screen function.
131	 0182  CD 21	 	 	 	 	int	021h	 	; go clear the screen
132	 0184  BA 0203 R	 	 	 	mov	dx,offset help_msg 	; point at help messages.
133	 0187  B4 09	 	 	 	 	mov	ah,9	 	; DOS screen function.
134	 0189  CD 21	 	 	 	 	int	021h	 	; Issue DOS call.
135	 018B  CD 20	 	 	 	 	int	020h	 	; And die.....
136	 	 	 	 	
137	 	 	 	 	;	Error Routine
138	 	 	 	 	;****************************************
139	 	 	 	 	
140	 	 	 	 	Comment *
141	 	 	 	 	 	The error routine is entered whenever an operand is not found
142	 	 	 	 	 	in the table.  If the operand is "help" the help screen is
143	 	 	 	 	 	printed.  Otherwise, an error message is issued and the program
144	 	 	 	 	 	terminates.
145	 	 	 	 	 	
146	 	 	 	 	 	Upon entry:  bx=length of the bad parameter
147	 	 	 	 	 	 	     bp=offset of the bad parameter in the buffer
148	 	 	 	 	 	*	
149	 018D  8B CB	 	 	error:	 	mov	cx,bx	 	; get length of bad parm.
150	 018F  8B FD	 	 	 	 	mov	di,bp	 	; and get it's start offset
151	 0191  BE 01AF R	 	 	 	mov	si,offset help_string	; point at "help" for comparison
152	 0194  F3/ A6	 	 	 	repe	cmpsb	 	 	; see if bad parm was "help"
153	 0196  74 E5	 	 	 	 	je	help	 	; if it was, go print the help screen.
154	 0198  BA 01B3 R	 	 	 	mov	dx,offset cr_lf_$	; if not, do the error stuff.
155	 019B  B4 09	 	 	 	 	mov	ah,09h	 	; first, space down the screen
156	 019D  CD 21	 	 	 	 	int	021h	 	; with a cr,lf
157	 019F  03 DD	 	 	 	 	add	bx,bp	 	; calc. the end of the bad operand
158	 01A1  C6 07 24	 	 	 	 	mov	byte ptr [ds:bx],'$'	; mark the end of it for screen function
159	 	 	 	 	
160	 01A4  8B D5	 	 	 	 	mov	dx,bp	 	; point at the bad parm
161	 01A6  CD 21	 	 	 	 	int	021h	 	; display it on the screen...
162	 01A8  BA 01B6 R	 	 	 	mov	dx,offset error_message	; set up the rest of the error message
163	 01AB  CD 21	 	 	 	 	int	021h	 	; and display it too.
164	 01AD  CD 20	 	 	quit:	 	int	020h	 	; standard exit point of the program. 
165	 	 	 	 	
166	 = 000D	 	 	 	cr	 	equ	00dh	 	; ascii carriage return
167	 = 000A	 	 	 	lf	 	equ	00ah	 	; ascii line feed
168	 01AF  68 65 6C 70	 	help_string	db	'help'	 	; "help" string for checking potential help req's
169	 01B3  0D 0A 24	 	 	cr_lf_$	 	db	cr,lf,'$'	; cr, lf, $...could you guess?
170	 01B6  20 69 73 20 61 6E	error_message	db	' is an invalid operand.',cr,lf
171	       20 69 6E 76 61 6C	
172	       69 64 20 6F 70 65	
173	       72 61 6E 64 2E 0D	
174	       0A	 	 	
175	 01CF  49 73 73 75 65 20	 	 	db	'Issue "A>screen" with no operands for help.',cr,lf,lf
176	       22 41 3E 73 63 72	
177	       65 65 6E 22 20 77	
178	       69 74 68 20 6E 6F	
179	       20 6F 70 65 72 61	
 The IBM Personal Computer MACRO Assembler 07-18-84    	PAGE	1-5
SCREEN.ASM--Sends escape seq's to ANSI.SYS driver.


180	       6E 64 73 20 66 6F	
181	       72 20 68 65 6C 70	
182	       2E 0D 0A 0A	 	
183	 01FD  24	 	 	 	 	db	'$'	 	; end of string marker.
184	 	 	 	 	
185	 01FE  1B 5B 32 4A 24	 	clear_screen	db	27,'[2J','$'	; escape sequence to clear screen
186	 0203  41 4E 53 49 2E 53	help_msg	db	'ANSI.SYS and CONFIG.SYS (containing the line DEVICE=ANSI.SYS)',cr,
	 	 	 	lf
187	       59 53 20 61 6E 64	
188	       20 43 4F 4E 46 49	
189	       47 2E 53 59 53 20	
190	       28 63 6F 6E 74 61	
191	       69 6E 69 6E 67 20	
192	       74 68 65 20 6C 69	
193	       6E 65 20 44 45 56	
194	       49 43 45 3D 41 4E	
195	       53 49 2E 53 59 53	
196	       29 0D 0A	 	 	
197	 0242  6D 75 73 74 20 62	 	 	db	'must be accessable when the PC is booted.  Type "screen" and then 
	 	 	 	your',cr,lf
198	       65 20 61 63 63 65	
199	       73 73 61 62 6C 65	
200	       20 77 68 65 6E 20	
201	       74 68 65 20 50 43	
202	       20 69 73 20 62 6F	
203	       6F 74 65 64 2E 20	
204	       20 54 79 70 65 20	
205	       22 73 63 72 65 65	
206	       6E 22 20 61 6E 64	
207	       20 74 68 65 6E 20	
208	       79 6F 75 72 0D 0A	
209	 028A  63 68 6F 69 63 65	 	 	db	'choices of foreground, intensity, or background color(s) from the'
	 	 	 	,cr,lf
210	       73 20 6F 66 20 66	
211	       6F 72 65 67 72 6F	
212	       75 6E 64 2C 20 69	
213	       6E 74 65 6E 73 69	
214	       74 79 2C 20 6F 72	
215	       20 62 61 63 6B 67	
216	       72 6F 75 6E 64 20	
217	       63 6F 6C 6F 72 28	
218	       73 29 20 66 72 6F	
219	       6D 20 74 68 65 0D	
220	       0A	 	 	
221	 02CD  66 6F 6C 6C 6F 77	 	 	db	'following list of parameters:',cr,lf
222	       69 6E 67 20 6C 69	
223	       73 74 20 6F 66 20	
224	       70 61 72 61 6D 65	
225	       74 65 72 73 3A 0D	
226	       0A	 	 	
227	 02EC  20 20 20 20 20 62	 	 	db	'     black    bblack    red    bred    green    bgreen',cr,lf
228	       6C 61 63 6B 20 20	
229	       20 20 62 62 6C 61	
230	       63 6B 20 20 20 20	
231	       72 65 64 20 20 20	
 The IBM Personal Computer MACRO Assembler 07-18-84    	PAGE	1-6
SCREEN.ASM--Sends escape seq's to ANSI.SYS driver.


232	       20 62 72 65 64 20	
233	       20 20 20 67 72 65	
234	       65 6E 20 20 20 20	
235	       62 67 72 65 65 6E	
236	       0D 0A	 	 	
237	 0324  20 20 20 20 20 61	 	 	db	'     amber    bamber    yellow byellow blue     bblue',cr,lf
238	       6D 62 65 72 20 20	
239	       20 20 62 61 6D 62	
240	       65 72 20 20 20 20	
241	       79 65 6C 6C 6F 77	
242	       20 62 79 65 6C 6C	
243	       6F 77 20 62 6C 75	
244	       65 20 20 20 20 20	
245	       62 62 6C 75 65 0D	
246	       0A	 	 	
247	 035B  20 20 20 20 20 6D	 	 	db	'     magenta  bmagenta  cyan   bcyan   white    bwhite',cr,lf
248	       61 67 65 6E 74 61	
249	       20 20 62 6D 61 67	
250	       65 6E 74 61 20 20	
251	       63 79 61 6E 20 20	
252	       20 62 63 79 61 6E	
253	       20 20 20 77 68 69	
254	       74 65 20 20 20 20	
255	       62 77 68 69 74 65	
256	       0D 0A	 	 	
257	 0393  20 20 20 20 20 63	 	 	db	'     clear    bright    underscore     reverse',cr,lf,lf
258	       6C 65 61 72 20 20	
259	       20 20 62 72 69 67	
260	       68 74 20 20 20 20	
261	       75 6E 64 65 72 73	
262	       63 6F 72 65 20 20	
263	       20 20 20 72 65 76	
264	       65 72 73 65 0D 0A	
265	       0A	 	 	
266	 03C4  46 6F 72 20 65 78	 	 	db	'For example:',cr,lf,lf
267	       61 6D 70 6C 65 3A	
268	       0D 0A 0A	 	 	
269	 03D3  20 20 20 20 20 41	 	 	db	'     A>screen bright yellow bred',cr,lf,lf
270	       3E 73 63 72 65 65	
271	       6E 20 62 72 69 67	
272	       68 74 20 79 65 6C	
273	       6C 6F 77 20 62 72	
274	       65 64 0D 0A 0A	 	
275	 03F6  54 68 69 73 20 77	 	 	db	'This would result in a yellow foreground, red background.',cr,lf,l
	 	 	 	f
276	       6F 75 6C 64 20 72	
277	       65 73 75 6C 74 20	
278	       69 6E 20 61 20 79	
279	       65 6C 6C 6F 77 20	
280	       66 6F 72 65 67 72	
281	       6F 75 6E 64 2C 20	
282	       72 65 64 20 62 61	
283	       63 6B 67 72 6F 75	
284	       6E 64 2E 0D 0A 0A	
285	 0432  4E 6F 74 65 3A 20	 	 	db	'Note:  Yellow is really amber.  To get real yellow use bright yell
 The IBM Personal Computer MACRO Assembler 07-18-84    	PAGE	1-7
SCREEN.ASM--Sends escape seq's to ANSI.SYS driver.


	 	 	 	ow.  ',cr,lf
286	       20 59 65 6C 6C 6F	
287	       77 20 69 73 20 72	
288	       65 61 6C 6C 79 20	
289	       61 6D 62 65 72 2E	
290	       20 20 54 6F 20 67	
291	       65 74 20 72 65 61	
292	       6C 20 79 65 6C 6C	
293	       6F 77 20 75 73 65	
294	       20 62 72 69 67 68	
295	       74 20 79 65 6C 6C	
296	       6F 77 2E 20 20 0D	
297	       0A	 	 	
298	 047B  59 6F 75 20 6E 65	 	 	db	'You need only enter enough of an  operand for the program to get '
	 	 	 	,cr,lf
299	       65 64 20 6F 6E 6C	
300	       79 20 65 6E 74 65	
301	       72 20 65 6E 6F 75	
302	       67 68 20 6F 66 20	
303	       61 6E 20 20 6F 70	
304	       65 72 61 6E 64 20	
305	       66 6F 72 20 74 68	
306	       65 20 70 72 6F 67	
307	       72 61 6D 20 74 6F	
308	       20 67 65 74 20 0D	
309	       0A	 	 	
310	 04BE  61 20 76 61 6C 69	 	 	db	'a valid comparison.  For example, "bg" is good enough for green ba
	 	 	 	ckground,',cr,lf
311	       64 20 63 6F 6D 70	
312	       61 72 69 73 6F 6E	
313	       2E 20 20 46 6F 72	
314	       20 65 78 61 6D 70	
315	       6C 65 2C 20 22 62	
316	       67 22 20 69 73 20	
317	       67 6F 6F 64 20 65	
318	       6E 6F 75 67 68 20	
319	       66 6F 72 20 67 72	
320	       65 65 6E 20 62 61	
321	       63 6B 67 72 6F 75	
322	       6E 64 2C 0D 0A	 	
323	 050B  62 75 74 20 79 6F	 	 	db	'but you need at least "bblu" for blue background.  Any less and th
	 	 	 	e',cr,lf
324	       75 20 6E 65 65 64	
325	       20 61 74 20 6C 65	
326	       61 73 74 20 22 62	
327	       62 6C 75 22 20 66	
328	       6F 72 20 62 6C 75	
329	       65 20 62 61 63 6B	
330	       67 72 6F 75 6E 64	
331	       2E 20 20 41 6E 79	
332	       20 6C 65 73 73 20	
333	       61 6E 64 20 74 68	
334	       65 0D 0A	 	 	
335	 0550  70 72 6F 67 72 61	 	 	db	'program will get it confused with "bbla" (black background).',cr,l
	 	 	 	f,lf
 The IBM Personal Computer MACRO Assembler 07-18-84    	PAGE	1-8
SCREEN.ASM--Sends escape seq's to ANSI.SYS driver.


336	       6D 20 77 69 6C 6C	
337	       20 67 65 74 20 69	
338	       74 20 63 6F 6E 66	
339	       75 73 65 64 20 77	
340	       69 74 68 20 22 62	
341	       62 6C 61 22 20 28	
342	       62 6C 61 63 6B 20	
343	       62 61 63 6B 67 72	
344	       6F 75 6E 64 29 2E	
345	       0D 0A 0A	 	 	
346	 058F  4E 6F 74 65 3A 20	 	 	db	'Note:  "underscore" only works with IBM monochrome monitors.',cr,l
	 	 	 	f
347	       20 22 75 6E 64 65	
348	       72 73 63 6F 72 65	
349	       22 20 6F 6E 6C 79	
350	       20 77 6F 72 6B 73	
351	       20 77 69 74 68 20	
352	       49 42 4D 20 6D 6F	
353	       6E 6F 63 68 72 6F	
354	       6D 65 20 6D 6F 6E	
355	       69 74 6F 72 73 2E	
356	       0D 0A	 	 	
357	 05CD  09 20 43 6F 6C 6F	 	 	db	'	 Colors only work with color monitors.',cr,lf
358	       72 73 20 6F 6E 6C	
359	       79 20 77 6F 72 6B	
360	       20 77 69 74 68 20	
361	       63 6F 6C 6F 72 20	
362	       6D 6F 6E 69 74 6F	
363	       72 73 2E 0D 0A	 	
364	 05F6  24	 	 	 	 	db	'$'	 	; end of string marker 
365	 	 	 	 	
366	 	 	 	 	
367	 	 	 	 	 	 	
368	 	 	 	 	
369	 	 	 	 	
370	 	 	 	 	
371	 	 	 	 	
 The IBM Personal Computer MACRO Assembler 07-18-84    	PAGE	1-9
SCREEN.ASM--Sends escape seq's to ANSI.SYS driver.


372	 	 	 	 	 	 	page
373	 05F7  90	 	 	 	 	even	 	 	; force even alignment
374	 = 0018	 	 	 	no_entries	equ	24	 	; number of table entries
375	 = 0010	 	 	 	entry_len	equ	16	 	; length of table entry
376	 = 05F8	 	 	 	table	 	equ	this byte	; Color table
377	 	 	 	 	 	 	entry	amber,33	; amber foreground
378	 05F8  61 6D 62 65 72         +	 	 	db	'amber'
379	 0602                         +	 	 	org	offset (??0000 + 10)
380	 0602  1B 5B 33 33 6D 24      +	 	 	db	27,'[33m$'	 	
381	 0608                         +	 	 	org	offset (??0000 + 16)
382	 	 	 	 	 	 	entry	bamber,43	; amber background
383	 0608  62 61 6D 62 65 72      +	 	 	db	'bamber'
384	 0612                         +	 	 	org	offset (??0001 + 10)
385	 0612  1B 5B 34 33 6D 24      +	 	 	db	27,'[43m$'	 	
386	 0618                         +	 	 	org	offset (??0001 + 16)
387	 	 	 	 	 	 	entry	bblack,40	; black background
388	 0618  62 62 6C 61 63 6B      +	 	 	db	'bblack'
389	 0622                         +	 	 	org	offset (??0002 + 10)
390	 0622  1B 5B 34 30 6D 24      +	 	 	db	27,'[40m$'	 	
391	 0628                         +	 	 	org	offset (??0002 + 16)
392	 	 	 	 	 	 	entry	bblue,44	; blue background
393	 0628  62 62 6C 75 65         +	 	 	db	'bblue'
394	 0632                         +	 	 	org	offset (??0003 + 10)
395	 0632  1B 5B 34 34 6D 24      +	 	 	db	27,'[44m$'	 	
396	 0638                         +	 	 	org	offset (??0003 + 16)
397	 	 	 	 	 	 	entry	bcyan,46	; cyan background
398	 0638  62 63 79 61 6E         +	 	 	db	'bcyan'
399	 0642                         +	 	 	org	offset (??0004 + 10)
400	 0642  1B 5B 34 36 6D 24      +	 	 	db	27,'[46m$'	 	
401	 0648                         +	 	 	org	offset (??0004 + 16)
402	 	 	 	 	 	 	entry	bgreen,42	; green background
403	 0648  62 67 72 65 65 6E      +	 	 	db	'bgreen'
404	 0652                         +	 	 	org	offset (??0005 + 10)
405	 0652  1B 5B 34 32 6D 24      +	 	 	db	27,'[42m$'	 	
406	 0658                         +	 	 	org	offset (??0005 + 16)
407	 	 	 	 	 	 	entry	black,30	; black foreground
408	 0658  62 6C 61 63 6B         +	 	 	db	'black'
409	 0662                         +	 	 	org	offset (??0006 + 10)
410	 0662  1B 5B 33 30 6D 24      +	 	 	db	27,'[30m$'	 	
411	 0668                         +	 	 	org	offset (??0006 + 16)
412	 	 	 	 	 	 	entry	blue,34	 	; blue foreground
413	 0668  62 6C 75 65            +	 	 	db	'blue'
414	 0672                         +	 	 	org	offset (??0007 + 10)
415	 0672  1B 5B 33 34 6D 24      +	 	 	db	27,'[34m$'	 	
416	 0678                         +	 	 	org	offset (??0007 + 16)
417	 	 	 	 	 	 	entry	blink,5	 	; blinking everything
418	 0678  62 6C 69 6E 6B         +	 	 	db	'blink'
419	 0682                         +	 	 	org	offset (??0008 + 10)
420	 0682  1B 5B 35 6D 24         +	 	 	db	27,'[5m$'	 	
421	 0688                         +	 	 	org	offset (??0008 + 16)
422	 	 	 	 	 	 	entry	bmagenta,45	; magenta background
423	 0688  62 6D 61 67 65 6E      +	 	 	db	'bmagenta'
424	 0692                         +	 	 	org	offset (??0009 + 10)
425	 0692  1B 5B 34 35 6D 24      +	 	 	db	27,'[45m$'	 	
426	 0698                         +	 	 	org	offset (??0009 + 16)
 The IBM Personal Computer MACRO Assembler 07-18-84    	PAGE	1-10
SCREEN.ASM--Sends escape seq's to ANSI.SYS driver.


427	 	 	 	 	 	 	entry	bold,1	 	; bold everything
428	 0698  62 6F 6C 64            +	 	 	db	'bold'
429	 06A2                         +	 	 	org	offset (??000A + 10)
430	 06A2  1B 5B 31 6D 24         +	 	 	db	27,'[1m$'	 	
431	 06A8                         +	 	 	org	offset (??000A + 16)
432	 	 	 	 	 	 	entry	bred,41	 	; red background
433	 06A8  62 72 65 64            +	 	 	db	'bred'
434	 06B2                         +	 	 	org	offset (??000B + 10)
435	 06B2  1B 5B 34 31 6D 24      +	 	 	db	27,'[41m$'	 	
436	 06B8                         +	 	 	org	offset (??000B + 16)
437	 	 	 	 	 	 	entry	bright,1	; bright everything (same as bold)
438	 06B8  62 72 69 67 68 74      +	 	 	db	'bright'
439	 06C2                         +	 	 	org	offset (??000C + 10)
440	 06C2  1B 5B 31 6D 24         +	 	 	db	27,'[1m$'	 	
441	 06C8                         +	 	 	org	offset (??000C + 16)
442	 	 	 	 	 	 	entry	bwhite,47	; white background
443	 06C8  62 77 68 69 74 65      +	 	 	db	'bwhite'
444	 06D2                         +	 	 	org	offset (??000D + 10)
445	 06D2  1B 5B 34 37 6D 24      +	 	 	db	27,'[47m$'	 	
446	 06D8                         +	 	 	org	offset (??000D + 16)
447	 	 	 	 	 	 	entry	byellow,43	; yellow background
448	 06D8  62 79 65 6C 6C 6F      +	 	 	db	'byellow'
449	 06E2                         +	 	 	org	offset (??000E + 10)
450	 06E2  1B 5B 34 33 6D 24      +	 	 	db	27,'[43m$'	 	
451	 06E8                         +	 	 	org	offset (??000E + 16)
452	 	 	 	 	 	 	entry	clear,0	 	; clear all settings
453	 06E8  63 6C 65 61 72         +	 	 	db	'clear'
454	 06F2                         +	 	 	org	offset (??000F + 10)
455	 06F2  1B 5B 30 6D 24         +	 	 	db	27,'[0m$'	 	
456	 06F8                         +	 	 	org	offset (??000F + 16)
457	 	 	 	 	 	 	entry	cyan,36	 	; cyan foreground
458	 06F8  63 79 61 6E            +	 	 	db	'cyan'
459	 0702                         +	 	 	org	offset (??0010 + 10)
460	 0702  1B 5B 33 36 6D 24      +	 	 	db	27,'[36m$'	 	
461	 0708                         +	 	 	org	offset (??0010 + 16)
462	 	 	 	 	 	 	entry	green,32	; green foreground
463	 0708  67 72 65 65 6E         +	 	 	db	'green'
464	 0712                         +	 	 	org	offset (??0011 + 10)
465	 0712  1B 5B 33 32 6D 24      +	 	 	db	27,'[32m$'	 	
466	 0718                         +	 	 	org	offset (??0011 + 16)
467	 	 	 	 	 	 	entry	magenta,35	; magenta foreground
468	 0718  6D 61 67 65 6E 74      +	 	 	db	'magenta'
469	 0722                         +	 	 	org	offset (??0012 + 10)
470	 0722  1B 5B 33 35 6D 24      +	 	 	db	27,'[35m$'	 	
471	 0728                         +	 	 	org	offset (??0012 + 16)
472	 	 	 	 	 	 	entry	red,31	 	; red foreground
473	 0728  72 65 64               +	 	 	db	'red'
474	 0732                         +	 	 	org	offset (??0013 + 10)
475	 0732  1B 5B 33 31 6D 24      +	 	 	db	27,'[31m$'	 	
476	 0738                         +	 	 	org	offset (??0013 + 16)
477	 	 	 	 	 	 	entry	reverse,7	; reverse video
478	 0738  72 65 76 65 72 73      +	 	 	db	'reverse'
479	 0742                         +	 	 	org	offset (??0014 + 10)
480	 0742  1B 5B 37 6D 24         +	 	 	db	27,'[7m$'	 	
481	 0748                         +	 	 	org	offset (??0014 + 16)
 The IBM Personal Computer MACRO Assembler 07-18-84    	PAGE	1-11
SCREEN.ASM--Sends escape seq's to ANSI.SYS driver.


482	 	 	 	 	 	 	entry	underscore,4	; underline everything
483	 0748  75 6E 64 65 72 73      +	 	 	db	'underscore'
484	 0752                         +	 	 	org	offset (??0015 + 10)
485	 0752  1B 5B 34 6D 24         +	 	 	db	27,'[4m$'	 	
486	 0758                         +	 	 	org	offset (??0015 + 16)
487	 	 	 	 	 	 	entry	white,37	; white foreground
488	 0758  77 68 69 74 65         +	 	 	db	'white'
489	 0762                         +	 	 	org	offset (??0016 + 10)
490	 0762  1B 5B 33 37 6D 24      +	 	 	db	27,'[37m$'	 	
491	 0768                         +	 	 	org	offset (??0016 + 16)
492	 	 	 	 	 	 	entry	yellow,33	; yellow foreground (same as amber)
493	 0768  79 65 6C 6C 6F 77      +	 	 	db	'yellow'
494	 0772                         +	 	 	org	offset (??0017 + 10)
495	 0772  1B 5B 33 33 6D 24      +	 	 	db	27,'[33m$'	 	
496	 0778                         +	 	 	org	offset (??0017 + 16)
497	 0778  FFFF	 	 	 	 	dw	0ffffh	 	; end of table mark
498	 	 	 	 	
499	 077A	 	 	 	scr	 	endp	 	 	; proc ends
500	 077A	 	 	 	screen	 	ends	 	 	; segment ends
501	 	 	 	 	 	 	end	scr	 	; code ends	

 The IBM Personal Computer MACRO Assembler 07-18-84    	PAGE	Symbols-1
SCREEN.ASM--Sends escape seq's to ANSI.SYS driver.


Macros:

	 	N a m e  	 	Length

ENTRY. . . . . . . . . . . . . .	0003	

Structures and records:

	 	N a m e	 	 	Width	# fields
	 	 	 	 	Shift	Width	Mask	Initial

PREFIX . . . . . . . . . . . . .	0100	0003
  P_COUNT. . . . . . . . . . . . .	0080
  PARMS. . . . . . . . . . . . . .	0081

Segments and groups:

	 	N a m e	 	 	Size	align	combine	class

SCREEN . . . . . . . . . . . . .	077A	PARA  	PUBLIC	'CODE'

Symbols:            

	 	N a m e	 	 	Type	Value	Attr         

ADJUST . . . . . . . . . . . . .	L NEAR 	0135	SCREEN
CLEAR_SCREEN . . . . . . . . . .	L BYTE 	01FE	SCREEN
CR . . . . . . . . . . . . . . .	Number	000D	
CR_LF_$. . . . . . . . . . . . .	L BYTE 	01B3	SCREEN
ENTRY_LEN. . . . . . . . . . . .	Number	0010	
ERROR. . . . . . . . . . . . . .	L NEAR 	018D	SCREEN
ERROR_MESSAGE. . . . . . . . . .	L BYTE 	01B6	SCREEN
FOUND. . . . . . . . . . . . . .	L NEAR 	0161	SCREEN
HELP . . . . . . . . . . . . . .	L NEAR 	017D	SCREEN
HELP_MSG . . . . . . . . . . . .	L BYTE 	0203	SCREEN
HELP_STRING. . . . . . . . . . .	L BYTE 	01AF	SCREEN
LF . . . . . . . . . . . . . . .	Number	000A	
NO_ENTRIES . . . . . . . . . . .	Number	0018	
PAST . . . . . . . . . . . . . .	L NEAR 	0149	SCREEN
QUIT . . . . . . . . . . . . . .	L NEAR 	01AD	SCREEN
SCR. . . . . . . . . . . . . . .	F PROC	0100	SCREEN	Length =067A
TABLE. . . . . . . . . . . . . .	E BYTE 	05F8	SCREEN
TABLE_SEARCH . . . . . . . . . .	L NEAR 	0137	SCREEN
UC_LC_LOOP . . . . . . . . . . .	L NEAR 	0122	SCREEN
UC_TO_LC . . . . . . . . . . . .	L NEAR 	010E	SCREEN
??0000 . . . . . . . . . . . . .	E BYTE 	05F8	SCREEN
??0001 . . . . . . . . . . . . .	E BYTE 	0608	SCREEN
??0002 . . . . . . . . . . . . .	E BYTE 	0618	SCREEN
??0003 . . . . . . . . . . . . .	E BYTE 	0628	SCREEN
??0004 . . . . . . . . . . . . .	E BYTE 	0638	SCREEN
??0005 . . . . . . . . . . . . .	E BYTE 	0648	SCREEN
??0006 . . . . . . . . . . . . .	E BYTE 	0658	SCREEN
??0007 . . . . . . . . . . . . .	E BYTE 	0668	SCREEN
??0008 . . . . . . . . . . . . .	E BYTE 	0678	SCREEN
??0009 . . . . . . . . . . . . .	E BYTE 	0688	SCREEN
??000A . . . . . . . . . . . . .	E BYTE 	0698	SCREEN
 The IBM Personal Computer MACRO Assembler 07-18-84    	PAGE	Symbols-2
SCREEN.ASM--Sends escape seq's to ANSI.SYS driver.


??000B . . . . . . . . . . . . .	E BYTE 	06A8	SCREEN
??000C . . . . . . . . . . . . .	E BYTE 	06B8	SCREEN
??000D . . . . . . . . . . . . .	E BYTE 	06C8	SCREEN
??000E . . . . . . . . . . . . .	E BYTE 	06D8	SCREEN
??000F . . . . . . . . . . . . .	E BYTE 	06E8	SCREEN
??0010 . . . . . . . . . . . . .	E BYTE 	06F8	SCREEN
??0011 . . . . . . . . . . . . .	E BYTE 	0708	SCREEN
??0012 . . . . . . . . . . . . .	E BYTE 	0718	SCREEN
??0013 . . . . . . . . . . . . .	E BYTE 	0728	SCREEN
??0014 . . . . . . . . . . . . .	E BYTE 	0738	SCREEN
??0015 . . . . . . . . . . . . .	E BYTE 	0748	SCREEN
??0016 . . . . . . . . . . . . .	E BYTE 	0758	SCREEN
??0017 . . . . . . . . . . . . .	E BYTE 	0768	SCREEN

Warning Severe
Errors	Errors 
0	0
