mss@dartvax.UUCP (Mark Sherman) (09/02/85)
This is an ordinary text file that contains an example listing from McAsm.
See net.micro.mac for more details.
--------------------------------------------------------
McASM V1.0 Filename: LIST.ASM Page no. 1
File lister application Mon, Jul 15, 1985 1:56:19 PM
1: ;****************************************************************
2:
3: ; Copyright (c) 1985 by Dave McWherter
4:
5: ; This a simple print application that just reads a text file
6: ; and sends it as ASCII codes to the serial printer driver.
7:
8: ;It also shows off some of the features of the new McAsm assembler
9: ;and McLink linker. (That means that this file can't be assembled
10: ;by MDS or MACASM, but at least the structure of the program and
11: ;the code itself is a useful example.) McAsm is available from me
12: ;directly at the following address:
13:
14: ; Author: Dave McWherter - 70057,1612
15: ; 2151 Brown Ave.
16: ; Bensalem, PA 19020
17: ; 215-639-8764
18:
19: ;****************************************************************
20:
21: ; File = LIST.ASM
22:
23:00000000 title "File lister application $" timestamp in title
24:00000000 name LIST our module ID
25:00000000 prtr "/E/$45" set Imagewriter for ELITE
26:
27: ;****************************************************************
28: ;Configure our application file:
29:
30:00000000 ftype 'APPL' file type
31:00000000 fsign 'List' file signature
32:00000000 a5off $100 start a5 offset data $100 below a5
33:
34: ;****************************************************************
35: ;Assembly setup stuff:
36:
37:00000000 mexp 0 don't expand macros
38:00000000 texp 0 don't expand text statements
39:
40: ;****************************************************************
41: ;Include traps definitions (with listing turned off):
42:
93:00000000 list 1
94:
95: ;****************************************************************
96: ; Structure of File Manager parameter block:
97:
98:00000000 dsec 0
99:00000000 ioLink ds.l 1 queue link in header
100:00000004 ioType ds.w 1 type for safety check
101:00000006 ioTrap ds.w 1 the trap
102:00000008 ioCmdAddr ds.l 1 address to dispatch to
103:
104:0000000C ioCompletion ds.l 1 completion routine
105:00000010 ioResult ds.w 1 I/O result code
106:00000012 ioFileName ds.l 1 file name pointer
107:00000016 ioVRefNum equ * volume refnum
108:00000016 ioDrvNum ds.w 1 drive number
109:00000018 ioRefNum ds.w 1 file reference number
110:
111:0000001A csCode equ * control/status code [word]
112:0000001A ioFileType ds.b 1 specified along with FileName
113:0000001B ioPermssn ds.b 1 permissions
114:
115:0000001C csParam equ * operation-defined parameters [20 bytes]
116:0000001C ioOwnBuf ds.l 1 "private" 522-byte buffer
117:
118:00000020 ioBuffer ds.l 1 data buffer
119:00000024 ioByteCount ds.l 1 requested byte count
120:00000028 ioNumDone ds.l 1 actual byte count completed
121:
122:0000002C ioPosMode ds.w 1 initial file positioning mode/eol char
123:0000002E ioPosOffset ds.l 1 file position offset
124:00000032 dend
125:
126:00000050 ioFQElSize equ $50 length of I/O parameter block
127:
128: ;These are all used as indexes off of A0, so if we 'BASE' them we
129: ;don't have to type the '(a0)'. In other words, 'clr.w ioDrvNum'
130: ;will be equivalent to 'clr.w ioDrvNum(a0)'.
131:
132:00000000 base a0,ioLink,ioType,ioTrap,ioCmdAddr
133:00000000 base a0,ioCompletion,ioResult,ioFileName
134:00000000 base a0,ioVRefNum,ioDrvNum,ioRefNum,csCode
135:00000000 base a0,ioFileType,ioPermssn,csParam,ioOwnBuf
136:00000000 base a0,ioBuffer,ioByteCount,ioNumDone
137:00000000 base a0,ioPosMode,ioPosOffset
138:
139: ;****************************************************************
140: ;This is our variable storage area off of A5:
141:
142:00000000 a5sec start of a5 offset data
143:00000000 DiskParms equ * disk I/O parameter block:
144:00000000 ds.b IOFQElSize
145:
146:00000050 PrtOutParms equ * printer I/O parameter block:
147:00000050 ds.b IOFQElSize
148:
149:000000A0 ByteBuffer ds.b 1 a one-byte buffer
150:000000A1 ds.b 1 align to even boundary for next:
151:
152:000000A2 EventRecord equ * GetNextEvent's result:
153:000000A2 EventType ds.w 1
154:000000A4 EventMessage ds.l 1
155:000000A8 EventTime ds.l 1
156:000000AC EventLocation ds.l 1
157:000000B0 EventModifiers ds.w 1
158:
159:000000B2 WindowPtr ds.l 1 FindWindow's result
160:
161:000000B6 MenuHandle ds.l 1
162:000000BA MenuItem ds.w 1
163:
164:000000BC SFReply equ * reply record from Std File package:
165:000000BC SFGood ds.b 1
166:000000BD SFCopy ds.b 1
167:000000BE SFType ds.b 4
168:000000C2 SFVRefNum ds.w 1
169:000000C4 SFVersion ds.w 1
170:000000C6 SFName ds.b 64
171:
172:00000106 ItemHit ds.w 1 Dialog item hit result
173:
174:00000108 DialogPtr ds.l 1 Dialog's pointer
175:0000010C DStorage ds.w $AA Dialog's storage area
176:00000260 ItemHandle ds.l 1 a dialog item's handle
177:00000264 ItemType ds.w 1 a dialog item's type
178:00000266 ItemBox ds.b 8 a dialog item's rectangle
179:
180:0000026E DeskName ds.w 16 name of desk accessory selected
181:
182:0000028E NewStyle ds.w 1 the newly selected style no.
183:00000290 NewOption ds.w 1 the newly selected option no.
184:00000292 Column ds.w 1 current column no.
185:00000294 PageLines ds.w 1 no. of lines printed on a page
186:
187:00000296 a5end
188:
189: ;All of these are indexed by A5. Since we defined them in an
190: ;'A5SEC', the assembler will automatically add the '(a5)' to
191: ;these variables everytime we use them. In other words,
192: ;'lea Diskparms,a0' will be equivalent to 'lea DiskParms(a5),a0'.
193:
194: ;****************************************************************
195: ; Start up by initializing the managers:
196:
197:00000000 loc
198:00000000 486DFFFC Start pea -4(a5) space For Quickdraw's use
199:00000004 A86E _InitGraf initialize QuickDraw
200:00000006 A8FE _InitFonts initialize Font Manager
201:00000008 A912 _InitWindows initialize Window Manager
202:0000000A A930 _InitMenus initialize Menu Manager
203:
204:0000000C 42A7 clr.l -(sp) put zero on stack for restart procecdure
205:0000000E A97B _InitDialogs initialize Dialog Manager
206:00000010 A9CC _TEInit initialize Text Edit
207:
208: ;Set up our menus:
209:
210:00000012 7201 moveq #1,d1 install our Apple menu
211:00000014 61000412 bsr InstallMenu
212:00000018 2F01 move.l d1,-(sp) new menu handle to stack
213:0000001A 2F3C4452 move.l #'DRVR',-(sp) add desk accessories to the Apple menu
0000001E 5652
214:00000020 A94D _AddResMenu
215:
216:00000022 7202 moveq #2,d1 install our File menu
217:00000024 61000402 bsr InstallMenu
218:
219:00000028 7203 moveq #3,d1 install our Style menu
220:0000002A 610003FC bsr InstallMenu
221:
222:0000002E 7204 moveq #4,d1 install our Options menu
223:00000030 610003F6 bsr InstallMenu
224:
225:00000034 A937 _DrawMenuBar draw the new menu bar
226:
227: ;Other misc. initialization:
228:
229:00000036 203C0000 move.l #$0000FFFF,d0 flush all pending events
0000003A FFFF
230:0000003C A032 _FlushEvents
231:0000003E A850 _InitCursor init cursor to arrow
232:
233: ;Clear out our I/O device control blocks:
234:
235:00000040 41ED0000 lea DiskParms,a0
236:00000044 303C009F move.w #IOFQElSize*2-1,d0
237:00000048 4218 .clr clr.b (a0)+
238:0000004A 51C8FFFC dbra d0,.clr
239:
240: ;****************************************************************
241: ; Main event loop:
242:
243:0000004E WaitForEvent
244:0000004E A9B4 _SystemTask update disk accessories often
245:
246: ;Get any waiting events:
247:
248:00000050 4267 clr.w -(sp) clear space for function result
249:00000052 3F3CFFFF move.w #$FFFF,-(sp) look for any event
250:00000056 486D0000 pea EventRecord where to put event result
251:0000005A A970 _GetNextEvent any waiting events ?
252:0000005C 301F move.w (sp)+,d0
253:0000005E 67EE beq WaitForEvent nope - keep looping
254:
255:00000060 302D0000 move.w EventType,d0 is it mouse down ?
256:00000064 B07C0001 cmp.w #1,d0
257:00000068 66E4 bne WaitForEvent no - ignore whatever
258:0000006A 6006 bra.s MouseDown yes - go handle it
259:
260: ;****************************************************************
261: ; Common exit routine from menu selections:
262:
263:0000006C SelectionExit
264:0000006C 610003D6 bsr UnhighlightMenu unhighlight selected menu title
265:00000070 60DC bra WaitForEvent
266:
267: ;****************************************************************
268: ; Find out where the mouse is down at:
269:
270:00000072 MouseDown
271:00000072 4267 clr.w -(sp) make space for integer result
272:00000074 2F2D0000 move.l EventLocation,-(sp) ;pass mouse point
273:00000078 486D0000 pea WindowPtr where to store result window ptr
274:0000007C A92C _FindWindow find window where mouse was
275:0000007E 301F move.w (sp)+,d0 get result off stack
276:
277:00000080 0C000002 cmpi.b #2,d0 in a system window ?
278:00000084 6700029E beq SystemWindow yes
279:00000088 0C000001 cmpi.b #1,d0 in the menu bar ?
280:0000008C 66C0 bne WaitForEvent no - ignore it
281:
282: ;****************************************************************
283: ; Mouse was pressed in the Menu Bar:
284:
285:0000008E MenuBar
286:0000008E 42A7 clr.l -(sp) make space for function result
287:00000090 2F2D0000 move.l EventLocation,-(sp) ;pass mouse loc as parameter
288:00000094 A93D _MenuSelect menu item selected ?
289:00000096 321F move.w (sp)+,d1 maybe - pop menu ID
290:00000098 341F move.w (sp)+,d2 and menu item number
291:0000009A 3B420000 move.w d2,MenuItem save menu item no.
292:
293:0000009E 0C410001 cmpi.w #1,d1 branch based on which menu
294:000000A2 671A beq.s AppleMenu
295:000000A4 0C410002 cmpi.w #2,d1
296:000000A8 6700005C beq FileMenu
297:000000AC 0C410003 cmpi.w #3,d1
298:000000B0 67000154 beq StyleMenu
299:000000B4 0C410004 cmpi.w #4,d1
300:000000B8 670001BC beq OptionMenu
301:000000BC 6090 bra WaitForEvent ignore if not a menu we know
302:
303: ;****************************************************************
304: ; Handle a selection in Apple menu:
305:
306:000000BE AppleMenu
307:000000BE 0C420001 cmpi.w #1,d2 is it About ?
308:000000C2 6700001E beq About yes
309:
310: ;Else it must be a desk accessory menu item:
311:
312:000000C6 7201 moveq #1,d1 get handle to Menu 1
313:000000C8 6100036C bsr GetMenuHandle
314: ; menu handle is on stack
315:000000CC 3F2D0000 move.w MenuItem,-(sp) also pass menu's item no.
316:000000D0 486D0000 pea DeskName where to put result text
317:000000D4 A946 _GetItem get desk accessory name (menu text)
318:
319:000000D6 4267 clr.w -(sp) make space for function result
320:000000D8 486D0000 pea DeskName pass desk acc. name as param
321:000000DC A9B6 _OpenDeskAcc open the desk acc.
322:000000DE 301F move.w (sp)+,d0 clear result from stack
323:000000E0 608A bra SelectionExit
324:
325: ;****************************************************************
326: ; User has selected our 'About...' menu item:
327:
328:000000E2 About
329:000000E2 42A7 clr.l -(sp) make space for dialog handle result
330:000000E4 3F3C0001 move.w #1,-(sp) get dialog no. 1 from resc file
331:000000E8 486D0000 pea Dstorage
332:000000EC 2F3CFFFF move.l #-1,-(sp) put it in front of all other windows
000000F0 FFFF
333:000000F2 A97C _GetNewDialog
334: ; rtns dialog ptr on stack
335:000000F4 2F17 move.l (sp),-(sp) we'll need the ptr again later
336:000000F6 A873 _SetPort make the dialog the current port
337:
338:000000F8 42A7 clr.l -(sp) no filter procedure
339:000000FA 486D0000 pea ItemHit where to store result
340:000000FE A991 _ModalDialog handle events in the dialog box
341:
342: ; (dialog ptr is on stack)
343:00000100 A982 _CloseDialog whatever the hit was, close it
344:00000102 6000FF68 bra SelectionExit
345:
346: ;****************************************************************
347: ; Handle a selection in our File menu:
348:
349:00000106 FileMenu
350:00000106 0C420001 cmpi.w #1,d2 is it Listing ?
351:0000010A 6700000E beq Listing yes
352:0000010E 0C420002 cmpi.w #2,d2 is it Quit ?
353:00000112 670000EC beq Quit yes
354:00000116 6000FF36 bra WaitForEvent should never happen
355:
356: ;****************************************************************
357: ; User has selected 'Listing':
358:
359:0000011A loc
360:0000011A Listing
361:
362: ;Use the standard dialog box to get the filename:
363:
364:0000011A 3F3C0050 move.w #80,-(sp) where to put dialog box
365:0000011E 3F3C0050 move.w #80,-(sp)
366:00000122 487A00CE pea NulStr docs say not needed, but I can't
367: ; get it to work without a string!
368:00000126 42A7 clr.l -(sp) no filter proc
369:00000128 3F3CFFFF move.w #-1,-(sp) display all file types
370:0000012C 42A7 clr.l -(sp) no type table
371:0000012E 42A7 clr.l -(sp) no dialog hook
372:00000130 486D0000 pea SFReply where to put reply result
373:00000134 3F3C0002 move.w #2,-(sp) selector for SFGetFile
374:00000138 A9EA _Pack3 in package 3
375:
376:0000013A 102D0000 move.b SFGood,d0 did they cancel it ?
377:0000013E 670000AE beq .Exit yes
378:
379: ;Open the file:
380:
381:00000142 41ED0000 lea DiskParms,a0 setup ptr to I/O parameter block
382:00000146 43ED0000 lea SFName,a1 setup ptr to the name
383:0000014A 21490012 move.l a1,ioFileName
384:0000014E 316D0000 move.w SFVRefNum,ioVRefNum setup vol refnum
00000152 0016
385:00000154 117C0001 move.b #1,ioPermssn read only permission
00000158 001B
386:0000015A A000 _Open open the file
387:0000015C 4A40 tst.w d0 successful open ?
388:0000015E 6600008E bne .Exit no
389:
390: ;Open the serial output driver:
391:
392:00000162 41ED0000 lea PrtOutParms,a0
393:00000166 303A0408 move.w PortNum,d0 which port ?
394:0000016A 0C400002 cmpi.w #2,d0
395:0000016E 6706 beq.s .PortB B
396:
397:00000170 43FA0082 .PortA lea AOutStr,a1
398:00000174 6004 bra.s .Open
399:
400:00000176 43FA0082 .PortB lea BOutStr,a1
401:
402:0000017A 21490012 .Open move.l a1,ioFileName
403:0000017E A000 _Open
404:00000180 4A40 tst.w d0 successful open ?
405:00000182 6664 bne.s .Close no
406:
407:00000184 610001AC bsr DisplayAbortBox display the abort/pause dialog
408:00000188 6100027E bsr StyleToPrinter send style escape codes to printer
409:0000018C 426D0000 clr.w Column init column no.
410:
411:00000190 426D0000 NewPage clr.w PageLines init page line counter
412:
413:00000194 A9B4 .Loop _SystemTask update desk accessories often
414:00000196 610001C0 bsr CheckAbort check for abort or pause
415:0000019A 6532 bcs.s .Done2 is abort - quit
416:
417:0000019C 610002BC bsr ReadByte read bytes
418:000001A0 651E bcs.s .Done until eof or error
419:000001A2 610002E2 bsr PrintChar
420:
421:000001A6 303A03CE move.w Paging,d0 pagination on ?
422:000001AA 67E8 beq .Loop no
423:000001AC 302D0000 move.w PageLines,d0 end of page yet ?
424:000001B0 0C40003C cmpi.w #60,d0
425:000001B4 63DE bls .Loop no
426:
427:000001B6 123C000C move.b #$0C,d1 yes - skip to next page
428:000001BA 610002CA bsr PrintChar
429:000001BE 60D0 bra NewPage
430:
431:000001C0 303A03B4 .Done move.w Paging,d0 pagination on ?
432:000001C4 6708 beq.s .Done2 no
433:000001C6 123C000C move.b #$0C,d1 yes - send formfeed to printer
434:000001CA 610002BA bsr PrintChar
435:
436:000001CE 303A039C .Done2 move.w ImageWriter,d0 is it an ImageWriter ?
437:000001D2 6714 beq.s .Close no
438:000001D4 123C001B move.b #$1B,d1 yes - reset it
439:000001D8 610002AC bsr PrintChar
440:000001DC 123C0063 move.b #$63,d1
441:000001E0 610002A4 bsr PrintChar
442:000001E4 610001C6 bsr CloseAbortBox close the abort/pause dialog
443:
444:000001E8 41ED0000 .Close lea DiskParms,a0 close the file
445:000001EC A001 _Close
446: ;
447: ;*** --> the Driver Manual says you shouldn't Close the serial driver
448: ;*** --> and it's correct - the system hangs if you do!
449:
450:000001EE 6000FE7C .Exit bra SelectionExit
451:
452:
453:000001F2 0120 NulStr text #" "
454:000001F4 052E414F AOutStr text #".AOut"
455:000001FA 052E424F BOutStr text #".BOut"
456:00000200 align
457:
458: ;****************************************************************
459: ; User wants to quit:
460:
461:00000200 61000242 Quit bsr UnhighlightMenu unhighlight the File title
462:00000204 4E75 rts return to the Finder
463:
464: ;****************************************************************
465: ; Handle a selection in our Style menu:
466:
467:00000206 StyleMenu
468:00000206 3B420000 move.w d2,NewStyle save newly selected style
469:0000020A 7203 moveq #3,d1 get handle for the style menu
470:0000020C 61000228 bsr GetMenuHandle
471: ; leaves handle on stack
472:00000210 322D0000 move.w NewStyle,d1 is it ImageWriter item ?
473:00000214 B27C0001 cmp.w #1,d1
474:00000218 6720 beq.s IWItem yes - special
475:
476:0000021A 2F17 move.l (sp),-(sp) copy of handle for later
477:0000021C 3F3A0350 move.w StyleNum,-(sp) remove check from previous style
478:00000220 4267 clr.w -(sp) FALSE for no check
479:00000222 A945 _CheckItem
480: ; handle is on stack
481:00000224 3F2D0000 move.w NewStyle,-(sp) put check mark on new selection
482:00000228 3F3CFFFF move.w #$FFFF,-(sp) TRUE for a check
483:0000022C A945 _CheckItem
484:
485:0000022E 41FA033E lea StyleNum,a0 update current style no.
486:00000232 30AD0000 move.w NewStyle,(a0)
487:00000236 6000FE34 bra SelectionExit
488:
489: ;Handle ImageWriter selection:
490:
491:0000023A 41FA0330 IWItem lea ImageWriter,a0 get current ImageWriter state
492:0000023E 3210 move.w (a0),d1
493:00000240 4641 not.w d1 invert it
494:00000242 3081 move.w d1,(a0) save new state
495:00000244 3F3C0001 move.w #1,-(sp) the item no. of ImageWriter
496:00000248 3F01 move.w d1,-(sp) check/uncheck it
497:0000024A A945 _CheckItem
498:
499: ;Enable/Disable style items:
500:
501:0000024C 7203 moveq #3,d1 get the menu handle
502:0000024E 610001E6 bsr GetMenuHandle
503:00000252 2B5F0000 move.l (sp)+,MenuHandle save it
504:00000256 7603 moveq #3,d3 init to first style item
505:
506:00000258 2F2D0000 IWLoop move.l MenuHandle,-(sp) pass the handle
507:0000025C 3F03 move.w d3,-(sp) and the item no.
508:0000025E 303A030C move.w ImageWriter,d0 enabling or disabling ?
509:00000262 6604 bne.s IW2 enabling
510:
511:00000264 A93A _DisableItem else disabling
512:00000266 6002 bra.s IW4
513:
514:00000268 A939 IW2 _EnableItem
515:
516:0000026A 5243 IW4 addq.w #1,d3 to next style item
517:0000026C 0C43000B cmpi.w #11,d3 until all styles done
518:00000270 6DE6 blt IWLoop
519:
520:00000272 6000FDF8 bra SelectionExit
521:
522: ;****************************************************************
523: ; Handle a selection in our Options menu:
524:
525:00000276 OptionMenu
526:00000276 3B420000 move.w d2,NewOption save new option selection no.
527:0000027A 0C420003 cmpi.w #3,d2 is it a port option ?
528:0000027E 6C26 bge.s OptionLF no
529:
530:00000280 OptionPort
531:00000280 7204 moveq #4,d1 get handle for option menu
532:00000282 610001B2 bsr GetMenuHandle
533: ; handle is on stack
534:00000286 2F17 move.l (sp),-(sp) another copy of handle for later
535:00000288 3F3A02E6 move.w PortNum,-(sp) uncheck the old port selection
536:0000028C 4267 clr.w -(sp)
537:0000028E A945 _CheckItem
538: ; handle still on stack
539:00000290 3F2D0000 move.w NewOption,-(sp) check the new port selection
540:00000294 3F3CFFFF move.w #$FFFF,-(sp)
541:00000298 A945 _CheckItem
542:
543:0000029A 41FA02D4 lea PortNum,a0 save new port no.
544:0000029E 30AD0000 move.w NewOption,(a0)
545:000002A2 6000FDC8 bra SelectionExit and done
546:
547:000002A6 OptionLF
548:000002A6 0C420006 cmpi.w #6,d2 is it a LF option ?
549:000002AA 6C000046 bge OptionPage no
550:000002AE 7204 moveq #4,d1 get handle for option menu
551:000002B0 61000184 bsr GetMenuHandle returns it on the stack
552:000002B4 302D0000 move.w NewOption,d0 the menu's item no.
553:000002B8 3F00 move.w d0,-(sp)
554:000002BA 41FA02AE lea AddLF-8,a0 get current state of this option
555:000002BE E348 lsl.w #1,d0
556:000002C0 36300000 move.w (a0,d0.w),d3
557:000002C4 4643 not.w d3 invert it
558:000002C6 31830000 move.w d3,(a0,d0.w) update new state
559:000002CA 3F03 move.w d3,-(sp) flag to check/uncheck
560:000002CC A945 _CheckItem
561: ;
562:000002CE 7204 moveq #4,d1 get handle on stack again
563:000002D0 61000164 bsr GetMenuHandle
564:000002D4 322D0000 move.w NewOption,d1 setup opposite option in d2
565:000002D8 7405 moveq #5,d2 assume we're on 4
566:000002DA 0C410004 cmpi.w #4,d1 correct assumption ?
567:000002DE 6702 beq.s LF2 yes
568:000002E0 7404 moveq #4,d2 no - on 5, opposite is 4
569:
570:000002E2 3F02 LF2 move.w d2,-(sp) opposite item no. to enable/disable
571:000002E4 4A43 tst.w d3 checking or unchecking ?
572:000002E6 6604 bne.s LF4 checking
573:
574:000002E8 A939 _EnableItem unchecking, enable opposite option
575:000002EA 6002 bra.s LF6
576:
577:000002EC A93A LF4 _DisableItem checking, disable opposite option
578:
579:000002EE 6000FD7C LF6 bra SelectionExit
580:
581:000002F2 OptionPage
582:000002F2 0C420007 cmpi.w #7,d2 is it pagination option ?
583:000002F6 661C bne.s OptionTab no
584:000002F8 7204 moveq #4,d1 get the menu handle on stack
585:000002FA 6100013A bsr GetMenuHandle
586:000002FE 3F3C0007 move.w #7,-(sp) the menu item no.
587:00000302 41FA0272 lea Paging,a0 get current pagination state
588:00000306 OptionPage2
589:00000306 3010 move.w (a0),d0
590:00000308 4640 not.w d0 invert it
591:0000030A 3080 move.w d0,(a0) save new state
592:0000030C 3F00 move.w d0,-(sp) check/uncheck the item
593:0000030E A945 _CheckItem
594:00000310 6000FD5A bra SelectionExit
595:
596:00000314 OptionTab
597:00000314 7204 moveq #4,d1 get the menu handle on stack
598:00000316 6100011E bsr GetMenuHandle
599:0000031A 3F3C0009 move.w #9,-(sp) the menu item no.
600:0000031E 41FA0258 lea Tabbing,a0 get current tabbing state
601:00000322 60E2 bra OptionPage2 then same as pagination
602:
603: ;****************************************************************
604: ; The mouse was pressed in a system window:
605:
606:00000324 SystemWindow
607:00000324 486D0000 pea EventRecord just pass the event to the system
608:00000328 2F2D0000 move.l WindowPtr,-(sp)
609:0000032C A9B3 _SystemClick
610:0000032E 6000FD1E bra WaitForEvent
611:
612: ;****************************************************************
613: ; Display our abort dialog box:
614:
615:00000332 DisplayAbortBox
616:00000332 42A7 clr.l -(sp) make space for dialog handle result
617:00000334 3F3C0002 move.w #2,-(sp) get the dialog from resc file
618:00000338 486D0000 pea Dstorage
619:0000033C 2F3CFFFF move.l #-1,-(sp) put it in front of all other windows
00000340 FFFF
620:00000342 A97C _GetNewDialog
621:
622:00000344 2B570000 move.l (sp),DialogPtr save its ptr
623:00000348 A873 _SetPort make the dialog the current port
624:
625: ;Deactivate the resume control:
626:
627:0000034A 7203 moveq #3,d1 get a handle to resume item's control
628:0000034C 6100009E bsr GetItemHandle
629:00000350 3F3C00FF move.w #255,-(sp) deactivate the item
630:00000354 A95D _HiliteControl
631:00000356 4E75 rts
632:
633: ;****************************************************************
634: ; Check for abort actions:
635: ; R: carry set if abort
636:
637:00000358 CheckAbort
638:00000358 6100005A bsr TestAbortEvent any events in our abort dialog ?
639:0000035C 6744 beq.s CAOK nope
640:0000035E 0C410001 cmpi.w #1,d1 is it an abort ?
641:00000362 6742 beq.s Abort yes - flag it
642:00000364 0C410002 cmpi.w #2,d1 is it pause ?
643:00000368 6638 bne.s CAOK no (should never happen)
644:
645: ;Handle the pause request:
646:
647:0000036A 7202 moveq #2,d1 deactivate the pause control
648:0000036C 6100007E bsr GetItemHandle
649:00000370 3F3C00FF move.w #255,-(sp)
650:00000374 A95D _HiliteControl
651:
652:00000376 7203 moveq #3,d1 activate the resume control
653:00000378 61000072 bsr GetItemHandle
654:0000037C 4267 clr.w -(sp)
655:0000037E A95D _HiliteControl
656:
657:00000380 PauseLoop
658:00000380 61000032 bsr TestAbortEvent wait for an event in our abort box
659:00000384 67FA beq PauseLoop
660:00000386 0C410001 cmpi.w #1,d1 is it abort ?
661:0000038A 671A beq.s Abort yes
662:
663: ;Else it must be resume:
664:
665:0000038C 7203 moveq #3,d1 deactivate the resume control
666:0000038E 6100005C bsr GetItemHandle
667:00000392 3F3C00FF move.w #255,-(sp)
668:00000396 A95D _HiliteControl
669:
670:00000398 7202 moveq #2,d1 activate the pause control
671:0000039A 61000050 bsr GetItemHandle
672:0000039E 4267 clr.w -(sp)
673:000003A0 A95D _HiliteControl
674:
675:000003A2 8040 CAOK or d0,d0 clear carry for no abort
676:000003A4 4E75 rts
677:
678:000003A6 003C0001 Abort ori.b #1,CCR set carry for abort
679:000003AA 4E75 rts
680:
681: ;****************************************************************
682: ; Close the abort dialog box:
683:
684:000003AC CloseAbortBox
685:000003AC 2F2D0000 move.l DialogPtr,-(sp)
686:000003B0 A982 _CloseDialog
687:000003B2 4E75 rts
688:
689: ;****************************************************************
690: ; Test for an event in our abort/pause dialog box:
691: ; R: equal set if no events
692: ; d1.w = dialog box item no. which caused any event
693:
694:000003B4 loc
695:000003B4 TestAbortEvent
696:000003B4 4267 clr.w -(sp) clear space for function result
697:000003B6 3F3CFFFF move.w #$FFFF,-(sp) look for any event
698:000003BA 486D0000 pea EventRecord where to put event result
699:000003BE A970 _GetNextEvent any waiting events ?
700:000003C0 301F move.w (sp)+,d0
701:000003C2 6726 beq.s .Exit nope
702:
703:000003C4 4267 clr.w -(sp) is the event in a dialog box ?
704:000003C6 486D0000 pea EventRecord
705:000003CA A97F _IsDialogEvent
706:000003CC 301F move.w (sp)+,d0
707:000003CE 6700001A beq .Exit no
708:
709:000003D2 4267 clr.w -(sp) is it a hit in our dialog ?
710:000003D4 486D0000 pea EventRecord
711:000003D8 486D0000 pea DialogPtr
712:000003DC 486D0000 pea ItemHit
713:000003E0 A980 _DialogSelect
714:000003E2 301F move.w (sp)+,d0
715:000003E4 6704 beq.s .Exit no
716:
717:000003E6 322D0000 move.w ItemHit,d1 yes - rtn item no., clr equal
718:
719:000003EA 4E75 .Exit rts
720:
721: ;****************************************************************
722: ; Get a handle to a control item in the abort dialog box:
723: ; P: d1.w = the item no.
724: ; R: the handle on the stack
725:
726:000003EC GetItemHandle
727:000003EC 2F2D0000 move.l DialogPtr,-(sp)
728:000003F0 3F01 move.w d1,-(sp)
729:000003F2 486D0000 pea ItemType
730:000003F6 486D0000 pea ItemHandle
731:000003FA 486D0000 pea ItemBox
732:000003FE A98D _GetDItem
733:
734:00000400 205F move.l (sp)+,a0 ;get the rtn address
735:00000402 2F2D0000 move.l ItemHandle,-(sp) ;return the handle on the stack
736:00000406 4ED0 jmp (a0)
737:
738: ;****************************************************************
739: ; Send the style escape codes to the printer:
740:
741:00000408 loc
742:00000408 StyleToPrinter
743:00000408 303A0162 move.w ImageWriter,d0 no style choice if not ImageWriter
744:0000040C 6718 beq.s .Exit
745:
746:0000040E 123C001B move.b #$1B,d1 the escape code
747:00000412 61000072 bsr PrintChar
748:00000416 41FA0149 lea StyleEscapes-3,a0 ;the escape code table
749:0000041A 323A0152 move.w StyleNum,d1 current style no.
750:0000041E 12301000 move.b (a0,d1.w),d1 get the style eecape code
751:00000422 61000062 bsr PrintChar
752:
753:00000426 4E75 .Exit rts
754:
755: ;****************************************************************
756: ; Install a new menu from resource file:
757: ; P: d1.w = menu ID
758: ; R: d1.l = menu handle
759:
760:00000428 InstallMenu
761:00000428 6100000C bsr GetMenuHandle get the menu's handle
762:0000042C 2F17 move.l (sp),-(sp) make another stack copy of handle
763:0000042E 4267 clr.w -(sp) beforeID = 0 (after all other others)
764:00000430 A935 _InsertMenu insert the new menu
765:00000432 221F move.l (sp)+,d1 return the new handle
766:00000434 4E75 rts
767:
768: ;****************************************************************
769: ; Get a menu's handle:
770: ; P: d1.w = menu no.
771: ; R: (sp).l = the handle
772:
773:00000436 GetMenuHandle
774:00000436 42A7 clr.l -(sp) space for returned handle
775:00000438 3F01 move.w d1,-(sp) menu resource ID
776:0000043A A9BF _GetRMenu go get it
777:0000043C 221F move.l (sp)+,d1 get the handle off stack
778:0000043E 205F move.l (sp)+,a0 get return address too
779:00000440 2F01 move.l d1,-(sp) restack the handle
780:00000442 4ED0 jmp (a0) and return
781:
782: ;****************************************************************
783: ; Unhighlight any highlighted menu title:
784:
785:00000444 UnhighlightMenu
786:00000444 4267 clr.w -(sp)
787:00000446 A938 _HiliteMenu
788:00000448 4E75 rts
789:
790: ;****************************************************************
791: ;
792:
793:0000044A 3F3C0001 Beep move.w #1,-(sp)
794:0000044E A9C8 _SysBeep
795:00000450 207C0000 movea.l #120,a0
00000454 0078
796:00000456 A03B _Delay
797:00000458 4E75 rts
798:
799: ;****************************************************************
800: ; Read a byte from the input file:
801: ; R: d1.b = the byte
802: ; carry set if any errors
803:
804:0000045A loc
805:0000045A ReadByte
806:0000045A 41ED0000 lea DiskParms,a0 setup ptr to param blk
807:0000045E 43ED0000 lea ByteBuffer,a1 specify a buffer
808:00000462 21490020 move.l a1,ioBuffer
809:00000466 217C0000 move.l #1,ioByteCount read one byte at a time
0000046A 00010024
810:0000046E 4268002C clr.w ioPosMode relative to current mark
811:00000472 A002 _Read read it
812:
813:00000474 122D0000 move.b ByteBuffer,d1 return the byte
814:00000478 4A40 tst.w d0 any errors ?
815:0000047A 6604 bne.s .Err yes
816:0000047C 8241 or d1,d1 else clear carry
817:0000047E 4E75 rts
818:
819:00000480 003C0001 .Err ori.b #1,CCR set carry
820:00000484 4E75 rts
821:
822: ;****************************************************************
823: ; Print a character:
824: ; P: d1.b = the character
825:
826:00000486 loc
827:00000486 PrintChar
828:00000486 303A00EC move.w StripLF,d0 stripping LF's ?
829:0000048A 6706 beq.s .2 no
830:0000048C 0C01000A cmpi.b #$0A,d1 yes - is it a LF ?
831:00000490 6744 beq.s .Exit yes - ignore it
832:
833:00000492 0C010009 .2 cmpi.b #$09,d1 is it a tab ?
834:00000496 661A bne.s .8 no
835:00000498 303A00DE move.w Tabbing,d0 yes - are we expanding tabs ?
836:0000049C 6714 beq.s .8 no
837:
838: ;Expand tabs to stops on every 8 columns:
839:
840:0000049E 123C0020 .4 move.b #$20,d1 print a space
841:000004A2 61000034 bsr PrintByte
842:000004A6 302D0000 move.w Column,d0 on an 8th column yet ?
843:000004AA 02000007 andi.b #$07,d0
844:000004AE 66EE bne .4 not yet
845:000004B0 6024 bra.s .Exit yes - done
846:
847:000004B2 3F01 .8 move.w d1,-(sp) save the char a minute
848:000004B4 61000022 bsr PrintByte print it
849:000004B8 321F move.w (sp)+,d1 get char back
850:
851:000004BA 0C01000D cmpi.b #$0D,d1 is it a CR ?
852:000004BE 6616 bne.s .Exit no
853:000004C0 526D0000 addq.w #1,PageLines yes - count lines
854:000004C4 426D0000 clr.w Column reset column no.
855:
856:000004C8 303A00A8 move.w AddLF,d0 adding LF's to CR's ?
857:000004CC 6708 beq.s .Exit no
858:000004CE 123C000A move.b #$0A,d1 yes - add a LF
859:000004D2 61000004 bsr PrintByte
860:
861:000004D6 4E75 .Exit rts
862:
863: ;****************************************************************
864: ; Print a byte:
865: ; P: d1.b = the byte
866:
867:000004D8 loc
868:000004D8 PrintByte
869:000004D8 41ED0000 lea PrtOutParms,a0 setup ptr to param blk
870:000004DC 43ED0000 lea ByteBuffer,a1 specify a buffer
871:000004E0 21490020 move.l a1,ioBuffer
872:000004E4 1281 move.b d1,(a1) put the byte in the buffer
873:000004E6 217C0000 move.l #1,ioByteCount write one byte at a time
000004EA 00010024
874:
875:000004EE 0C01000D cmpi.b #$0D,d1 bump column if not CR or LF
876:000004F2 670A beq.s .2
877:000004F4 0C01000A cmpi.b #$0A,d1
878:000004F8 6704 beq.s .2
879:000004FA 526D0000 addq.w #1,Column else bump column no.
880:
881:000004FE 303A0070 .2 move.w PortNum,d0
882:00000502 0C400002 cmpi.w #2,d0
883:00000506 6704 beq.s OSPRTK
884:00000508 A003 _Write
885:0000050A 4E75 rts
886:
887: ; ==> This stuff in upper case was added so that List would work
888: ; ==> under the FastFinder. It's not needed under Apple's Finder.
889: ; ==> It goes right to the SCC chip to monitor the CTS line because
890: ; ==> characters were dropping under FastFinder!
891:
892:0000050C 48E76080 OSPRTK MOVEM.L D1-D2/A0,-(SP)
893:00000510 207C009F MOVE.L #$9FFFF8,A0
00000514 FFF8
894:00000516 1410 MOVE.B (A0),D2
895:
896:00000518 D1FC0020 OSPRT2 ADD.L #$200001,A0
0000051C 0001
897:0000051E 10BC0000 MOVE.B #0,(A0)
898:00000522 3E97 MOVE.W (A7),(A7)
899:00000524 10BC0010 MOVE.B #$10,(A0)
900:00000528 91FC0020 SUB.L #$200001,A0
0000052C 0001
901:0000052E 1410 MOVE.B (A0),D2 DO WE HAVE CTS ?
902:00000530 08020005 BTST #5,D2
903:00000534 66E2 BNE.S OSPRT2 NO - PRINTER IS BUSY
904:
905:00000536 1410 MOVE.B (A0),D2
906:00000538 3E97 OSD2 MOVE.W (A7),(A7)
907:0000053A 1410 MOVE.B (A0),D2
908:0000053C 08020002 BTST #2,D2 TX EMPTY ?
909:00000540 67F6 BEQ.S OSD2 NO - WAIT
910:
911:00000542 2F08 MOVE.L A0,-(SP)
912:00000544 D1FC0020 ADD.L #$200001,A0
00000548 0001
913:0000054A 11410004 MOVE.B D1,4(A0)
914:0000054E 205F MOVE.L (SP)+,A0
915:
916:00000550 1410 MOVE.B (A0),D2 WAIT FOR CHAR TO GET OUT
917:00000552 3E97 OSD4 MOVE.W (A7),(A7)
918:00000554 1410 MOVE.B (A0),D2
919:00000556 08020002 BTST #2,D2
920:0000055A 67F6 BEQ.S OSD4
921:
922:0000055C 1410 MOVE.B (A0),D2
923:0000055E 4CDF0106 MOVEM.L (SP)+,D1-D2/A0
924:00000562 4E75 RTS
925:
926: ;****************************************************************
927: ; Table of escape codes to ImageWriter for various styles:
928:
929:00000564 StyleEscapes
930:00000564 6E4E4570 dc.b $6E,$4E,$45,$70
931:00000568 50657151 dc.b $50,$65,$71,$51
932:
933: ;****************************************************************
934: ; Initialized data storage area:
935:
936:0000056C FFFF ImageWriter dc.w $FFFF true or false
937:0000056E 0009 StyleNum dc.w 9 current print style no.
938:
939:00000570 0002 PortNum dc.w 2 1 = port A, 2 = port B
940:00000572 FFFF AddLF dc.w $FFFF true or false
941:00000574 0000 StripLF dc.w 0 true or false
942:00000576 FFFF Paging dc.w $FFFF pagination - true or false
943:00000578 FFFF Tabbing dc.w $FFFF tab expansion - true or false
944:
945: ;****************************************************************
McASM V1.0 Filename: LIST.ASM Page no. 19
File lister application Mon, Jul 15, 1985 1:56:19 PM
947: ;****************************************************************
948: ;****************************************************************
949:
950: ;This is the resource portion of the LIST application. It uses
951: ;the in-line resource compiling capabilities of McAsm.
952:
953: ;****************************************************************
954: ;Some equates we'll need:
955:
956:00000012 chk equ $12 check mark char
957:0000FFFF visible equ $FFFF true boolean
958:00000000 nogoaway equ 0 false boolean
959:
960: ;DITL types:
961:
962:00000004 button equ 4
963:00000008 statictext equ 8
964:
965: ;****************************************************************
966: ;Version data is a string whose type is the signature of the
967: ;application - we have to define our own resource for this 'cause
968: ;it's a non-standard type:
969:
970: ; ('[[...]]' are McAsm's user defined resource delimiters.)
971:
972:
973:0000057A [[ LIST,0 ID is 0 by convention, no attr or name
974:0000057A 154C6973 text #"Lister, V1.1, 7-12-85"
975:00000590 ]]
976:
977: ;****************************************************************
978: ;All the rest are standard resource types:
979:
980: ; ('$$' is McAsm's delimiter for a standard resource definition.)
981:
982: ;****************************************************************
983: ;Tell the Finder that we have bundle info in this application:
984:
985:00000590 $$ BNDL,128 bundle resc, ID = 128
986:00000590 4C495354 LIST the application's signature again
987:00000594 0000 0 ID is again 0 by convention
988:00000596 0001 2 two resc types in the BNDL list:
989:
990:00000598 49434E23 ICN#,1 map one icon list:
0000059C 0000
991:0000059E 00000080 0,128 local ID 0 -> actual ID 128
992:
993:000005A2 46524546 FREF,1 map one FREF list:
000005A6 0000
994:000005A8 00000080 0,128 local ID 0 -> actual ID 128
995:
996: ;****************************************************************
997: ;Our bundle's FREF resource:
998:
999:000005AC $$ FREF,128 FREF resc, ID = 128
1000:000005AC 4150504C APPL filetype
1001:000005B0 0000 0 local ID for icon list
1002:000005B2 00 | no filename follows the application
1003:
1004: ;****************************************************************
1005: ;This is our unique desktop icon and it's selected mask. To get
1006: ;this to display, we'll have to set the 'bundle bit' in the final
1007: ;linked file and then re-init the desktop by holding down the command
1008: ;and option keys as we execute the Finder. (FEDIT or something
1009: ;similar can be used to set the bundle bit.)
1010:
1011:000005B3 $$ ICN#,128 an icon list, ID = 128
1012:
1013:000005B3 00000000 $00000000,$00000000,$1FE00000,$20100000
000005B7 00000000
000005BB 1FE00000
000005BF 20100000
1014:000005C3 2FD00000 $2FD00000,$28500000,$28500000,$2FD00000
000005C7 28500000
000005CB 28500000
000005CF 2FD00000
1015:000005D3 20100000 $20100000,$3FF00000,$20100000,$21DC3F80
000005D7 3FF00000
000005DB 20100000
000005DF 21DC3F80
1016:000005E3 201460C0 $201460C0,$2014C030,$3FF48018,$000D800C
000005E7 2014C030
000005EB 3FF48018
000005EF 000D800C
1017:000005F3 01F901E6 $01F901E6,$06010323,$1803FFF1,$301E03B1
000005F7 06010323
000005FB 1803FFF1
000005FF 301E03B1
1018:00000603 20F00E31 $20F00E31,$23001839,$33FFF029,$1E00102D
00000607 23001839
0000060B 33FFF029
0000060F 1E00102D
1019:00000613 0200D065 $0200D065,$0200D1C6,$02001301,$02001C00
00000617 0200D1C6
0000061B 02001301
0000061F 02001C00
1020:00000623 03FFF800 $03FFF800,$00000000,$3FF80000,$7FF80000
00000627 00000000
0000062B 3FF80000
0000062F 7FF80000
1021:00000633 00000000 $00000000,$1FF00000,$3FF80000,$7FF80000
00000637 1FF00000
0000063B 3FF80000
0000063F 7FF80000
1022:00000643 7FF80000 $7FF80000,$7FF80000,$7FF80000,$7FF80000
00000647 7FF80000
0000064B 7FF80000
0000064F 7FF80000
1023:00000653 7FF80000 $7FF80000,$7FF80000,$7FFE3F80,$7FFE7FC0
00000657 7FF80000
0000065B 7FFE3F80
0000065F 7FFE7FC0
1024:00000663 7FFEFFF0 $7FFEFFF0,$7FFFFFF8,$7FFFFFFC,$7FFFFFFE
00000667 7FFFFFF8
0000066B 7FFFFFFC
0000066F 7FFFFFFE
1025:00000673 07FFFFFF $07FFFFFF,$1FFFFFFF,$3FFFFFFF,$7FFFFFFF
00000677 1FFFFFFF
0000067B 3FFFFFFF
0000067F 7FFFFFFF
1026:00000683 7FFFFFFF $7FFFFFFF,$7FFFFFFF,$7FFFFFFF,$3FFFFFFF
00000687 7FFFFFFF
0000068B 7FFFFFFF
0000068F 3FFFFFFF
1027:00000693 1FFFFFFF $1FFFFFFF,$07FFFFEF,$07FFFFC7,$07FFFF01
00000697 07FFFFEF
0000069B 07FFFFC7
0000069F 07FFFF01
1028:000006A3 07FFFC00 $07FFFC00,$07FFF800,$00000000,$00000000
000006A7 07FFF800
000006AB 00000000
000006AF 00000000
1029:
1030: ;****************************************************************
1031: ;This is our 'About' menu:
1032:
1033:000006B3 $$ MENU,1 menu ID 1
1034:000006B3 00010000 0,0,0 placeholders for some stuff
000006B7 00000000
000006BB 0000
1035:000006BD FFFFFFFB $FFFFFFFB enable mask - item 2 disabled
1036:000006C1 0114 "/$14" menu title = apple char
1037:000006C3 2 two items in this menu:
1038: ; item 1:
1039:000006C3 0D41626F About List... the menu item
000006C7 7574204C
000006CB 6973742E
000006CF 2E2E
1040:000006D1 0000 0,0 no icon, no keybd equivalent
1041:000006D3 0000 0,0 no marking char, text style = plain
1042: ; item 2:
1043:000006D5 0D2D2D2D ------------- the item - draw a disabled line
000006D9 2D2D2D2D
000006DD 2D2D2D2D
000006E1 2D2D
1044:000006E3 00000000 0,0,0,0 no icon, no kybd, no mark, plain text
000006E7 00
1045:
1047: ;This is our 'File' menu:
1048:
1049:000006E8 $$ MENU,2 menu ID 2
1050:000006E8 00020000 0,0,0 placeholders for some stuff
000006EC 00000000
000006F0 0000
1051:000006F2 FFFFFFFF $FFFFFFFF enable mask - everything enabled
1052:000006F6 0446696C File menu title
000006FA 65
1053:000006FB 2 two items in this menu:
1054: ; item 1:
1055:000006FB 074C6973 Listing the menu item
000006FF 74696E67
1056:00000703 00000000 0,0,0,0 no icon, no kybd, no mark, plain text
1057: ; item 2:
1058:00000707 04517569 Quit the menu item
0000070B 74
1059:0000070C 00000000 0,0,0,0 no icon, no kybd, no mark, plain text
00000710 00
1060:
1061: ;****************************************************************
1062: ;This is our 'Style' menu:
1063:
1064:00000711 $$ MENU,3 menu ID 3
1065:00000711 00030000 0,0,0 placeholders for some stuff
00000715 00000000
00000719 0000
1066:0000071B FFFFFFFB $FFFFFFFB enable mask - everything enabled but item 2
1067:0000071F 05537479 Style menu title
00000723 6C65
1068:00000725 10 ten items in this menu:
1069: ; item 1:
1070:00000725 0B496D61 ImageWriter the menu item
00000729 67655772
0000072D 69746572
1071:00000731 00001200 0,0,chk,0 no icon, no kybd, check mark, plain text
1072: ; item 2:
1073:00000735 142D2D2D -------------------- disabled line
00000739 2D2D2D2D
0000073D 2D2D2D2D
00000741 2D2D2D2D
00000745 2D2D2D2D
00000749 2D
1074:0000074A 00000000 0,0,0,0 no icon, no kybd, no mark, plain text
1075: ; item 3:
1076:0000074E 10457874 Extended 72 the item
00000752 656E6465
00000756 64202020
0000075A 20202037
0000075E 32
1077:0000075F 00000000 0,0,0,0 nothing special
1078: ; item 4:
1079:00000763 14504943 PICA 80
00000767 41202020
0000076B 20202020
0000076F 20202020
00000773 20202038
00000777 30
1080:00000778 00000000 0,0,0,0
1081: ; item 5:
1082:0000077C 14454C49 ELITE 96
00000780 54452020
00000784 20202020
00000788 20202020
0000078C 20202039
00000790 36
1083:00000791 00000000 0,0,0,0
1084: ; item 6:
1085:00000795 10504943 PICA prop. --
00000799 41207072
0000079D 6F702E20
000007A1 2020202D
000007A5 2D
1086:000007A6 00000000 0,0,0,0
1087: ; item 7:
1088:000007AA 10454C49 ELITE prop. --
000007AE 54452070
000007B2 726F702E
000007B6 2020202D
000007BA 2D
1089:000007BB 00000000 0,0,0,0
1090: ; item 8:
1091:000007BF 0F53656D Semicond. 108
000007C3 69636F6E
000007C7 642E2020
000007CB 20313038
1092:000007CF 00000000 0,0,0,0
1093: ; item 9:
1094:000007D3 0E436F6E Condensed 120
000007D7 64656E73
000007DB 65642020
000007DF 313230
1095:000007E2 00001200 0,0,chk,0 check mark on this one
1096: ; item 10:
1097:000007E6 10556C74 Ultracond. 132
000007EA 7261636F
000007EE 6E642E20
000007F2 20203133
000007F6 32
1098:000007F7 00000000 0,0,0,0
000007FB 00
1099:
1100: ;****************************************************************
1101: ;This is our 'Options' menu:
1102:
1103:000007FC $$ MENU,4 menu ID 4
1104:000007FC 00040000 0,0,0 placeholders for some stuff
00000800 00000000
00000804 0000
1105:00000806 FFFFFE97 $FFFFFE97 enable mask - 3,5,6,8 disabled
1106:0000080A 074F7074 Options menu title
0000080E 696F6E73
1107:00000812 9 nine items in this menu:
1108: ; item 1:
1109:00000812 0D506F72 Port A, modem the menu item
00000816 7420412C
0000081A 206D6F64
0000081E 656D
1110:00000820 00000000 0,0,0,0 no icon, no kybd, no mark, plain text
1111: ; item 2:
1112:00000824 0F506F72 Port B, printer the item
00000828 7420422C
0000082C 20707269
00000830 6E746572
1113:00000834 00001200 0,0,chk,0 check mark on this one
1114: ; item 3:
1115:00000838 132D2D2D ------------------- another disabled line
0000083C 2D2D2D2D
00000840 2D2D2D2D
00000844 2D2D2D2D
00000848 2D2D2D2D
1116:0000084C 00000000 0,0,0,0 nothing special
1117: ; item 4:
1118:00000850 0E416464 Add LFs to CRs the item
00000854 204C4673
00000858 20746F20
0000085C 435273
1119:0000085F 00001200 0,0,chk,0 another check mark
1120: ; item 5:
1121:00000863 09537472 Strip LFs this one's disabled
00000867 6970204C
0000086B 4673
1122:0000086D 00000000 0,0,0,0
1123: ; item 6:
1124:00000871 132D2D2D ------------------- another disabled line
00000875 2D2D2D2D
00000879 2D2D2D2D
0000087D 2D2D2D2D
00000881 2D2D2D2D
1125:00000885 00000000 0,0,0,0
1126: ; item 7:
1127:00000889 13506167 Pagination, 60 lppg the item
0000088D 696E6174
00000891 696F6E2C
00000895 20363020
00000899 6C707067
1128:0000089D 00001200 0,0,chk,0 and yet another check mark
1129: ; item 8:
1130:000008A1 132D2D2D ------------------- yet another disabled line
000008A5 2D2D2D2D
000008A9 2D2D2D2D
000008AD 2D2D2D2D
000008B1 2D2D2D2D
1131:000008B5 00000000 0,0,0,0
1132: ; item 9:
1133:000008B9 14204578 Expand tabs, 8 spcs
000008BD 70616E64
000008C1 20746162
000008C5 732C2038
000008C9 20737063
000008CD 73
1134:000008CE 00001200 0,0,chk,0 check mark on this one
000008D2 00
1135:
1136: ;****************************************************************
1137: ;This is the 'About' dialog box:
1138:
1139:000008D3 $$ DLOG,1 dialog, ID = 1
1140:000008D3 00640064 100,100,190,400 bounds rectangle
000008D7 00BE0190
1141:000008DB 0001 1 type = modal dialog box
1142:000008DD FFFF visible initial state
1143:000008DF 0000 nogoaway no close box
1144:000008E1 00000000 0 refcon
1145:000008E5 0001 1 resc ID of DLOG's item list
1146:000008E7 00 | no title
1147:
1148:000008E8 $$ DITL,1 item list for above
1149:000008E8 0002 3 three items in this list:
1150: ; item 1:
1151:000008EA 00000000 0 handle holder
1152:000008EE 000F0014 15,20,36,300 display rectangle
000008F2 0024012C
1153:000008F6 08 statictext item type
1154:000008F7 1E416C6C All I wanted was a listing... the item
000008FB 20492077
000008FF 616E7465
00000903 64207761
00000907 73206120
0000090B 6C697374
0000090F 696E672E
00000913 2E2E20
1155: ; item 2:
1156:00000916 00000000 0 handle holder
1157:0000091A 00230014 35,20,56,300 display rectangle
0000091E 0038012C
1158:00000922 08 statictext item type
1159:00000923 16202020 " By Dave McWherter" the item
00000927 20204279
0000092B 20446176
0000092F 65204D63
00000933 57686572
00000937 746572
1160: ; item 3:
1161:0000093A 00000000 0 handle holder
1162:0000093E 003C00E6 60,230,80,290 display rectangle
00000942 00500122
1163:00000946 04 button item type
1164:00000947 024F4B OK button's title
1165:
1166: ;****************************************************************
1167: ;This is the 'Change your mind?' dialog box:
1168:
1169:0000094A $$ DLOG,2 dialog, ID = 2
1170:0000094A 00640064 100,100,220,235 bounds rectangle
0000094E 00DC00EB
1171:00000952 0001 1 type = modal dialog box
1172:00000954 FFFF visible initial state
1173:00000956 0000 nogoaway no close box
1174:00000958 00000000 0 refcon
1175:0000095C 0002 2 resc ID of DLOG's item list
1176:0000095E 11436861 Change your mind? the title
00000962 6E676520
00000966 796F7572
0000096A 206D696E
0000096E 643F
1177:
1178:00000970 $$ DITL,2 item list for above
1179:00000970 0002 3 three items in this list:
1180: ; item 1:
1181:00000972 00000000 0 handle holder
1182:00000976 000F0014 15,20,35,95 display rectangle
0000097A 0023005F
1183:0000097E 04 button item type
1184:0000097F 0641626F Abort button's title
00000983 727420
1185: ; item 2:
1186:00000986 00000000 0 handle holder
1187:0000098A 00320014 50,20,70,95 display rectangle
0000098E 0046005F
1188:00000992 04 button item type
1189:00000993 06506175 Pause button's title
00000997 736520
1190: ; item 3:
1191:0000099A 00000000 0 handle holder
1192:0000099E 00550014 85,20,105,95 display rectangle
000009A2 0069005F
1193:000009A6 04 button item type
1194:000009A7 06526573 Resume button's title
000009AB 756D65
1195:
1196: ;****************************************************************
1197:
1198:000009AE end
Number of errors = 0
Cross Reference List Filename: LIST.ASM Page no. 28
File lister application Mon, Jul 15, 1985 1:56:19 PM
Abort 000003A6 LAB < 678> 641 661
About 000000E2 LAB < 328> 308
AddLF 00000572 DW < 940> 554 856
AOutStr 000001F4 TXT < 454> 397
AppleMen 000000BE LAB < 306> 294
Beep 0000044A LAB < 793> ****
BOutStr 000001FA TXT < 455> 400
button 00000004 EQU < 962> 1163 1183 1188 1193
ByteBuff 000000A0 DS < 149> 807 813 870
CAOK 000003A2 LAB < 675> 639 643
CheckAbo 00000358 LAB < 637> 414
chk 00000012 EQU < 956> 1071 1095 1113 1119 1128 1134
CloseAbo 000003AC LAB < 684> 442
Column 00000292 DS < 184> 409 842 854 879
csCode 0000001A EQU < 111> ****
csParam 0000001C EQU < 115> ****
DeskName 0000026E DS < 180> 316 320
DialogPt 00000108 DS < 174> 622 685 711 727
DiskParm 00000000 EQU < 143> 235 381 444 806
DisplayA 00000332 LAB < 615> 407
DStorage 0000010C DS < 175> 331 618
EventLoc 000000AC DS < 156> 272 287
EventMes 000000A4 DS < 154> ****
EventMod 000000B0 DS < 157> ****
EventRec 000000A2 EQU < 152> 250 607 698 704 710
EventTim 000000A8 DS < 155> ****
EventTyp 000000A2 DS < 153> 255
FileMenu 00000106 LAB < 349> 296
GetItemH 000003EC LAB < 726> 628 648 653 666 671
GetMenuH 00000436 LAB < 773> 313 470 502 532 551 563 585
598 761
ImageWri 0000056C DW < 936> 436 491 508 743
InstallM 00000428 LAB < 760> 211 217 220 223
ioBuffer 00000020 DS < 118> 808 871
ioByteCo 00000024 DS < 119> 809 873
ioCmdAdd 00000008 DS < 102> ****
ioComple 0000000C DS < 104> ****
ioDrvNum 00000016 DS < 108> ****
ioFileNa 00000012 DS < 106> 383 402
ioFileTy 0000001A DS < 112> ****
ioFQElSi 00000050 EQU < 126> 144 147 236
ioLink 00000000 DS < 99> ****
ioNumDon 00000028 DS < 120> ****
ioOwnBuf 0000001C DS < 116> ****
ioPermss 0000001B DS < 113> 385
ioPosMod 0000002C DS < 122> 810
ioPosOff 0000002E DS < 123> ****
ioRefNum 00000018 DS < 109> ****
ioResult 00000010 DS < 105> ****
ioTrap 00000006 DS < 101> ****
ioType 00000004 DS < 100> ****
ioVRefNu 00000016 EQU < 107> 384
ItemBox 00000266 DS < 178> 731
ItemHand 00000260 DS < 176> 730 735
ItemHit 00000106 DS < 172> 339 712 717
ItemType 00000264 DS < 177> 729
IW2 00000268 LAB < 514> 509
IW4 0000026A LAB < 516> 512
IWItem 0000023A LAB < 491> 474
IWLoop 00000258 LAB < 506> 518
LF2 000002E2 LAB < 570> 567
LF4 000002EC LAB < 577> 572
LF6 000002EE LAB < 579> 575
LIST 00000000 MOD < 0> ****
Listing 0000011A LAB < 360> 351
MenuBar 0000008E LAB < 285> ****
MenuHand 000000B6 DS < 161> 503 506
MenuItem 000000BA DS < 162> 291 315
MouseDow 00000072 LAB < 270> 258
NewOptio 00000290 DS < 183> 526 539 544 552 564
NewPage 00000190 LAB < 411> 429
NewStyle 0000028E DS < 182> 468 472 481 486
nogoaway 00000000 EQU < 958> 1143 1173
NulStr 000001F2 TXT < 453> 366
OptionLF 000002A6 LAB < 547> 528
OptionMe 00000276 LAB < 525> 300
OptionPa 000002F2 LAB < 581> 549
OptionPa 00000306 LAB < 588> 601
OptionPo 00000280 LAB < 530> ****
OptionTa 00000314 LAB < 596> 583
OSD2 00000538 LAB < 906> 909
OSD4 00000552 LAB < 917> 920
OSPRT2 00000518 LAB < 896> 903
OSPRTK 0000050C LAB < 892> 883
PageLine 00000294 DS < 185> 411 423 853
Paging 00000576 DW < 942> 421 431 587
PauseLoo 00000380 LAB < 657> 659
PortNum 00000570 DW < 939> 393 535 543 881
PrintByt 000004D8 LAB < 868> 841 848 859
PrintCha 00000486 LAB < 827> 419 428 434 439 441 747 751
PrtOutPa 00000050 EQU < 146> 392 869
Quit 00000200 LAB < 461> 353
ReadByte 0000045A LAB < 805> 417
Selectio 0000006C LAB < 263> 323 344 450 487 520 545 579
594
SFCopy 000000BD DS < 166> ****
SFGood 000000BC DS < 165> 376
SFName 000000C6 DS < 170> 382
SFReply 000000BC EQU < 164> 372
SFType 000000BE DS < 167> ****
SFVersio 000000C4 DS < 169> ****
SFVRefNu 000000C2 DS < 168> 384
Start 00000000 LAB < 198> ****
staticte 00000008 EQU < 963> 1153 1158
StripLF 00000574 DW < 941> 828
StyleEsc 00000564 LAB < 929> 748
StyleMen 00000206 LAB < 467> 298
StyleNum 0000056E DW < 937> 477 485 749
StyleToP 00000408 LAB < 742> 408
SystemWi 00000324 LAB < 606> 278
Tabbing 00000578 DW < 943> 600 835
TestAbor 000003B4 LAB < 695> 638 658
Unhighli 00000444 LAB < 785> 264 461
visible 0000FFFF EQU < 957> 1142 1172
WaitForE 0000004E LAB < 243> 253 257 265 280 301 354 610
WindowPt 000000B2 DS < 159> 273 608
_AddResM 0000A94D TRP < 51> 214
_CheckIt 0000A945 TRP < 52> 479 483 497 537 541 560 593
_Close 0000A001 TRP < 53> 445
_CloseDi 0000A982 TRP < 54> 343 686
_Delay 0000A03B TRP < 55> 796
_DialogS 0000A980 TRP < 56> 713
_Disable 0000A93A TRP < 57> 511 577
_DrawMen 0000A937 TRP < 58> 225
_EnableI 0000A939 TRP < 59> 514 574
_FindWin 0000A92C TRP < 60> 274
_FlushEv 0000A032 TRP < 61> 230
_GetDIte 0000A98D TRP < 62> 732
_GetItem 0000A946 TRP < 63> 317
_GetNewD 0000A97C TRP < 65> 333 620
_GetNext 0000A970 TRP < 64> 251 699
_GetRMen 0000A9BF TRP < 66> 776
_HiliteC 0000A95D TRP < 67> 630 650 655 668 673
_HiliteM 0000A938 TRP < 68> 787
_InitCur 0000A850 TRP < 69> 231
_InitDia 0000A97B TRP < 70> 205
_InitFon 0000A8FE TRP < 71> 200
_InitGra 0000A86E TRP < 72> 199
_InitMen 0000A930 TRP < 73> 202
_InitWin 0000A912 TRP < 74> 201
_InsertM 0000A935 TRP < 75> 764
_IsDialo 0000A97F TRP < 76> 705
_MenuSel 0000A93D TRP < 77> 288
_ModalDi 0000A991 TRP < 78> 340
_Open 0000A000 TRP < 79> 386 403
_OpenDes 0000A9B6 TRP < 80> 321
_Pack3 0000A9EA TRP < 81> 374
_Read 0000A002 TRP < 82> 811
_SetPort 0000A873 TRP < 83> 336 623
_SysBeep 0000A9C8 TRP < 84> 794
_SystemC 0000A9B3 TRP < 85> 609
_SystemT 0000A9B4 TRP < 86> 244 413
_TEInit 0000A9CC TRP < 87> 206
_Write 0000A003 TRP < 88> 884
McLink V1.0, Link Map for file: LIST.APPL
** Module Map **
Mod Code A5 A5 Resc
Base Size Org Size Size Module ID
0000 057A 0396 0296 0434 LIST
** External Symbols **
Value Name