home *** CD-ROM | disk | FTP | other *** search
/ For Beginners & Professional Hackers / cd.iso / softcrc / libs / asmwin13.arj < prev    next >
ARJ Archive  |  1997-07-22  |  85.3 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: ARJ Archive (archive/arj).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert ARJ Archive (archive/arj) magic Supported
100% file ARJ archive data, v6, slash-switched, created 22 jul 1980+17, original name: ASMWIN13.ARJ, os: MS-DOS default
99% file data default
66% TrID ARJ compressed archive (standard) default
33% TrID ARJ compressed archive default
100% dearkID deark: arj (ARJ) default
100% siegfried fmt/610 ARJ File Format default
100% lsar ARJ default
100% gt2 ARJ Archiv gefunden (Auflistung ist deaktiviert) default
100% detectItEasy Archive: ARJ(6) default
100% binwalkID ARJ archive data, header size: 133, version 6, minimum version to extract: 1, slash-switched, compression method: stored, file type: comment header, original name: "ASMWIN13.ARJ", original file date: 1988-08-03 03:30:36, compressed file size: 586582236, uncompressed file size: 0, os: MS-DOS default
100% xdgMime application/x-arj default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 60 ea 85 00 1e 06 01 00 | 10 00 02 dc dc 88 f6 22 |`.......|......."|
|00000010| dc 88 f6 22 00 00 00 00 | 00 00 00 00 00 00 00 00 |..."....|........|
|00000020| 00 00 41 53 4d 57 49 4e | 31 33 2e 41 52 4a 00 0a |..ASMWIN|13.ARJ..|
|00000030| 20 20 20 20 41 72 63 68 | 69 76 65 20 46 72 6f 6d | Arch|ive From|
|00000040| 0a 20 48 20 41 20 43 20 | 4b 20 45 20 52 27 73 20 |. H A C |K E R's |
|00000050| 20 20 43 20 44 0a 20 20 | 20 20 20 43 72 65 61 74 | C D. | Creat|
|00000060| 65 64 20 42 79 0a 20 20 | 57 68 69 74 65 20 45 61 |ed By. |White Ea|
|00000070| 67 6c 65 20 5b 52 43 44 | 5d 0a 20 20 20 20 20 20 |gle [RCD|]. |
|00000080| 20 20 31 39 39 37 0a 0a | 00 f2 98 c6 d1 00 00 60 | 1997..|.......`|
|00000090| ea 2b 00 1e 06 01 00 10 | 00 00 dc d9 4a 38 12 48 |.+......|....J8.H|
|000000a0| 11 00 00 48 11 00 00 a2 | fe 1a eb 00 00 20 00 00 |...H....|..... ..|
|000000b0| 00 57 49 4e 44 4f 57 53 | 2e 44 4f 43 00 00 2c 12 |.WINDOWS|.DOC..,.|
|000000c0| a2 9b 00 00 4d 6f 64 75 | 6c 65 20 20 3a 20 57 49 |....Modu|le : WI|
|000000d0| 4e 44 4f 57 53 2e 41 53 | 4d 20 2d 20 41 73 73 65 |NDOWS.AS|M - Asse|
|000000e0| 6d 62 6c 79 20 6c 65 76 | 65 6c 20 77 69 6e 64 6f |mbly lev|el windo|
|000000f0| 77 69 6e 67 20 72 6f 75 | 74 69 6e 65 73 0d 0a 41 |wing rou|tines..A|
|00000100| 75 74 68 6f 72 20 20 3a | 20 54 68 6f 6d 61 73 20 |uthor :| Thomas |
|00000110| 48 69 6c 6c 0d 0a 56 65 | 72 73 69 6f 6e 20 3a 20 |Hill..Ve|rsion : |
|00000120| 31 2e 30 0d 0a 44 61 74 | 65 20 20 20 20 3a 20 30 |1.0..Dat|e : 0|
|00000130| 31 2f 32 30 2f 38 39 0d | 0a 0d 0a 54 68 69 73 20 |1/20/89.|...This |
|00000140| 69 73 20 61 20 73 65 74 | 20 6f 66 20 61 73 73 65 |is a set| of asse|
|00000150| 6d 62 6c 79 20 72 6f 75 | 74 69 6e 65 73 2c 20 77 |mbly rou|tines, w|
|00000160| 72 69 74 74 65 6e 20 66 | 6f 72 20 75 73 65 20 77 |ritten f|or use w|
|00000170| 69 74 68 20 42 6f 72 6c | 61 6e 64 73 20 54 41 53 |ith Borl|ands TAS|
|00000180| 4d 0d 0a 61 73 73 65 6d | 62 6c 65 72 2c 20 77 68 |M..assem|bler, wh|
|00000190| 69 63 68 20 70 72 6f 76 | 69 64 65 73 20 74 68 65 |ich prov|ides the|
|000001a0| 20 70 72 69 6d 69 74 69 | 76 65 20 72 6f 75 74 69 | primiti|ve routi|
|000001b0| 6e 65 73 20 6e 65 65 64 | 65 20 74 6f 20 6d 61 6e |nes need|e to man|
|000001c0| 61 67 65 20 77 69 6e 64 | 6f 77 73 0d 0a 69 6e 20 |age wind|ows..in |
|000001d0| 61 73 73 65 6d 62 6c 79 | 20 63 6f 64 65 2e 0d 0a |assembly| code...|
|000001e0| 0d 0a 54 68 61 6e 6b 73 | 20 74 6f 20 44 61 76 65 |..Thanks| to Dave|
|000001f0| 20 42 65 6e 6e 65 74 74 | 20 66 6f 72 20 74 68 65 | Bennett| for the|
|00000200| 20 75 6e 64 65 72 6c 79 | 69 6e 67 20 64 69 72 65 | underly|ing dire|
|00000210| 63 74 20 76 69 64 65 6f | 20 72 6f 75 74 69 6e 65 |ct video| routine|
|00000220| 73 20 22 56 49 44 45 4f | 2e 41 53 4d 22 2c 0d 0a |s "VIDEO|.ASM",..|
|00000230| 61 6c 73 6f 20 69 6e 63 | 6c 75 64 65 64 20 69 6e |also inc|luded in|
|00000240| 20 74 68 69 73 20 61 72 | 63 68 69 76 65 20 66 69 | this ar|chive fi|
|00000250| 6c 65 2e 0d 0a 0d 0a 54 | 68 65 20 66 6f 6c 6c 6f |le.....T|he follo|
|00000260| 77 69 6e 67 20 72 6f 75 | 74 69 6e 65 73 20 61 72 |wing rou|tines ar|
|00000270| 65 20 70 72 6f 76 69 64 | 65 64 3a 0d 0a 0d 0a 2d |e provid|ed:....-|
|00000280| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000290| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 0d 0a 20 20 20 20 |--------|--.. |
|000002a0| 49 6e 69 74 57 69 6e 64 | 6f 77 73 20 20 50 72 65 |InitWind|ows Pre|
|000002b0| 70 61 72 65 20 74 68 65 | 20 77 69 6e 64 6f 77 20 |pare the| window |
|000002c0| 61 72 72 61 79 73 2c 20 | 63 68 65 63 6b 20 66 6f |arrays, |check fo|
|000002d0| 72 20 61 76 61 69 6c 61 | 62 6c 65 20 44 4f 53 20 |r availa|ble DOS |
|000002e0| 6d 65 6d 6f 72 79 2e 0d | 0a 20 20 20 20 20 20 20 |memory..|. |
|000002f0| 20 20 20 20 20 20 20 20 | 20 20 49 66 20 44 4f 53 | | If DOS|
|00000300| 20 72 65 70 6f 72 74 73 | 20 6e 6f 20 61 76 69 61 | reports| no avia|
|00000310| 6c 61 62 6c 65 20 6d 65 | 6d 6f 72 79 2c 20 74 68 |lable me|mory, th|
|00000320| 65 6e 20 74 68 65 20 72 | 6f 75 74 69 6e 65 20 72 |en the r|outine r|
|00000330| 65 74 75 72 6e 73 0d 0a | 20 20 20 20 20 20 20 20 |eturns..| |
|00000340| 20 20 20 20 20 20 20 20 | 20 77 69 74 68 20 74 68 | | with th|
|00000350| 65 20 43 41 52 52 59 20 | 66 6c 61 67 20 53 45 54 |e CARRY |flag SET|
|00000360| 2e 0d 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |... | |
|00000370| 20 20 20 20 4e 6f 74 65 | 20 74 68 61 74 20 49 6e | Note| that In|
|00000380| 69 74 57 69 6e 64 6f 77 | 73 20 77 69 6c 6c 20 73 |itWindow|s will s|
|00000390| 61 76 65 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 |ave the |current |
|000003a0| 63 6f 6e 74 65 6e 74 73 | 20 6f 66 20 74 68 65 0d |contents| of the.|
|000003b0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000003c0| 20 20 73 63 72 65 65 6e | 20 69 6e 74 6f 20 77 69 | screen| into wi|
|000003d0| 6e 64 6f 77 20 23 30 2e | 20 20 49 66 20 79 6f 75 |ndow #0.| If you|
|000003e0| 72 20 70 72 6f 67 72 61 | 6d 20 63 61 6c 6c 73 20 |r progra|m calls |
|000003f0| 45 72 61 73 65 54 6f 70 | 57 69 6e 0d 0a 20 20 20 |EraseTop|Win.. |
|00000400| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 6a 75 | | ju|
|00000410| 73 74 20 62 65 66 6f 72 | 65 20 65 78 69 74 74 69 |st befor|e exitti|
|00000420| 6e 67 2c 20 74 68 65 20 | 73 63 72 65 65 6e 20 77 |ng, the |screen w|
|00000430| 68 69 63 68 20 77 61 73 | 20 70 72 65 73 65 6e 74 |hich was| present|
|00000440| 20 61 74 20 74 68 65 0d | 0a 20 20 20 20 20 20 20 | at the.|. |
|00000450| 20 20 20 20 20 20 20 20 | 20 20 74 69 6d 65 20 74 | | time t|
|00000460| 68 65 20 77 69 6e 64 6f | 77 73 20 77 65 72 65 20 |he windo|ws were |
|00000470| 69 6e 69 74 69 61 6c 69 | 7a 65 64 20 77 69 6c 6c |initiali|zed will|
|00000480| 20 62 65 20 72 65 73 74 | 6f 72 65 64 2e 0d 0a 20 | be rest|ored... |
|00000490| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000004a0| 49 66 20 79 6f 75 20 44 | 4f 20 4e 4f 54 20 64 6f |If you D|O NOT do|
|000004b0| 20 74 68 69 73 2c 20 79 | 6f 75 20 77 69 6c 6c 20 | this, y|ou will |
|000004c0| 6c 65 61 76 65 20 34 4b | 20 6f 66 20 61 6c 6c 6f |leave 4K| of allo|
|000004d0| 63 61 74 65 64 0d 0a 20 | 20 20 20 20 20 20 20 20 |cated.. | |
|000004e0| 20 20 20 20 20 20 20 20 | 6d 65 6d 6f 72 79 20 69 | |memory i|
|000004f0| 6e 20 74 68 65 20 44 4f | 53 20 6d 65 6d 6f 72 79 |n the DO|S memory|
|00000500| 20 63 68 61 69 6e 20 77 | 68 69 63 68 20 63 61 6e | chain w|hich can|
|00000510| 6e 6f 74 20 62 65 20 75 | 73 65 64 2e 0d 0a 0d 0a |not be u|sed.....|
|00000520| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000530| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 0d 0a 0d 0a 20 |--------|---.... |
|00000540| 20 20 20 4d 61 6b 65 57 | 69 6e 64 6f 77 20 2d 20 | MakeW|indow - |
|00000550| 43 72 65 61 74 65 20 61 | 20 77 69 6e 64 6f 77 20 |Create a| window |
|00000560| 72 65 63 6f 72 64 20 69 | 6e 20 74 68 65 20 61 72 |record i|n the ar|
|00000570| 72 61 79 20 6f 66 20 70 | 6f 73 73 69 62 6c 65 20 |ray of p|ossible |
|00000580| 77 69 6e 64 6f 77 73 2e | 0d 0a 20 20 20 20 20 20 |windows.|.. |
|00000590| 20 20 20 20 20 20 20 20 | 20 20 20 50 61 73 73 65 | | Passe|
|000005a0| 64 20 74 6f 20 74 68 65 | 20 72 6f 75 74 69 6e 65 |d to the| routine|
|000005b0| 20 61 72 65 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 | are the| followi|
|000005c0| 6e 67 3a 0d 0a 0d 0a 20 | 20 20 20 20 20 20 20 20 |ng:.... | |
|000005d0| 20 20 20 20 20 20 20 20 | 20 20 41 48 20 2d 20 54 | | AH - T|
|000005e0| 6f 70 20 6c 65 66 74 20 | 72 6f 77 0d 0a 20 20 20 |op left |row.. |
|000005f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000600| 41 4c 20 2d 20 6c 65 66 | 74 20 63 6f 6c 75 6d 6e |AL - lef|t column|
|00000610| 0d 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|00000620| 20 20 20 20 20 42 48 20 | 2d 20 4e 75 6d 62 65 72 | BH |- Number|
|00000630| 20 6f 66 20 72 6f 77 73 | 0d 0a 20 20 20 20 20 20 | of rows|.. |
|00000640| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 42 4c 20 | | BL |
|00000650| 2d 20 4e 75 6d 62 65 72 | 20 6f 66 20 63 6f 6c 75 |- Number| of colu|
|00000660| 6d 6e 73 0d 0a 20 20 20 | 20 20 20 20 20 20 20 20 |mns.. | |
|00000670| 20 20 20 20 20 20 20 20 | 43 4c 20 2d 20 76 61 72 | |CL - var|
|00000680| 69 6f 75 73 20 66 6c 61 | 67 73 3a 0d 0a 20 20 20 |ious fla|gs:.. |
|00000690| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000006a0| 20 20 20 20 20 20 42 69 | 74 20 30 20 3d 20 31 20 | Bi|t 0 = 1 |
|000006b0| 20 53 61 76 65 20 74 68 | 65 20 75 6e 64 65 72 6c | Save th|e underl|
|000006c0| 79 69 6e 67 20 73 63 72 | 65 65 6e 0d 0a 20 20 20 |ying scr|een.. |
|000006d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000006e0| 20 20 20 20 20 20 42 69 | 74 20 31 20 3d 20 31 20 | Bi|t 1 = 1 |
|000006f0| 20 46 72 61 6d 65 20 74 | 68 65 20 77 69 6e 64 6f | Frame t|he windo|
|00000700| 77 0d 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |w.. | |
|00000710| 20 20 20 20 20 20 20 20 | 20 20 20 20 42 69 74 20 | | Bit |
|00000720| 32 20 3d 20 31 20 20 43 | 6c 65 61 72 20 74 68 65 |2 = 1 C|lear the|
|00000730| 20 77 69 6e 64 6f 77 0d | 0a 20 20 20 20 20 20 20 | window.|. |
|00000740| 20 20 20 20 20 20 20 20 | 20 20 20 20 44 48 20 2d | | DH -|
|00000750| 20 46 72 61 6d 65 20 41 | 74 74 72 69 62 75 74 65 | Frame A|ttribute|
|00000760| 20 28 20 53 65 65 20 56 | 49 44 45 4f 2e 49 4e 43 | ( See V|IDEO.INC|
|00000770| 20 66 6f 72 20 76 61 6c | 75 65 73 29 0d 0a 20 20 | for val|ues).. |
|00000780| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000790| 20 44 4c 20 2d 20 42 61 | 63 6b 67 72 6f 75 6e 64 | DL - Ba|ckground|
|000007a0| 20 61 74 74 72 69 62 75 | 74 65 20 66 6f 72 20 63 | attribu|te for c|
|000007b0| 6c 65 61 72 0d 0a 20 20 | 20 20 20 20 20 20 20 20 |lear.. | |
|000007c0| 20 20 20 20 20 20 44 53 | 3a 53 49 20 2d 20 4e 75 | DS|:SI - Nu|
|000007d0| 6c 6c 20 74 65 72 6d 69 | 6e 61 74 65 64 20 74 69 |ll termi|nated ti|
|000007e0| 74 6c 65 20 66 6f 72 20 | 74 68 65 20 77 69 6e 64 |tle for |the wind|
|000007f0| 6f 77 28 32 30 20 63 68 | 61 72 73 20 6d 61 78 29 |ow(20 ch|ars max)|
|00000800| 0d 0a 0d 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |.... | |
|00000810| 20 20 20 20 20 4f 6e 20 | 72 65 74 75 72 6e 20 69 | On |return i|
|00000820| 66 20 43 41 52 52 59 20 | 69 73 20 53 45 54 2c 20 |f CARRY |is SET, |
|00000830| 73 6f 6d 65 74 68 69 6e | 67 20 77 65 6e 74 20 77 |somethin|g went w|
|00000840| 72 6f 6e 67 2e 0d 0a 20 | 20 20 20 20 20 20 20 20 |rong... | |
|00000850| 20 20 20 20 20 20 20 20 | 4f 74 68 65 72 77 69 73 | |Otherwis|
|00000860| 65 20 61 20 27 77 69 6e | 64 6f 77 20 68 61 6e 64 |e a 'win|dow hand|
|00000870| 6c 65 27 20 69 73 20 72 | 65 74 75 72 6e 65 64 20 |le' is r|eturned |
|00000880| 69 6e 20 41 4c 2e 0d 0a | 0d 0a 2d 2d 2d 2d 2d 2d |in AL...|..------|
|00000890| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000008a0| 0d 0a 0d 0a 20 20 20 20 | 44 69 73 70 57 69 6e 64 |.... |DispWind|
|000008b0| 6f 77 20 2d 20 44 69 73 | 70 6c 61 79 20 61 20 73 |ow - Dis|play a s|
|000008c0| 70 65 63 69 66 69 65 64 | 20 77 69 6e 64 6f 77 2e |pecified| window.|
|000008d0| 0d 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|000008e0| 20 20 20 54 68 69 73 20 | 72 6f 75 74 69 6e 65 20 | This |routine |
|000008f0| 77 69 6c 6c 20 64 69 73 | 70 6c 61 79 20 74 68 65 |will dis|play the|
|00000900| 20 72 65 71 75 65 73 74 | 65 64 20 77 69 6e 64 6f | request|ed windo|
|00000910| 77 2e 0d 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |w... | |
|00000920| 20 20 20 20 20 49 66 20 | 74 68 65 20 74 69 74 6c | If |the titl|
|00000930| 65 20 73 70 65 63 69 66 | 69 65 64 20 66 6f 72 20 |e specif|ied for |
|00000940| 74 68 65 20 77 69 6e 64 | 6f 77 20 66 69 74 73 2c |the wind|ow fits,|
|00000950| 20 61 6e 64 20 61 20 66 | 72 61 6d 65 0d 0a 20 20 | and a f|rame.. |
|00000960| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 68 | | h|
|00000970| 61 73 20 62 65 65 6e 20 | 73 70 65 63 69 66 69 65 |as been |specifie|
|00000980| 64 2c 20 74 68 65 20 74 | 69 74 6c 65 20 77 69 6c |d, the t|itle wil|
|00000990| 6c 20 61 70 70 65 61 72 | 20 63 65 6e 74 65 72 65 |l appear| centere|
|000009a0| 64 20 61 74 20 0d 0a 20 | 20 20 20 20 20 20 20 20 |d at .. | |
|000009b0| 20 20 20 20 20 20 20 20 | 74 68 65 20 74 6f 70 2e | |the top.|
|000009c0| 0d 0a 0d 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |.... | |
|000009d0| 20 20 20 20 20 20 20 41 | 4c 20 2d 20 57 69 6e 64 | A|L - Wind|
|000009e0| 6f 77 20 68 61 6e 64 6c | 65 0d 0a 0d 0a 20 20 20 |ow handl|e.... |
|000009f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 4f 6e | | On|
|00000a00| 20 72 65 74 75 72 6e 20 | 69 66 20 43 41 52 52 59 | return |if CARRY|
|00000a10| 20 69 73 20 53 45 54 2c | 20 73 6f 6d 65 74 68 69 | is SET,| somethi|
|00000a20| 6e 67 20 77 65 6e 74 20 | 77 72 6f 6e 67 2e 0d 0a |ng went |wrong...|
|00000a30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000a40| 20 4f 74 68 65 72 77 69 | 73 65 2c 20 74 68 65 20 | Otherwi|se, the |
|00000a50| 72 65 71 75 65 73 74 65 | 64 20 77 69 6e 64 6f 77 |requeste|d window|
|00000a60| 20 69 73 20 64 69 73 70 | 6c 61 79 65 64 2e 0d 0a | is disp|layed...|
|00000a70| 0d 0a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |..------|--------|
|00000a80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 0d 0a 0d 0a 20 20 |--------|--.... |
|00000a90| 20 20 45 72 61 73 65 54 | 6f 70 57 69 6e 20 2d 20 | EraseT|opWin - |
|00000aa0| 45 72 61 73 65 73 20 74 | 68 65 20 27 74 6f 70 27 |Erases t|he 'top'|
|00000ab0| 20 77 69 6e 64 6f 77 20 | 6f 6e 20 74 68 65 20 73 | window |on the s|
|00000ac0| 63 72 65 65 6e 2e 20 20 | 49 66 20 74 68 65 0d 0a |creen. |If the..|
|00000ad0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000ae0| 20 20 75 6e 64 65 72 6c | 79 69 6e 67 20 73 63 72 | underl|ying scr|
|00000af0| 65 65 6e 20 77 61 73 20 | 73 61 76 65 64 2c 20 69 |een was |saved, i|
|00000b00| 74 20 69 73 20 72 65 73 | 74 6f 72 65 64 2e 0d 0a |t is res|tored...|
|00000b10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000b20| 20 20 54 68 65 20 70 72 | 65 76 69 6f 75 73 6c 79 | The pr|eviously|
|00000b30| 20 64 65 66 69 6e 65 64 | 20 77 69 6e 64 6f 77 20 | defined| window |
|00000b40| 69 73 20 6d 61 64 65 20 | 61 63 74 69 76 65 2e 0d |is made |active..|
|00000b50| 0a 0d 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |... | |
|00000b60| 20 20 20 20 20 4e 6f 20 | 69 6e 70 75 74 20 70 61 | No |input pa|
|00000b70| 72 61 6d 65 74 65 72 73 | 0d 0a 0d 0a 20 20 20 20 |rameters|.... |
|00000b80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 4f 6e | | On|
|00000b90| 20 72 65 74 75 72 6e 20 | 69 66 20 43 41 52 52 59 | return |if CARRY|
|00000ba0| 20 69 73 20 53 45 54 2c | 20 73 6f 6d 65 74 68 69 | is SET,| somethi|
|00000bb0| 6e 67 20 77 65 6e 74 20 | 77 72 6f 6e 67 2e 0d 0a |ng went |wrong...|
|00000bc0| 0d 0a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |..------|--------|
|00000bd0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 0d 0a 0d 0a 20 20 |--------|--.... |
|00000be0| 20 57 57 72 69 74 65 53 | 74 72 20 20 2d 20 20 57 | WWriteS|tr - W|
|00000bf0| 72 69 74 65 20 61 20 6e | 75 6c 6c 20 74 65 72 6d |rite a n|ull term|
|00000c00| 69 6e 61 74 65 64 20 73 | 74 72 69 6e 67 20 74 6f |inated s|tring to|
|00000c10| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 77 69 6e | the cur|rent win|
|00000c20| 64 6f 77 2e 0d 0a 20 20 | 20 20 20 20 20 20 20 20 |dow... | |
|00000c30| 20 20 20 20 20 20 20 49 | 66 20 74 68 65 20 73 74 | I|f the st|
|00000c40| 72 69 6e 67 20 69 73 20 | 74 6f 6f 20 6c 6f 6e 67 |ring is |too long|
|00000c50| 20 69 74 20 77 69 6c 6c | 20 62 65 20 63 6c 69 70 | it will| be clip|
|00000c60| 70 65 64 2e 0d 0a 20 20 | 20 20 20 20 20 20 20 20 |ped... | |
|00000c70| 20 20 20 20 20 20 20 49 | 66 20 74 68 65 20 72 6f | I|f the ro|
|00000c80| 77 2c 63 6f 6c 75 6d 6e | 20 73 74 61 72 74 69 6e |w,column| startin|
|00000c90| 67 20 70 6f 69 6e 74 20 | 6f 66 20 74 68 65 20 73 |g point |of the s|
|00000ca0| 74 72 69 6e 67 20 69 73 | 0d 0a 20 20 20 20 20 20 |tring is|.. |
|00000cb0| 20 20 20 20 20 20 20 20 | 20 20 20 27 6f 75 74 73 | | 'outs|
|00000cc0| 69 64 65 27 20 74 68 65 | 20 63 75 72 72 65 6e 74 |ide' the| current|
|00000cd0| 20 77 69 6e 64 6f 77 2c | 20 6e 6f 74 68 69 6e 67 | window,| nothing|
|00000ce0| 20 69 73 20 77 72 69 74 | 74 65 6e 2e 0d 0a 0d 0a | is writ|ten.....|
|00000cf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000d00| 20 20 20 44 53 3a 53 49 | 20 2d 20 70 6f 69 6e 74 | DS:SI| - point|
|00000d10| 65 72 20 74 6f 20 6e 75 | 6c 6c 20 74 65 72 6d 69 |er to nu|ll termi|
|00000d20| 6e 61 74 65 64 20 73 74 | 72 69 6e 67 2e 0d 0a 20 |nated st|ring... |
|00000d30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000d40| 20 20 41 48 20 2d 20 52 | 6f 77 0d 0a 20 20 20 20 | AH - R|ow.. |
|00000d50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 41 | | A|
|00000d60| 4c 20 2d 20 43 6f 6c 0d | 0a 20 20 20 20 20 20 20 |L - Col.|. |
|00000d70| 20 20 20 20 20 20 20 20 | 20 20 20 20 42 48 20 2d | | BH -|
|00000d80| 20 41 74 74 72 69 62 75 | 74 65 20 74 6f 20 75 73 | Attribu|te to us|
|00000d90| 65 20 64 75 72 69 6e 67 | 20 77 72 69 74 65 0d 0a |e during| write..|
|00000da0| 0d 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|00000db0| 20 20 20 4f 6e 20 72 65 | 74 75 72 6e 20 69 66 20 | On re|turn if |
|00000dc0| 74 68 65 20 73 74 72 69 | 6e 67 20 77 61 73 20 6e |the stri|ng was n|
|00000dd0| 6f 74 20 77 72 69 74 74 | 65 6e 2c 0d 0a 20 20 20 |ot writt|en,.. |
|00000de0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 74 68 | | th|
|00000df0| 65 20 43 41 52 52 59 20 | 77 69 6c 6c 20 62 65 20 |e CARRY |will be |
|00000e00| 53 45 54 2e 0d 0a 0d 0a | 0d 0a 53 6f 6d 65 20 6e |SET.....|..Some n|
|00000e10| 6f 74 65 73 20 6f 6e 20 | 75 73 61 67 65 20 68 65 |otes on |usage he|
|00000e20| 72 65 3a 0d 0a 0d 0a 20 | 20 20 20 49 66 20 79 6f |re:.... | If yo|
|00000e30| 75 20 77 69 6c 6c 20 65 | 78 61 6d 69 6e 65 20 74 |u will e|xamine t|
|00000e40| 68 65 20 64 65 6d 6f 20 | 70 72 6f 67 72 61 6d 2c |he demo |program,|
|00000e50| 20 79 6f 75 20 77 69 6c | 6c 20 66 69 6e 64 20 61 | you wil|l find a|
|00000e60| 20 72 6f 75 74 69 6e 65 | 20 63 61 6c 6c 65 64 0d | routine| called.|
|00000e70| 0a 20 20 20 20 27 52 65 | 53 69 7a 65 4d 65 6d 27 |. 'Re|SizeMem'|
|00000e80| 2e 20 20 54 48 69 73 20 | 72 6f 75 74 69 6e 65 20 |. THis |routine |
|00000e90| 63 6f 6d 70 75 74 65 73 | 20 28 72 6f 75 67 68 6c |computes| (roughl|
|00000ea0| 79 29 20 74 68 65 20 73 | 69 7a 65 20 6f 66 20 74 |y) the s|ize of t|
|00000eb0| 68 65 20 70 72 6f 67 72 | 61 6d 0d 0a 20 20 20 20 |he progr|am.. |
|00000ec0| 61 6e 64 20 72 65 6c 65 | 61 73 65 73 20 74 6f 20 |and rele|ases to |
|00000ed0| 44 4f 53 20 61 6c 6c 20 | 75 6e 75 73 65 64 20 6d |DOS all |unused m|
|00000ee0| 65 6d 6f 72 79 2e 20 20 | 54 68 69 73 20 69 73 20 |emory. |This is |
|00000ef0| 6e 65 65 64 65 64 20 62 | 65 63 61 75 73 65 20 74 |needed b|ecause t|
|00000f00| 68 65 20 0d 0a 20 20 20 | 20 77 69 6e 64 6f 77 69 |he .. | windowi|
|00000f10| 6e 67 20 72 6f 75 74 69 | 6e 65 73 20 72 65 71 75 |ng routi|nes requ|
|00000f20| 65 73 74 20 74 68 65 69 | 72 20 6d 65 6d 6f 72 79 |est thei|r memory|
|00000f30| 20 61 72 65 61 73 20 66 | 6f 72 20 73 63 72 65 65 | areas f|or scree|
|00000f40| 6e 20 73 61 76 65 73 20 | 66 72 6f 6d 0d 0a 20 20 |n saves |from.. |
|00000f50| 20 20 44 4f 53 20 76 69 | 61 20 74 68 65 20 41 6c | DOS vi|a the Al|
|00000f60| 6c 6f 63 61 74 65 20 4d | 65 6d 6f 72 79 20 42 6c |locate M|emory Bl|
|00000f70| 6f 63 6b 20 63 61 6c 6c | 2e 20 20 49 66 20 74 68 |ock call|. If th|
|00000f80| 65 20 6d 65 6d 6f 72 79 | 20 69 73 20 6e 6f 74 20 |e memory| is not |
|00000f90| 72 65 6c 65 61 73 65 64 | 2c 0d 0a 20 20 20 20 74 |released|,.. t|
|00000fa0| 68 65 72 65 20 69 73 20 | 6e 6f 20 6d 65 6d 6f 72 |here is |no memor|
|00000fb0| 79 20 74 6f 20 75 73 65 | 20 66 6f 72 20 73 63 72 |y to use| for scr|
|00000fc0| 65 65 6e 20 73 61 76 65 | 73 2c 20 61 6e 64 20 74 |een save|s, and t|
|00000fd0| 68 65 20 77 69 6e 64 6f | 77 69 6e 67 20 72 6f 75 |he windo|wing rou|
|00000fe0| 74 69 6e 65 73 0d 0a 20 | 20 20 20 77 69 6c 6c 20 |tines.. | will |
|00000ff0| 6e 6f 74 20 77 6f 72 6b | 2e 0d 0a 20 20 20 20 49 |not work|... I|
|00001000| 20 64 69 64 20 69 74 20 | 74 68 69 73 20 77 61 79 | did it |this way|
|00001010| 20 62 65 63 61 75 73 65 | 20 49 20 64 69 64 6e 27 | because| I didn'|
|00001020| 74 20 77 61 6e 74 20 74 | 6f 20 70 72 65 2d 61 6c |t want t|o pre-al|
|00001030| 6c 6f 63 61 74 65 20 77 | 6f 72 73 74 20 63 61 73 |locate w|orst cas|
|00001040| 65 20 73 69 7a 65 64 0d | 0a 20 20 20 20 6d 65 6d |e sized.|. mem|
|00001050| 6f 72 79 20 28 34 4b 20 | 70 65 72 20 77 69 6e 64 |ory (4K |per wind|
|00001060| 6f 77 29 2e 20 20 54 68 | 65 20 6d 65 74 68 6f 64 |ow). Th|e method|
|00001070| 20 6f 66 20 72 65 71 75 | 65 73 74 69 6e 67 20 6d | of requ|esting m|
|00001080| 65 6d 6f 72 79 20 66 72 | 6f 6d 20 44 4f 53 20 69 |emory fr|om DOS i|
|00001090| 73 0d 0a 20 20 20 20 76 | 65 72 79 20 6d 75 63 68 |s.. v|ery much|
|000010a0| 20 6c 69 6b 65 20 74 68 | 65 20 68 65 61 70 20 69 | like th|e heap i|
|000010b0| 6e 20 50 41 53 43 41 4c | 2e 20 20 41 20 66 75 74 |n PASCAL|. A fut|
|000010c0| 75 72 65 20 76 65 72 73 | 69 6f 6e 20 77 69 6c 6c |ure vers|ion will|
|000010d0| 20 61 74 74 65 6d 70 74 | 20 74 6f 0d 0a 20 20 20 | attempt| to.. |
|000010e0| 20 66 69 72 73 74 20 67 | 65 74 20 74 68 65 20 6d | first g|et the m|
|000010f0| 65 6d 6f 72 79 20 61 72 | 65 61 73 20 66 72 6f 6d |emory ar|eas from|
|00001100| 20 45 4d 53 20 6d 65 6d | 6f 72 79 2c 20 74 68 65 | EMS mem|ory, the|
|00001110| 6e 20 74 72 79 20 74 68 | 65 20 44 4f 53 20 63 61 |n try th|e DOS ca|
|00001120| 6c 6c 73 2e 0d 0a 0d 0a | 20 20 20 20 54 68 65 20 |lls.....| The |
|00001130| 63 6f 64 65 20 6d 61 79 | 20 6e 6f 74 20 62 65 20 |code may| not be |
|00001140| 74 68 65 20 77 6f 72 6c | 64 27 73 20 62 65 73 74 |the worl|d's best|
|00001150| 2c 20 49 20 77 61 73 6e | 27 74 20 61 69 6d 69 6e |, I wasn|'t aimin|
|00001160| 67 20 66 6f 72 20 73 75 | 70 65 72 20 63 6f 6d 70 |g for su|per comp|
|00001170| 61 63 74 0d 0a 20 20 20 | 20 6f 72 20 68 69 67 68 |act.. | or high|
|00001180| 65 73 74 20 73 70 65 65 | 64 2e 20 20 54 68 65 20 |est spee|d. The |
|00001190| 6c 61 73 74 20 74 69 6d | 65 20 49 20 77 6f 72 6b |last tim|e I work|
|000011a0| 65 64 20 69 6e 20 61 73 | 73 65 6d 62 6c 79 20 77 |ed in as|sembly w|
|000011b0| 61 73 20 69 6e 20 74 68 | 65 20 38 30 38 30 2f 5a |as in th|e 8080/Z|
|000011c0| 38 30 0d 0a 20 20 20 20 | 64 61 79 73 2c 20 61 6e |80.. |days, an|
|000011d0| 64 20 49 20 61 6d 20 6f | 75 74 20 6f 66 20 70 72 |d I am o|ut of pr|
|000011e0| 61 63 74 69 63 65 2e 20 | 20 47 69 76 65 20 6d 65 |actice. | Give me|
|000011f0| 20 74 69 6d 65 2c 20 49 | 27 6c 6c 20 67 65 74 20 | time, I|'ll get |
|00001200| 62 65 74 74 65 72 21 0d | 0a 0d 0a 1a 60 ea 29 00 |better!.|....`.).|
|00001210| 1e 06 01 00 10 00 00 dc | f5 51 3b 12 fe 0a 00 00 |........|.Q;.....|
|00001220| fe 0a 00 00 51 f5 f7 c7 | 00 00 20 00 00 00 56 49 |....Q...|.. ...VI|
|00001230| 44 45 4f 2e 49 4e 43 00 | 00 66 ad 90 4d 00 00 3b |DEO.INC.|.f..M..;|
|00001240| 20 54 68 65 73 65 20 61 | 72 65 20 45 51 55 61 74 | These a|re EQUat|
|00001250| 65 73 20 2f 20 67 6c 6f | 62 61 6c 20 64 65 63 6c |es / glo|bal decl|
|00001260| 61 72 61 63 74 69 6f 6e | 73 20 66 6f 72 20 74 68 |araction|s for th|
|00001270| 65 20 56 49 44 45 4f 2e | 41 53 4d 20 6d 6f 64 75 |e VIDEO.|ASM modu|
|00001280| 6c 65 2e 0d 0a 0d 0a 3b | 20 41 75 74 68 6f 72 3a |le.....;| Author:|
|00001290| 20 44 61 76 69 64 20 42 | 65 6e 6e 65 74 74 20 2d | David B|ennett -|
|000012a0| 20 56 65 72 73 69 6f 6e | 20 31 2e 30 20 2d 20 44 | Version| 1.0 - D|
|000012b0| 61 74 65 3a 20 31 31 2f | 39 2f 38 38 0d 0a 3b 0d |ate: 11/|9/88..;.|
|000012c0| 0a 3b 20 50 6c 65 61 73 | 65 20 73 65 65 20 74 68 |.; Pleas|e see th|
|000012d0| 65 20 66 69 6c 65 20 56 | 49 44 45 4f 2e 44 4f 43 |e file V|IDEO.DOC|
|000012e0| 20 66 6f 72 20 6d 6f 72 | 65 20 69 6e 66 6f 2e 20 | for mor|e info. |
|000012f0| 20 56 49 44 44 45 4d 4f | 2e 41 53 4d 20 68 61 73 | VIDDEMO|.ASM has|
|00001300| 20 65 78 61 6d 70 6c 65 | 73 0d 0a 3b 20 6f 66 20 | example|s..; of |
|00001310| 68 6f 77 20 74 6f 20 75 | 73 65 20 74 68 69 73 20 |how to u|se this |
|00001320| 69 6e 63 6c 75 64 65 20 | 66 69 6c 65 20 69 6e 20 |include |file in |
|00001330| 79 6f 75 72 20 70 72 6f | 67 72 61 6d 73 2e 0d 0a |your pro|grams...|
|00001340| 3b 0d 0a 0d 0a 3b 20 2d | 2d 2d 2d 2d 2d 2d 2d 2d |;....; -|--------|
|00001350| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0d 0a 3b 20 |--------|----..; |
|00001360| 56 61 72 69 6f 75 73 20 | 76 69 64 65 6f 20 65 71 |Various |video eq|
|00001370| 75 61 74 65 73 0d 0a 3b | 20 2d 2d 2d 2d 2d 2d 2d |uates..;| -------|
|00001380| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 0d 0a |--------|------..|
|00001390| 0d 0a 3b 20 4d 65 6d 6f | 72 79 20 61 72 65 61 73 |..; Memo|ry areas|
|000013a0| 0d 0a 0d 0a 4d 6f 6e 6f | 53 65 67 20 20 20 20 20 |....Mono|Seg |
|000013b0| 20 20 20 20 45 51 55 20 | 20 20 20 20 30 42 30 30 | EQU | 0B00|
|000013c0| 30 68 20 20 20 20 20 20 | 20 20 20 20 3b 20 4d 6f |0h | ; Mo|
|000013d0| 6e 6f 20 73 63 72 65 65 | 6e 20 73 65 67 6d 65 6e |no scree|n segmen|
|000013e0| 74 0d 0a 43 47 41 53 65 | 67 20 20 20 20 20 20 20 |t..CGASe|g |
|000013f0| 20 20 20 45 51 55 20 20 | 20 20 20 30 42 38 30 30 | EQU | 0B800|
|00001400| 68 20 20 20 20 20 20 20 | 20 20 20 3b 20 43 47 41 |h | ; CGA|
|00001410| 20 73 63 72 65 65 6e 20 | 73 65 67 6d 65 6e 74 0d | screen |segment.|
|00001420| 0a 0d 0a 3b 20 56 69 64 | 65 6f 20 4d 6f 64 65 73 |...; Vid|eo Modes|
|00001430| 0d 0a 0d 0a 42 57 34 30 | 20 20 20 20 20 20 20 20 |....BW40| |
|00001440| 20 20 20 20 45 51 55 20 | 20 20 20 20 30 20 20 20 | EQU | 0 |
|00001450| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 34 30 | | ; 40|
|00001460| 78 32 35 20 42 2f 57 20 | 6f 6e 20 43 6f 6c 6f 72 |x25 B/W |on Color|
|00001470| 20 41 64 61 70 74 65 72 | 0d 0a 43 4f 34 30 20 20 | Adapter|..CO40 |
|00001480| 20 20 20 20 20 20 20 20 | 20 20 45 51 55 20 20 20 | | EQU |
|00001490| 20 20 31 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | 1 | |
|000014a0| 20 20 3b 20 34 30 78 32 | 35 20 43 6f 6c 6f 72 20 | ; 40x2|5 Color |
|000014b0| 6f 6e 20 43 6f 6c 6f 72 | 20 41 64 61 70 74 65 72 |on Color| Adapter|
|000014c0| 0d 0a 42 57 38 30 20 20 | 20 20 20 20 20 20 20 20 |..BW80 | |
|000014d0| 20 20 45 51 55 20 20 20 | 20 20 32 20 20 20 20 20 | EQU | 2 |
|000014e0| 20 20 20 20 20 20 20 20 | 20 20 3b 20 38 30 78 32 | | ; 80x2|
|000014f0| 35 20 42 2f 57 20 6f 6e | 20 43 6f 6c 6f 72 20 41 |5 B/W on| Color A|
|00001500| 64 61 70 74 65 72 0d 0a | 43 4f 38 30 20 20 20 20 |dapter..|CO80 |
|00001510| 20 20 20 20 20 20 20 20 | 45 51 55 20 20 20 20 20 | |EQU |
|00001520| 33 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |3 | |
|00001530| 3b 20 38 30 78 32 35 20 | 43 6f 6c 6f 72 20 6f 6e |; 80x25 |Color on|
|00001540| 20 43 6f 6c 6f 72 20 41 | 64 61 70 74 65 72 0d 0a | Color A|dapter..|
|00001550| 4d 6f 6e 6f 20 20 20 20 | 20 20 20 20 20 20 20 20 |Mono | |
|00001560| 45 51 55 20 20 20 20 20 | 37 20 20 20 20 20 20 20 |EQU |7 |
|00001570| 20 20 20 20 20 20 20 20 | 3b 20 38 30 78 32 35 20 | |; 80x25 |
|00001580| 6f 6e 20 4d 6f 6e 6f 63 | 68 72 6f 6d 65 20 41 64 |on Monoc|hrome Ad|
|00001590| 61 70 74 65 72 0d 0a 0d | 0a 3b 20 46 6f 72 65 67 |apter...|.; Foreg|
|000015a0| 72 6f 75 6e 64 20 2f 20 | 42 61 63 6b 67 72 6f 75 |round / |Backgrou|
|000015b0| 6e 64 20 63 6f 6c 6f 72 | 20 63 6f 6e 73 74 61 6e |nd color| constan|
|000015c0| 74 73 0d 0a 0d 0a 42 6c | 61 63 6b 20 20 20 20 20 |ts....Bl|ack |
|000015d0| 20 20 20 20 20 20 45 51 | 55 20 20 20 20 20 30 0d | EQ|U 0.|
|000015e0| 0a 42 6c 75 65 20 20 20 | 20 20 20 20 20 20 20 20 |.Blue | |
|000015f0| 20 45 51 55 20 20 20 20 | 20 31 0d 0a 47 72 65 65 | EQU | 1..Gree|
|00001600| 6e 20 20 20 20 20 20 20 | 20 20 20 20 45 51 55 20 |n | EQU |
|00001610| 20 20 20 20 32 0d 0a 43 | 79 61 6e 20 20 20 20 20 | 2..C|yan |
|00001620| 20 20 20 20 20 20 20 45 | 51 55 20 20 20 20 20 33 | E|QU 3|
|00001630| 0d 0a 52 65 64 20 20 20 | 20 20 20 20 20 20 20 20 |..Red | |
|00001640| 20 20 45 51 55 20 20 20 | 20 20 34 0d 0a 4d 61 67 | EQU | 4..Mag|
|00001650| 65 6e 74 61 20 20 20 20 | 20 20 20 20 20 45 51 55 |enta | EQU|
|00001660| 20 20 20 20 20 35 0d 0a | 42 72 6f 77 6e 20 20 20 | 5..|Brown |
|00001670| 20 20 20 20 20 20 20 20 | 45 51 55 20 20 20 20 20 | |EQU |
|00001680| 36 0d 0a 4c 69 67 68 74 | 47 72 61 79 20 20 20 20 |6..Light|Gray |
|00001690| 20 20 20 45 51 55 20 20 | 20 20 20 37 0d 0a 0d 0a | EQU | 7....|
|000016a0| 3b 20 46 6f 72 65 67 72 | 6f 75 6e 64 20 63 6f 6c |; Foregr|ound col|
|000016b0| 6f 72 20 63 6f 6e 73 74 | 61 6e 74 73 0d 0a 0d 0a |or const|ants....|
|000016c0| 44 61 72 6b 47 72 61 79 | 20 20 20 20 20 20 20 20 |DarkGray| |
|000016d0| 45 51 55 20 20 20 20 20 | 38 0d 0a 4c 69 67 68 74 |EQU |8..Light|
|000016e0| 42 6c 75 65 20 20 20 20 | 20 20 20 45 51 55 20 20 |Blue | EQU |
|000016f0| 20 20 20 39 0d 0a 4c 69 | 67 68 74 47 72 65 65 6e | 9..Li|ghtGreen|
|00001700| 20 20 20 20 20 20 45 51 | 55 20 20 20 20 20 31 30 | EQ|U 10|
|00001710| 0d 0a 4c 69 67 68 74 43 | 79 61 6e 20 20 20 20 20 |..LightC|yan |
|00001720| 20 20 45 51 55 20 20 20 | 20 20 31 31 0d 0a 4c 69 | EQU | 11..Li|
|00001730| 67 68 74 52 65 64 20 20 | 20 20 20 20 20 20 45 51 |ghtRed | EQ|
|00001740| 55 20 20 20 20 20 31 32 | 0d 0a 4c 69 67 68 74 4d |U 12|..LightM|
|00001750| 61 67 65 6e 74 61 20 20 | 20 20 45 51 55 20 20 20 |agenta | EQU |
|00001760| 20 20 31 33 0d 0a 59 65 | 6c 6c 6f 77 20 20 20 20 | 13..Ye|llow |
|00001770| 20 20 20 20 20 20 45 51 | 55 20 20 20 20 20 31 34 | EQ|U 14|
|00001780| 0d 0a 57 68 69 74 65 20 | 20 20 20 20 20 20 20 20 |..White | |
|00001790| 20 20 45 51 55 20 20 20 | 20 20 31 35 0d 0a 0d 0a | EQU | 15....|
|000017a0| 3b 20 41 64 64 20 74 68 | 69 73 20 66 6f 72 20 62 |; Add th|is for b|
|000017b0| 6c 69 6e 6b 0d 0a 0d 0a | 42 6c 69 6e 6b 20 20 20 |link....|Blink |
|000017c0| 20 20 20 20 20 20 20 20 | 45 51 55 20 20 20 20 20 | |EQU |
|000017d0| 31 30 30 30 30 30 30 30 | 62 20 20 20 20 20 20 20 |10000000|b |
|000017e0| 3b 20 42 6c 69 6e 6b 20 | 42 69 74 0d 0a 55 6e 64 |; Blink |Bit..Und|
|000017f0| 65 72 4c 69 6e 65 20 20 | 20 20 20 20 20 45 51 55 |erLine | EQU|
|00001800| 20 20 20 20 20 30 30 30 | 30 30 30 30 31 62 20 20 | 000|00001b |
|00001810| 20 20 20 20 20 3b 20 55 | 6e 64 65 72 6c 69 6e 65 | ; U|nderline|
|00001820| 20 42 69 74 20 28 4d 6f | 6e 6f 20 4f 6e 6c 79 29 | Bit (Mo|no Only)|
|00001830| 0d 0a 0d 0a 3b 20 53 6f | 6d 65 20 63 6f 6d 6d 6f |....; So|me commo|
|00001840| 6e 6c 79 20 75 73 65 64 | 20 61 74 74 72 69 62 75 |nly used| attribu|
|00001850| 74 65 73 0d 0a 0d 0a 4e | 6f 72 6d 61 6c 20 20 20 |tes....N|ormal |
|00001860| 20 20 20 20 20 20 20 45 | 51 55 20 20 20 20 20 37 | E|QU 7|
|00001870| 20 20 20 20 20 20 20 3b | 20 47 72 61 79 20 6f 6e | ;| Gray on|
|00001880| 20 42 6c 61 63 6b 20 28 | 4c 6f 77 20 49 6e 74 65 | Black (|Low Inte|
|00001890| 6e 73 69 74 79 29 0d 0a | 52 65 76 65 72 73 65 20 |nsity)..|Reverse |
|000018a0| 20 20 20 20 20 20 20 20 | 45 51 55 20 20 20 20 20 | |EQU |
|000018b0| 31 31 32 20 20 20 20 20 | 3b 20 42 6c 61 63 6b 20 |112 |; Black |
|000018c0| 6f 6e 20 47 72 61 79 0d | 0a 48 69 67 68 49 6e 74 |on Gray.|.HighInt|
|000018d0| 20 20 20 20 20 20 20 20 | 20 45 51 55 20 20 20 20 | | EQU |
|000018e0| 20 31 35 20 20 20 20 20 | 20 3b 20 57 68 69 74 65 | 15 | ; White|
|000018f0| 20 6f 6e 20 42 6c 61 63 | 6b 20 28 48 69 67 68 20 | on Blac|k (High |
|00001900| 49 6e 74 65 6e 73 69 74 | 79 29 0d 0a 0d 0a 3b 20 |Intensit|y)....; |
|00001910| 57 69 6e 64 6f 77 20 70 | 61 72 61 6d 65 74 65 72 |Window p|arameter|
|00001920| 20 63 6f 6e 73 74 61 6e | 74 73 0d 0a 0d 0a 53 61 | constan|ts....Sa|
|00001930| 76 65 42 69 74 20 20 20 | 20 20 20 20 20 20 45 51 |veBit | EQ|
|00001940| 55 20 20 20 20 20 30 31 | 48 20 20 20 20 20 3b 20 |U 01|H ; |
|00001950| 74 6f 20 73 61 76 65 20 | 6f 72 20 6e 6f 74 20 74 |to save |or not t|
|00001960| 6f 20 73 61 76 65 20 74 | 68 65 20 62 61 63 6b 67 |o save t|he backg|
|00001970| 72 6f 75 6e 64 0d 0a 46 | 72 61 6d 65 42 69 74 20 |round..F|rameBit |
|00001980| 20 20 20 20 20 20 20 45 | 51 55 20 20 20 20 20 30 | E|QU 0|
|00001990| 32 48 20 20 20 20 20 3b | 20 74 6f 20 66 72 61 6d |2H ;| to fram|
|000019a0| 65 20 6f 72 20 6e 6f 74 | 20 74 6f 20 66 72 61 6d |e or not| to fram|
|000019b0| 65 0d 0a 46 69 6c 6c 42 | 69 74 20 20 20 20 20 20 |e..FillB|it |
|000019c0| 20 20 20 45 51 55 20 20 | 20 20 20 30 34 48 20 20 | EQU | 04H |
|000019d0| 20 20 20 3b 20 74 6f 20 | 63 6c 65 61 72 20 6f 72 | ; to |clear or|
|000019e0| 20 6e 6f 74 20 74 6f 20 | 63 6c 65 61 72 0d 0a 4d | not to |clear..M|
|000019f0| 61 78 53 69 7a 65 20 20 | 20 20 20 20 20 20 20 45 |axSize | E|
|00001a00| 51 55 20 20 20 20 20 34 | 30 30 30 20 20 20 20 3b |QU 4|000 ;|
|00001a10| 20 73 69 7a 65 20 6f 66 | 20 66 75 6c 6c 20 73 63 | size of| full sc|
|00001a20| 72 65 65 6e 20 66 6f 72 | 20 73 61 76 65 0d 0a 0d |reen for| save...|
|00001a30| 0a 3b 20 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.; -----|--------|
|00001a40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 0d 0a 3b 20 47 |--------|---..; G|
|00001a50| 6c 6f 62 61 6c 20 64 61 | 74 61 20 69 6e 20 56 49 |lobal da|ta in VI|
|00001a60| 44 45 4f 2e 41 53 4d 0d | 0a 3b 20 2d 2d 2d 2d 2d |DEO.ASM.|.; -----|
|00001a70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001a80| 2d 2d 2d 0d 0a 0d 0a 47 | 4c 4f 42 41 4c 20 42 61 |---....G|LOBAL Ba|
|00001a90| 73 65 4f 66 53 63 72 65 | 65 6e 20 3a 20 57 4f 52 |seOfScre|en : WOR|
|00001aa0| 44 0d 0a 47 4c 4f 42 41 | 4c 20 53 6e 6f 77 43 68 |D..GLOBA|L SnowCh|
|00001ab0| 65 63 6b 20 3a 20 42 59 | 54 45 0d 0a 47 4c 4f 42 |eck : BY|TE..GLOB|
|00001ac0| 41 4c 20 56 69 64 65 6f | 4d 6f 64 65 20 3a 20 42 |AL Video|Mode : B|
|00001ad0| 59 54 45 0d 0a 0d 0a 3b | 20 2d 2d 2d 2d 2d 2d 2d |YTE....;| -------|
|00001ae0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001af0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001b00| 2d 2d 2d 2d 0d 0a 3b 20 | 47 6c 6f 62 61 6c 20 70 |----..; |Global p|
|00001b10| 72 6f 63 65 64 75 72 65 | 20 64 65 63 6c 61 72 61 |rocedure| declara|
|00001b20| 74 69 6f 6e 73 20 66 6f | 72 20 56 49 44 45 4f 2e |tions fo|r VIDEO.|
|00001b30| 41 53 4d 0d 0a 3b 20 2d | 2d 2d 2d 2d 2d 2d 2d 2d |ASM..; -|--------|
|00001b40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001b50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001b60| 2d 2d 0d 0a 0d 0a 47 4c | 4f 42 41 4c 20 20 45 47 |--....GL|OBAL EG|
|00001b70| 41 49 6e 73 74 61 6c 6c | 65 64 3a 50 52 4f 43 0d |AInstall|ed:PROC.|
|00001b80| 0a 47 4c 4f 42 41 4c 20 | 20 47 65 74 56 69 64 65 |.GLOBAL | GetVide|
|00001b90| 6f 4d 6f 64 65 3a 50 52 | 4f 43 0d 0a 47 4c 4f 42 |oMode:PR|OC..GLOB|
|00001ba0| 41 4c 20 20 44 57 72 69 | 74 65 43 48 3a 50 52 4f |AL DWri|teCH:PRO|
|00001bb0| 43 0d 0a 47 4c 4f 42 41 | 4c 20 20 44 57 72 69 74 |C..GLOBA|L DWrit|
|00001bc0| 65 43 48 4e 41 3a 50 52 | 4f 43 0d 0a 47 4c 4f 42 |eCHNA:PR|OC..GLOB|
|00001bd0| 41 4c 20 20 44 57 72 69 | 74 65 53 74 72 3a 50 52 |AL DWri|teStr:PR|
|00001be0| 4f 43 0d 0a 47 4c 4f 42 | 41 4c 20 20 44 57 72 69 |OC..GLOB|AL DWri|
|00001bf0| 74 65 53 74 72 4e 41 3a | 50 52 4f 43 0d 0a 47 4c |teStrNA:|PROC..GL|
|00001c00| 4f 42 41 4c 20 20 44 46 | 69 6c 6c 43 48 3a 50 52 |OBAL DF|illCH:PR|
|00001c10| 4f 43 0d 0a 47 4c 4f 42 | 41 4c 20 20 44 46 69 6c |OC..GLOB|AL DFil|
|00001c20| 6c 43 48 4e 41 3a 50 52 | 4f 43 0d 0a 47 4c 4f 42 |lCHNA:PR|OC..GLOB|
|00001c30| 41 4c 20 20 44 46 69 6c | 6c 41 74 74 72 3a 50 52 |AL DFil|lAttr:PR|
|00001c40| 4f 43 0d 0a 47 4c 4f 42 | 41 4c 20 20 53 74 6f 72 |OC..GLOB|AL Stor|
|00001c50| 65 54 6f 4d 65 6d 3a 50 | 52 4f 43 0d 0a 47 4c 4f |eToMem:P|ROC..GLO|
|00001c60| 42 41 4c 20 20 53 74 6f | 72 65 54 6f 53 63 72 3a |BAL Sto|reToScr:|
|00001c70| 50 52 4f 43 0d 0a 47 4c | 4f 42 41 4c 20 20 43 75 |PROC..GL|OBAL Cu|
|00001c80| 72 73 6f 72 4f 66 66 3a | 50 52 4f 43 0d 0a 47 4c |rsorOff:|PROC..GL|
|00001c90| 4f 42 41 4c 20 20 43 75 | 72 73 6f 72 4f 6e 3a 50 |OBAL Cu|rsorOn:P|
|00001ca0| 52 4f 43 0d 0a 0d 0a 3b | 20 77 69 6e 64 6f 77 20 |ROC....;| window |
|00001cb0| 72 6f 75 74 69 6e 65 73 | 0d 0a 0d 0a 47 4c 4f 42 |routines|....GLOB|
|00001cc0| 41 4c 20 20 49 6e 69 74 | 57 69 6e 64 6f 77 73 3a |AL Init|Windows:|
|00001cd0| 50 52 4f 43 0d 0a 47 4c | 4f 42 41 4c 20 20 4d 61 |PROC..GL|OBAL Ma|
|00001ce0| 6b 65 57 69 6e 64 6f 77 | 3a 50 52 4f 43 0d 0a 47 |keWindow|:PROC..G|
|00001cf0| 4c 4f 42 41 4c 20 20 44 | 69 73 70 57 69 6e 64 6f |LOBAL D|ispWindo|
|00001d00| 77 3a 50 52 4f 43 0d 0a | 47 4c 4f 42 41 4c 20 20 |w:PROC..|GLOBAL |
|00001d10| 45 72 61 73 65 54 6f 70 | 57 69 6e 3a 50 52 4f 43 |EraseTop|Win:PROC|
|00001d20| 0d 0a 47 4c 4f 42 41 4c | 20 20 57 57 72 69 74 65 |..GLOBAL| WWrite|
|00001d30| 53 74 72 3a 50 52 4f 43 | 0d 0a 0d 0a 1a 60 ea 29 |Str:PROC|.....`.)|
|00001d40| 00 1e 06 01 00 10 00 00 | dc 68 45 38 12 5e 6a 00 |........|.hE8.^j.|
|00001d50| 00 5e 6a 00 00 b5 4d 04 | 31 00 00 20 00 00 00 56 |.^j...M.|1.. ...V|
|00001d60| 49 44 45 4f 2e 41 53 4d | 00 00 79 09 c4 48 00 00 |IDEO.ASM|..y..H..|
|00001d70| 54 49 54 4c 45 20 27 44 | 69 72 65 63 74 20 56 69 |TITLE 'D|irect Vi|
|00001d80| 64 65 6f 20 52 6f 75 74 | 69 6e 65 73 27 0d 0a 0d |deo Rout|ines'...|
|00001d90| 0a 3b 0d 0a 3b 20 41 75 | 74 68 6f 72 3a 20 44 61 |.;..; Au|thor: Da|
|00001da0| 76 69 64 20 42 65 6e 6e | 65 74 74 20 2d 20 56 65 |vid Benn|ett - Ve|
|00001db0| 72 73 69 6f 6e 20 31 2e | 30 20 2d 20 44 61 74 65 |rsion 1.|0 - Date|
|00001dc0| 3a 20 31 31 2f 39 2f 38 | 38 0d 0a 3b 0d 0a 3b 20 |: 11/9/8|8..;..; |
|00001dd0| 56 65 72 73 69 6f 6e 20 | 31 2e 31 20 2d 20 41 64 |Version |1.1 - Ad|
|00001de0| 64 65 64 20 73 69 6d 70 | 6c 65 20 77 69 6e 64 6f |ded simp|le windo|
|00001df0| 77 69 6e 67 20 72 6f 75 | 74 69 6e 65 73 2c 20 69 |wing rou|tines, i|
|00001e00| 6e 63 6c 75 64 69 6e 67 | 20 63 6c 69 70 70 69 6e |ncluding| clippin|
|00001e10| 67 20 61 74 0d 0a 3b 20 | 20 20 20 20 20 20 20 20 |g at..; | |
|00001e20| 20 20 20 20 20 20 62 6f | 72 64 65 72 73 2e 20 20 | bo|rders. |
|00001e30| 54 48 6f 6d 61 73 20 48 | 69 6c 6c 2c 20 4a 61 6e |THomas H|ill, Jan|
|00001e40| 20 31 39 38 39 0d 0a 3b | 0d 0a 3b 20 54 68 69 73 | 1989..;|..; This|
|00001e50| 20 69 73 20 61 20 6d 6f | 64 75 6c 65 20 6f 66 20 | is a mo|dule of |
|00001e60| 64 69 72 65 63 74 20 76 | 69 64 65 6f 20 77 72 69 |direct v|ideo wri|
|00001e70| 74 69 6e 67 20 72 6f 75 | 74 69 6e 65 73 20 66 6f |ting rou|tines fo|
|00001e80| 72 20 54 41 53 4d 2e 20 | 20 50 6c 65 61 73 65 20 |r TASM. | Please |
|00001e90| 73 65 65 20 74 68 65 0d | 0a 3b 20 66 69 6c 65 20 |see the.|.; file |
|00001ea0| 56 49 44 45 4f 2e 44 4f | 43 20 66 6f 72 20 6d 6f |VIDEO.DO|C for mo|
|00001eb0| 72 65 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 2e 20 |re infor|mation. |
|00001ec0| 20 45 78 61 6d 70 6c 65 | 73 20 6f 66 20 6d 6f 73 | Example|s of mos|
|00001ed0| 74 20 72 6f 75 74 69 6e | 65 73 20 61 72 65 20 73 |t routin|es are s|
|00001ee0| 65 74 20 66 6f 72 74 68 | 0d 0a 3b 20 69 6e 20 56 |et forth|..; in V|
|00001ef0| 49 44 44 45 4d 4f 2e 41 | 53 4d 2e 0d 0a 3b 0d 0a |IDDEMO.A|SM...;..|
|00001f00| 3b 20 2d 44 61 76 65 0d | 0a 3b 0d 0a 3b 20 4a 61 |; -Dave.|.;..; Ja|
|00001f10| 6e 20 32 34 2c 20 31 39 | 38 39 20 2d 20 53 65 76 |n 24, 19|89 - Sev|
|00001f20| 65 72 61 6c 20 63 68 61 | 6e 67 65 73 20 68 61 64 |eral cha|nges had|
|00001f30| 20 74 6f 20 62 65 20 6d | 61 64 65 20 69 6e 20 6f | to be m|ade in o|
|00001f40| 72 64 65 72 20 74 6f 20 | 75 73 65 20 6d 79 20 77 |rder to |use my w|
|00001f50| 69 6e 64 6f 77 69 6e 67 | 0d 0a 3b 20 20 20 20 20 |indowing|..; |
|00001f60| 20 20 20 20 20 20 20 20 | 20 20 20 77 69 74 68 20 | | with |
|00001f70| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 76 69 |the foll|owing vi|
|00001f80| 64 65 6f 20 72 6f 75 74 | 69 6e 65 73 2e 20 20 49 |deo rout|ines. I|
|00001f90| 6e 20 70 61 72 74 69 63 | 75 6c 61 72 2c 20 74 68 |n partic|ular, th|
|00001fa0| 65 20 0d 0a 3b 20 20 20 | 20 20 20 20 20 20 20 20 |e ..; | |
|00001fb0| 20 20 20 20 20 73 63 72 | 65 65 6e 20 73 61 76 69 | scr|een savi|
|00001fc0| 6e 67 20 61 6e 64 20 72 | 65 73 74 6f 72 69 6e 67 |ng and r|estoring|
|00001fd0| 20 70 72 6f 63 65 64 75 | 72 65 73 20 77 65 72 65 | procedu|res were|
|00001fe0| 20 6e 6f 74 20 73 65 74 | 20 75 70 20 74 6f 0d 0a | not set| up to..|
|00001ff0| 3b 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |; | |
|00002000| 20 61 63 63 65 70 74 20 | 73 74 6f 72 61 67 65 20 | accept |storage |
|00002010| 74 6f 2f 66 72 6f 6d 20 | 64 69 66 66 72 65 6e 74 |to/from |diffrent|
|00002020| 20 64 61 74 61 20 73 65 | 67 6d 65 6e 74 73 2e 20 | data se|gments. |
|00002030| 20 49 20 63 68 61 6e 67 | 65 64 0d 0a 3b 20 20 20 | I chang|ed..; |
|00002040| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 74 68 65 | | the|
|00002050| 20 70 61 72 61 6d 65 74 | 65 72 73 20 70 61 73 73 | paramet|ers pass|
|00002060| 65 64 20 74 6f 20 69 6e | 63 6c 75 64 65 20 74 68 |ed to in|clude th|
|00002070| 65 20 73 65 67 6d 65 6e | 74 20 6f 66 20 74 68 65 |e segmen|t of the|
|00002080| 20 73 74 6f 72 65 64 0d | 0a 3b 20 20 20 20 20 20 | stored.|.; |
|00002090| 20 20 20 20 20 20 20 20 | 20 20 64 61 74 61 2e 0d | | data..|
|000020a0| 0a 3b 20 20 20 20 20 20 | 0d 0a 3b 20 20 20 20 20 |.; |..; |
|000020b0| 20 20 20 20 20 20 20 20 | 20 20 20 54 68 6f 6d 61 | | Thoma|
|000020c0| 73 20 48 69 6c 6c 0d 0a | 3b 0d 0a 49 44 45 41 4c |s Hill..|;..IDEAL|
|000020d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000020e0| 20 20 20 3b 20 55 73 65 | 73 20 54 41 53 4d 27 73 | ; Use|s TASM's|
|000020f0| 20 49 44 45 41 4c 20 6d | 6f 64 65 20 20 28 47 65 | IDEAL m|ode (Ge|
|00002100| 74 20 75 73 65 64 20 74 | 6f 20 74 68 69 73 21 29 |t used t|o this!)|
|00002110| 0d 0a 0d 0a 4d 4f 44 45 | 4c 20 53 4d 41 4c 4c 20 |....MODE|L SMALL |
|00002120| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 53 6d | | ; Sm|
|00002130| 61 6c 6c 20 6d 65 6d 6f | 72 79 20 6d 6f 64 65 6c |all memo|ry model|
|00002140| 0d 0a 0d 0a 49 4e 43 4c | 55 44 45 20 27 56 49 44 |....INCL|UDE 'VID|
|00002150| 45 4f 2e 49 4e 43 27 20 | 20 20 20 20 3b 20 45 71 |EO.INC' | ; Eq|
|00002160| 75 61 74 65 73 20 2f 20 | 47 6c 6f 62 61 6c 20 64 |uates / |Global d|
|00002170| 65 63 73 20 65 74 63 2e | 2e 2e 0d 0a 0d 0a 3b 20 |ecs etc.|......; |
|00002180| 2d 2d 2d 2d 2d 2d 0d 0a | 3b 20 4d 61 63 72 6f 73 |------..|; Macros|
|00002190| 0d 0a 3b 20 2d 2d 2d 2d | 2d 2d 0d 0a 0d 0a 4d 41 |..; ----|--....MA|
|000021a0| 43 52 4f 20 20 20 57 61 | 69 74 52 65 74 72 61 63 |CRO Wa|itRetrac|
|000021b0| 65 0d 0a 09 4c 4f 43 41 | 4c 20 20 20 57 61 69 74 |e...LOCA|L Wait|
|000021c0| 4e 6f 48 2c 20 57 61 69 | 74 48 2c 20 45 6e 64 0d |NoH, Wai|tH, End.|
|000021d0| 0a 09 3b 0d 0a 09 3b 20 | 54 68 69 73 20 6d 61 63 |..;...; |This mac|
|000021e0| 72 6f 20 77 61 69 74 73 | 20 66 6f 72 20 74 68 65 |ro waits| for the|
|000021f0| 20 68 6f 72 69 7a 6f 6e | 74 69 61 6c 20 72 65 74 | horizon|tial ret|
|00002200| 72 61 63 65 20 73 69 67 | 6e 61 6c 20 66 72 6f 6d |race sig|nal from|
|00002210| 20 74 68 65 0d 0a 09 3b | 20 6d 6f 6e 69 74 6f 72 | the...;| monitor|
|00002220| 20 62 65 66 6f 72 65 20 | 63 6f 6e 74 69 6e 75 69 | before |continui|
|00002230| 6e 67 2e 20 49 6e 74 65 | 72 72 75 70 74 73 20 73 |ng. Inte|rrupts s|
|00002240| 68 6f 75 6c 64 20 62 65 | 20 64 69 73 61 62 6c 65 |hould be| disable|
|00002250| 64 20 42 34 0d 0a 09 3b | 20 63 61 6c 6c 69 6e 67 |d B4...;| calling|
|00002260| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 20 77 69 | this ro|utine wi|
|00002270| 74 68 20 43 4c 49 2e 20 | 4f 66 20 63 6f 75 72 73 |th CLI. |Of cours|
|00002280| 65 2c 20 6d 61 6b 65 20 | 73 75 72 65 20 69 6e 74 |e, make |sure int|
|00002290| 27 73 20 61 72 65 0d 0a | 09 3b 20 72 65 65 6e 61 |'s are..|.; reena|
|000022a0| 62 6c 65 64 20 61 66 74 | 65 72 77 61 72 64 73 20 |bled aft|erwards |
|000022b0| 77 69 74 68 20 53 54 49 | 2e 0d 0a 09 3b 0d 0a 09 |with STI|....;...|
|000022c0| 3b 20 4d 6f 64 69 66 69 | 65 73 0d 0a 09 3b 20 20 |; Modifi|es...; |
|000022d0| 20 20 20 20 20 44 58 2c | 20 41 4c 0d 0a 09 3b 0d | DX,| AL...;.|
|000022e0| 0a 09 09 6d 6f 76 20 20 | 20 20 20 64 78 2c 20 33 |...mov | dx, 3|
|000022f0| 44 41 68 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |DAh | |
|00002300| 20 20 20 3b 20 43 47 41 | 20 73 74 61 74 75 73 20 | ; CGA| status |
|00002310| 72 65 67 69 73 74 65 72 | 0d 0a 09 57 61 69 74 4e |register|...WaitN|
|00002320| 6f 48 3a 0d 0a 09 09 69 | 6e 20 20 20 20 20 20 61 |oH:....i|n a|
|00002330| 6c 2c 20 64 78 20 20 20 | 20 20 20 20 20 20 20 20 |l, dx | |
|00002340| 20 20 20 20 20 20 20 3b | 20 47 65 74 20 36 38 34 | ;| Get 684|
|00002350| 35 20 53 74 61 74 75 73 | 0d 0a 09 09 74 65 73 74 |5 Status|....test|
|00002360| 20 20 20 20 61 6c 2c 38 | 20 20 20 20 20 20 20 20 | al,8| |
|00002370| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 43 68 | | ; Ch|
|00002380| 65 63 6b 20 76 65 72 74 | 20 72 65 74 72 61 63 65 |eck vert| retrace|
|00002390| 0d 0a 09 09 6a 6e 7a 20 | 20 20 20 20 45 6e 64 20 |....jnz | End |
|000023a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000023b0| 20 20 20 20 3b 20 20 20 | 49 6e 20 50 72 6f 67 72 | ; |In Progr|
|000023c0| 65 73 73 3f 20 67 6f 0d | 0a 09 09 72 63 72 20 20 |ess? go.|...rcr |
|000023d0| 20 20 20 61 6c 2c 31 20 | 20 20 20 20 20 20 20 20 | al,1 | |
|000023e0| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 57 61 69 | | ; Wai|
|000023f0| 74 20 66 6f 72 20 65 6e | 64 20 6f 66 0d 0a 09 09 |t for en|d of....|
|00002400| 6a 63 20 20 20 20 20 20 | 57 61 69 74 4e 6f 48 20 |jc |WaitNoH |
|00002410| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002420| 3b 20 20 20 68 6f 72 69 | 7a 6f 6e 74 69 61 6c 20 |; hori|zontial |
|00002430| 72 65 74 72 61 63 65 0d | 0a 09 57 61 69 74 48 3a |retrace.|..WaitH:|
|00002440| 0d 0a 09 09 69 6e 20 20 | 20 20 20 20 61 6c 2c 20 |....in | al, |
|00002450| 64 78 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |dx | |
|00002460| 20 20 20 20 3b 20 47 65 | 74 20 36 38 34 35 20 73 | ; Ge|t 6845 s|
|00002470| 74 61 74 75 73 20 61 67 | 61 69 6e 0d 0a 09 09 72 |tatus ag|ain....r|
|00002480| 63 72 20 20 20 20 20 61 | 6c 2c 20 31 20 20 20 20 |cr a|l, 1 |
|00002490| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;|
|000024a0| 20 57 61 69 74 20 66 6f | 72 20 68 6f 72 69 7a 6f | Wait fo|r horizo|
|000024b0| 6e 74 69 61 6c 0d 0a 09 | 09 6a 6e 63 20 20 20 20 |ntial...|.jnc |
|000024c0| 20 57 61 69 74 48 20 20 | 20 20 20 20 20 20 20 20 | WaitH | |
|000024d0| 20 20 20 20 20 20 20 20 | 20 3b 20 20 20 72 65 74 | | ; ret|
|000024e0| 72 61 63 65 0d 0a 09 45 | 6e 64 3a 0d 0a 45 4e 44 |race...E|nd:..END|
|000024f0| 4d 0d 0a 0d 0a 0d 0a 44 | 41 54 41 53 45 47 0d 0a |M......D|ATASEG..|
|00002500| 0d 0a 09 47 4c 4f 42 41 | 4c 20 42 61 73 65 4f 66 |...GLOBA|L BaseOf|
|00002510| 53 63 72 65 65 6e 3a 57 | 4f 52 44 0d 0a 09 47 4c |Screen:W|ORD...GL|
|00002520| 4f 42 41 4c 20 53 6e 6f | 77 43 68 65 63 6b 3a 42 |OBAL Sno|wCheck:B|
|00002530| 59 54 45 0d 0a 09 47 4c | 4f 42 41 4c 20 56 69 64 |YTE...GL|OBAL Vid|
|00002540| 65 6f 4d 6f 64 65 3a 42 | 59 54 45 0d 0a 0d 0a 09 |eoMode:B|YTE.....|
|00002550| 42 61 73 65 4f 66 53 63 | 72 65 65 6e 20 20 20 20 |BaseOfSc|reen |
|00002560| 44 57 20 20 20 20 20 20 | 43 47 41 53 65 67 20 20 |DW |CGASeg |
|00002570| 20 20 20 20 20 20 20 20 | 3b 20 4f 66 66 73 65 74 | |; Offset|
|00002580| 20 66 6f 72 20 63 75 72 | 72 65 6e 74 20 76 69 64 | for cur|rent vid|
|00002590| 20 6d 6f 64 65 0d 0a 09 | 53 6e 6f 77 43 68 65 63 | mode...|SnowChec|
|000025a0| 6b 20 20 20 20 20 20 20 | 44 42 20 20 20 20 20 20 |k |DB |
|000025b0| 30 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |0 | |
|000025c0| 3b 20 43 68 65 63 6b 20 | 66 6f 72 20 72 65 74 72 |; Check |for retr|
|000025d0| 61 63 65 20 31 2f 30 0d | 0a 09 56 69 64 65 6f 4d |ace 1/0.|..VideoM|
|000025e0| 6f 64 65 20 20 20 20 20 | 20 20 44 42 20 20 20 20 |ode | DB |
|000025f0| 20 20 30 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | 0 | |
|00002600| 20 20 3b 20 43 75 72 72 | 65 6e 74 20 42 49 4f 53 | ; Curr|ent BIOS|
|00002610| 20 49 4e 54 20 31 30 20 | 76 69 64 20 6d 6f 64 65 | INT 10 |vid mode|
|00002620| 0d 0a 0d 0a 0d 0a 3b 20 | 2d 2d 2d 2d 2d 2d 2d 2d |......; |--------|
|00002630| 2d 0d 0a 3b 20 43 6f 64 | 65 20 61 72 65 61 0d 0a |-..; Cod|e area..|
|00002640| 3b 20 2d 2d 2d 2d 2d 2d | 2d 2d 2d 0d 0a 0d 0a 43 |; ------|---....C|
|00002650| 4f 44 45 53 45 47 0d 0a | 0d 0a 3b 20 2d 2d 2d 2d |ODESEG..|..; ----|
|00002660| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0d 0a 3b 20 |--------|----..; |
|00002670| 56 69 64 65 6f 20 50 72 | 6f 63 65 64 75 72 65 73 |Video Pr|ocedures|
|00002680| 0d 0a 3b 20 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |..; ----|--------|
|00002690| 2d 2d 2d 2d 0d 0a 0d 0a | 09 50 52 4f 43 20 4d 6f |----....|.PROC Mo|
|000026a0| 76 65 58 59 5f 44 49 0d | 0a 09 3b 0d 0a 09 3b 20 |veXY_DI.|..;...; |
|000026b0| 54 68 69 73 20 70 72 6f | 63 65 64 75 72 65 20 6d |This pro|cedure m|
|000026c0| 6f 76 65 73 20 74 6f 20 | 74 68 65 20 6f 66 66 73 |oves to |the offs|
|000026d0| 65 74 20 69 6e 64 69 63 | 61 74 65 64 20 62 79 20 |et indic|ated by |
|000026e0| 61 6e 20 58 20 26 20 59 | 20 63 75 73 6f 72 0d 0a |an X & Y| cusor..|
|000026f0| 09 3b 20 6c 6f 63 61 74 | 69 6f 6e 2e 0d 0a 09 3b |.; locat|ion....;|
|00002700| 0d 0a 09 3b 20 49 6e 70 | 75 74 0d 0a 09 3b 20 20 |...; Inp|ut...; |
|00002710| 20 20 20 20 20 41 48 20 | 3d 20 52 6f 77 0d 0a 09 | AH |= Row...|
|00002720| 3b 20 20 20 20 20 20 20 | 41 4c 20 3d 20 43 6f 6c |; |AL = Col|
|00002730| 75 6d 6e 0d 0a 09 3b 20 | 4f 75 74 70 75 74 0d 0a |umn...; |Output..|
|00002740| 09 3b 20 20 20 20 20 20 | 20 44 49 20 3d 20 4d 65 |.; | DI = Me|
|00002750| 6d 6f 72 79 20 4f 66 66 | 73 65 74 0d 0a 09 3b 0d |mory Off|set...;.|
|00002760| 0a 09 09 70 75 73 68 20 | 20 20 20 63 78 20 20 20 |...push | cx |
|00002770| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 53 61 76 | | ; Sav|
|00002780| 65 20 43 58 0d 0a 09 09 | 78 6f 72 20 20 20 20 20 |e CX....|xor |
|00002790| 63 6c 2c 20 63 6c 20 20 | 20 20 20 20 20 20 20 20 |cl, cl | |
|000027a0| 3b 20 43 6c 65 61 72 20 | 43 4c 0d 0a 09 09 6d 6f |; Clear |CL....mo|
|000027b0| 76 20 20 20 20 20 63 68 | 2c 20 61 68 20 20 20 20 |v ch|, ah |
|000027c0| 20 20 20 20 20 20 3b 20 | 43 58 20 3d 20 52 6f 77 | ; |CX = Row|
|000027d0| 20 2a 20 32 35 36 0d 0a | 09 09 64 65 63 20 20 20 | * 256..|..dec |
|000027e0| 20 20 63 68 20 20 20 20 | 20 20 20 20 20 20 20 20 | ch | |
|000027f0| 20 20 3b 20 43 58 20 3d | 20 28 52 6f 77 20 2d 20 | ; CX =| (Row - |
|00002800| 31 29 20 7b 30 2d 32 34 | 20 42 61 73 65 64 7d 0d |1) {0-24| Based}.|
|00002810| 0a 09 09 73 68 72 20 20 | 20 20 20 63 78 2c 20 31 |...shr | cx, 1|
|00002820| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 43 58 20 | | ; CX |
|00002830| 3d 20 52 6f 77 20 2a 20 | 31 32 38 0d 0a 09 09 6d |= Row * |128....m|
|00002840| 6f 76 20 20 20 20 20 64 | 69 2c 20 63 78 20 20 20 |ov d|i, cx |
|00002850| 20 20 20 20 20 20 20 3b | 20 53 74 6f 72 65 20 69 | ;| Store i|
|00002860| 6e 20 44 49 0d 0a 09 09 | 73 68 72 20 20 20 20 20 |n DI....|shr |
|00002870| 64 69 2c 20 31 20 20 20 | 20 20 20 20 20 20 20 20 |di, 1 | |
|00002880| 3b 20 44 49 20 3d 20 52 | 6f 77 20 2a 20 36 34 0d |; DI = R|ow * 64.|
|00002890| 0a 09 09 73 68 72 20 20 | 20 20 20 64 69 2c 20 31 |...shr | di, 1|
|000028a0| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 44 49 20 | | ; DI |
|000028b0| 3d 20 52 6f 77 20 2a 20 | 33 32 0d 0a 09 09 61 64 |= Row * |32....ad|
|000028c0| 64 20 20 20 20 20 64 69 | 2c 20 63 78 20 20 20 20 |d di|, cx |
|000028d0| 20 20 20 20 20 20 3b 20 | 44 49 20 3d 20 28 52 6f | ; |DI = (Ro|
|000028e0| 77 20 2a 20 31 32 38 29 | 2b 28 52 6f 77 20 2a 20 |w * 128)|+(Row * |
|000028f0| 33 32 29 20 7b 52 6f 77 | 2a 31 36 30 7d 0d 0a 09 |32) {Row|*160}...|
|00002900| 09 78 6f 72 20 20 20 20 | 20 63 68 2c 20 63 68 20 |.xor | ch, ch |
|00002910| 20 20 20 20 20 20 20 20 | 20 3b 20 43 6c 65 61 72 | | ; Clear|
|00002920| 20 43 48 20 72 65 67 69 | 73 74 65 72 0d 0a 09 09 | CH regi|ster....|
|00002930| 6d 6f 76 20 20 20 20 20 | 63 6c 2c 20 61 6c 20 20 |mov |cl, al |
|00002940| 20 20 20 20 20 20 20 20 | 3b 20 43 58 20 3d 20 43 | |; CX = C|
|00002950| 6f 6c 75 6d 6e 73 0d 0a | 09 09 64 65 63 20 20 20 |olumns..|..dec |
|00002960| 20 20 63 78 20 20 20 20 | 20 20 20 20 20 20 20 20 | cx | |
|00002970| 20 20 3b 20 4d 61 6b 65 | 20 30 2d 37 39 0d 0a 09 | ; Make| 0-79...|
|00002980| 09 73 68 6c 20 20 20 20 | 20 63 78 2c 20 31 20 20 |.shl | cx, 1 |
|00002990| 20 20 20 20 20 20 20 20 | 20 3b 20 41 63 63 6f 75 | | ; Accou|
|000029a0| 6e 74 20 66 6f 72 20 61 | 74 74 72 69 62 75 74 65 |nt for a|ttribute|
|000029b0| 0d 0a 09 09 61 64 64 20 | 20 20 20 20 64 69 2c 20 |....add | di, |
|000029c0| 63 78 20 20 20 20 20 20 | 20 20 20 20 3b 20 44 49 |cx | ; DI|
|000029d0| 20 3d 20 28 52 6f 77 20 | 2a 20 31 36 30 29 20 2b | = (Row |* 160) +|
|000029e0| 20 28 43 6f 6c 20 2a 20 | 32 29 0d 0a 09 09 70 6f | (Col * |2)....po|
|000029f0| 70 20 20 20 20 20 63 78 | 20 20 20 20 20 20 20 20 |p cx| |
|00002a00| 20 20 20 20 20 20 3b 20 | 52 65 73 74 6f 72 65 20 | ; |Restore |
|00002a10| 43 58 20 72 65 67 69 73 | 74 65 72 0d 0a 09 09 72 |CX regis|ter....r|
|00002a20| 65 74 0d 0a 0d 0a 09 45 | 4e 44 50 20 4d 6f 76 65 |et.....E|NDP Move|
|00002a30| 58 59 5f 44 49 0d 0a 0d | 0a 09 50 52 4f 43 20 4d |XY_DI...|..PROC M|
|00002a40| 6f 76 65 58 59 5f 53 49 | 0d 0a 09 3b 0d 0a 09 3b |oveXY_SI|...;...;|
|00002a50| 20 54 68 69 73 20 70 72 | 6f 63 65 64 75 72 65 20 | This pr|ocedure |
|00002a60| 6d 6f 76 65 73 20 74 6f | 20 74 68 65 20 6f 66 66 |moves to| the off|
|00002a70| 73 65 74 20 69 6e 64 69 | 63 61 74 65 64 20 62 79 |set indi|cated by|
|00002a80| 20 61 6e 20 58 20 26 20 | 59 20 63 75 73 6f 72 0d | an X & |Y cusor.|
|00002a90| 0a 09 3b 20 6c 6f 63 61 | 74 69 6f 6e 2e 0d 0a 09 |..; loca|tion....|
|00002aa0| 3b 0d 0a 09 3b 20 49 6e | 70 75 74 0d 0a 09 3b 20 |;...; In|put...; |
|00002ab0| 20 20 20 20 20 20 41 48 | 20 3d 20 52 6f 77 0d 0a | AH| = Row..|
|00002ac0| 09 3b 20 20 20 20 20 20 | 20 41 4c 20 3d 20 43 6f |.; | AL = Co|
|00002ad0| 6c 75 6d 6e 0d 0a 09 3b | 20 4f 75 74 70 75 74 0d |lumn...;| Output.|
|00002ae0| 0a 09 3b 20 20 20 20 20 | 20 20 53 49 20 3d 20 4d |..; | SI = M|
|00002af0| 65 6d 6f 72 79 20 4f 66 | 66 73 65 74 20 2d 20 50 |emory Of|fset - P|
|00002b00| 6f 69 6e 74 73 20 31 20 | 62 79 74 65 20 62 65 79 |oints 1 |byte bey|
|00002b10| 6f 6e 64 20 6e 75 6c 6c | 20 6f 66 20 73 74 72 20 |ond null| of str |
|00002b20| 64 69 73 70 6c 61 79 65 | 64 0d 0a 09 3b 0d 0a 0d |displaye|d...;...|
|00002b30| 0a 09 09 70 75 73 68 20 | 20 20 20 63 78 20 20 20 |...push | cx |
|00002b40| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 53 61 76 | | ; Sav|
|00002b50| 65 20 43 58 0d 0a 09 09 | 78 6f 72 20 20 20 20 20 |e CX....|xor |
|00002b60| 63 6c 2c 20 63 6c 20 20 | 20 20 20 20 20 20 20 20 |cl, cl | |
|00002b70| 3b 20 43 6c 65 61 72 20 | 43 4c 0d 0a 09 09 6d 6f |; Clear |CL....mo|
|00002b80| 76 20 20 20 20 20 63 68 | 2c 20 61 68 20 20 20 20 |v ch|, ah |
|00002b90| 20 20 20 20 20 20 3b 20 | 43 58 20 3d 20 52 6f 77 | ; |CX = Row|
|00002ba0| 20 2a 20 32 35 36 0d 0a | 09 09 64 65 63 20 20 20 | * 256..|..dec |
|00002bb0| 20 20 63 68 20 20 20 20 | 20 20 20 20 20 20 20 20 | ch | |
|00002bc0| 20 20 3b 20 43 58 20 3d | 20 28 52 6f 77 20 2d 20 | ; CX =| (Row - |
|00002bd0| 31 29 20 7b 30 2d 32 34 | 20 42 61 73 65 64 7d 0d |1) {0-24| Based}.|
|00002be0| 0a 09 09 73 68 72 20 20 | 20 20 20 63 78 2c 20 31 |...shr | cx, 1|
|00002bf0| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 43 58 20 | | ; CX |
|00002c00| 3d 20 52 6f 77 20 2a 20 | 31 32 38 0d 0a 09 09 6d |= Row * |128....m|
|00002c10| 6f 76 20 20 20 20 20 73 | 69 2c 20 63 78 20 20 20 |ov s|i, cx |
|00002c20| 20 20 20 20 20 20 20 3b | 20 53 74 6f 72 65 20 69 | ;| Store i|
|00002c30| 6e 20 53 49 0d 0a 09 09 | 73 68 72 20 20 20 20 20 |n SI....|shr |
|00002c40| 73 69 2c 20 31 20 20 20 | 20 20 20 20 20 20 20 20 |si, 1 | |
|00002c50| 3b 20 53 49 20 3d 20 52 | 6f 77 20 2a 20 36 34 0d |; SI = R|ow * 64.|
|00002c60| 0a 09 09 73 68 72 20 20 | 20 20 20 73 69 2c 20 31 |...shr | si, 1|
|00002c70| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 53 49 20 | | ; SI |
|00002c80| 3d 20 52 6f 77 20 2a 20 | 33 32 0d 0a 09 09 61 64 |= Row * |32....ad|
|00002c90| 64 20 20 20 20 20 73 69 | 2c 20 63 78 20 20 20 20 |d si|, cx |
|00002ca0| 20 20 20 20 20 20 3b 20 | 53 49 20 3d 20 28 52 6f | ; |SI = (Ro|
|00002cb0| 77 20 2a 20 31 32 38 29 | 2b 28 52 6f 77 20 2a 20 |w * 128)|+(Row * |
|00002cc0| 33 32 29 20 7b 52 6f 77 | 2a 31 36 30 7d 0d 0a 09 |32) {Row|*160}...|
|00002cd0| 09 78 6f 72 20 20 20 20 | 20 63 68 2c 20 63 68 20 |.xor | ch, ch |
|00002ce0| 20 20 20 20 20 20 20 20 | 20 3b 20 43 6c 65 61 72 | | ; Clear|
|00002cf0| 20 43 48 20 72 65 67 69 | 73 74 65 72 0d 0a 09 09 | CH regi|ster....|
|00002d00| 6d 6f 76 20 20 20 20 20 | 63 6c 2c 20 61 6c 20 20 |mov |cl, al |
|00002d10| 20 20 20 20 20 20 20 20 | 3b 20 43 58 20 3d 20 43 | |; CX = C|
|00002d20| 6f 6c 75 6d 6e 73 0d 0a | 09 09 64 65 63 20 20 20 |olumns..|..dec |
|00002d30| 20 20 63 78 20 20 20 20 | 20 20 20 20 20 20 20 20 | cx | |
|00002d40| 20 20 3b 20 4d 61 6b 65 | 20 30 2d 37 39 0d 0a 09 | ; Make| 0-79...|
|00002d50| 09 73 68 6c 20 20 20 20 | 20 63 78 2c 20 31 20 20 |.shl | cx, 1 |
|00002d60| 20 20 20 20 20 20 20 20 | 20 3b 20 41 63 63 6f 75 | | ; Accou|
|00002d70| 6e 74 20 66 6f 72 20 61 | 74 74 72 69 62 75 74 65 |nt for a|ttribute|
|00002d80| 0d 0a 09 09 61 64 64 20 | 20 20 20 20 73 69 2c 20 |....add | si, |
|00002d90| 63 78 20 20 20 20 20 20 | 20 20 20 20 3b 20 44 49 |cx | ; DI|
|00002da0| 20 3d 20 28 52 6f 77 20 | 2a 20 31 36 30 29 20 2b | = (Row |* 160) +|
|00002db0| 20 28 43 6f 6c 20 2a 20 | 32 29 0d 0a 09 09 70 6f | (Col * |2)....po|
|00002dc0| 70 20 20 20 20 20 63 78 | 20 20 20 20 20 20 20 20 |p cx| |
|00002dd0| 20 20 20 20 20 20 3b 20 | 52 65 73 74 6f 72 65 20 | ; |Restore |
|00002de0| 43 58 20 72 65 67 69 73 | 74 65 72 0d 0a 09 09 72 |CX regis|ter....r|
|00002df0| 65 74 0d 0a 0d 0a 09 45 | 4e 44 50 20 4d 6f 76 65 |et.....E|NDP Move|
|00002e00| 58 59 5f 53 49 0d 0a 0d | 0a 09 47 4c 4f 42 41 4c |XY_SI...|..GLOBAL|
|00002e10| 20 20 45 47 41 49 6e 73 | 74 61 6c 6c 65 64 3a 50 | EGAIns|talled:P|
|00002e20| 52 4f 43 0d 0a 09 50 52 | 4f 43 20 20 20 20 45 47 |ROC...PR|OC EG|
|00002e30| 41 49 6e 73 74 61 6c 6c | 65 64 0d 0a 09 3b 0d 0a |AInstall|ed...;..|
|00002e40| 09 3b 20 54 68 69 73 20 | 70 72 6f 63 65 64 75 72 |.; This |procedur|
|00002e50| 65 20 63 68 65 63 6b 73 | 20 74 6f 20 73 65 65 20 |e checks| to see |
|00002e60| 69 66 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 61 |if the c|urrent a|
|00002e70| 64 61 70 74 65 72 20 63 | 61 72 64 20 69 73 20 61 |dapter c|ard is a|
|00002e80| 6e 0d 0a 09 3b 20 45 47 | 41 2e 0d 0a 09 3b 0d 0a |n...; EG|A....;..|
|00002e90| 09 3b 20 4f 75 74 70 75 | 74 0d 0a 09 3b 20 20 20 |.; Outpu|t...; |
|00002ea0| 20 20 20 20 41 4c 20 3d | 20 31 20 69 66 20 45 47 | AL =| 1 if EG|
|00002eb0| 41 20 41 64 61 70 74 65 | 72 20 69 73 20 66 6f 75 |A Adapte|r is fou|
|00002ec0| 6e 64 20 2f 20 30 20 69 | 66 20 6e 6f 74 0d 0a 09 |nd / 0 i|f not...|
|00002ed0| 3b 20 4d 6f 64 69 66 69 | 65 64 0d 0a 09 3b 20 20 |; Modifi|ed...; |
|00002ee0| 20 20 20 20 20 41 58 0d | 0a 09 3b 0d 0a 09 09 70 | AX.|..;....p|
|00002ef0| 75 73 68 20 20 20 20 62 | 78 20 20 20 20 20 20 20 |ush b|x |
|00002f00| 20 20 20 20 20 20 20 3b | 20 53 74 6f 72 65 20 75 | ;| Store u|
|00002f10| 73 65 64 20 72 65 67 69 | 73 74 65 72 73 0d 0a 09 |sed regi|sters...|
|00002f20| 09 70 75 73 68 20 20 20 | 20 63 78 0d 0a 09 09 6d |.push | cx....m|
|00002f30| 6f 76 20 20 20 20 20 61 | 78 2c 20 31 32 30 30 68 |ov a|x, 1200h|
|00002f40| 20 20 20 20 20 20 20 3b | 20 42 49 4f 53 20 49 4e | ;| BIOS IN|
|00002f50| 54 20 31 30 20 66 75 6e | 63 74 69 6f 6e 20 31 32 |T 10 fun|ction 12|
|00002f60| 68 0d 0a 09 09 6d 6f 76 | 20 20 20 20 20 62 78 2c |h....mov| bx,|
|00002f70| 20 31 30 68 20 20 20 20 | 20 20 20 20 20 3b 20 73 | 10h | ; s|
|00002f80| 75 62 2d 66 75 6e 63 20 | 31 30 68 20 28 47 65 74 |ub-func |10h (Get|
|00002f90| 20 45 47 41 20 69 6e 66 | 6f 29 0d 0a 09 09 6d 6f | EGA inf|o)....mo|
|00002fa0| 76 20 20 20 20 20 63 78 | 2c 20 30 46 46 46 46 68 |v cx|, 0FFFFh|
|00002fb0| 20 20 20 20 20 20 3b 20 | 6c 69 74 65 20 61 6c 6c | ; |lite all|
|00002fc0| 20 62 69 74 73 20 6f 66 | 20 43 58 0d 0a 09 09 69 | bits of| CX....i|
|00002fd0| 6e 74 20 20 20 20 20 31 | 30 68 20 20 20 20 20 20 |nt 1|0h |
|00002fe0| 20 20 20 20 20 20 20 3b | 20 63 61 6c 6c 20 49 4e | ;| call IN|
|00002ff0| 54 20 31 30 0d 0a 09 09 | 78 6f 72 20 20 20 20 20 |T 10....|xor |
|00003000| 61 78 2c 20 61 78 20 20 | 20 20 20 20 20 20 20 20 |ax, ax | |
|00003010| 3b 20 43 6c 65 61 72 20 | 41 58 20 72 65 67 0d 0a |; Clear |AX reg..|
|00003020| 09 09 63 6d 70 20 20 20 | 20 20 63 78 2c 20 30 46 |..cmp | cx, 0F|
|00003030| 46 46 46 68 20 20 20 20 | 20 20 3b 20 49 66 20 43 |FFFh | ; If C|
|00003040| 58 20 6e 6f 74 20 6d 6f | 64 69 66 69 65 64 20 62 |X not mo|dified b|
|00003050| 79 20 49 4e 54 20 63 61 | 6c 6c 0d 0a 09 09 6a 65 |y INT ca|ll....je|
|00003060| 20 20 20 20 20 20 45 49 | 5f 44 6f 6e 65 20 20 20 | EI|_Done |
|00003070| 20 20 20 20 20 20 3b 20 | 20 20 74 68 65 6e 20 74 | ; | then t|
|00003080| 68 69 73 20 69 73 20 6e | 6f 74 20 61 6e 20 45 47 |his is n|ot an EG|
|00003090| 41 0d 0a 09 09 69 6e 63 | 20 20 20 20 20 41 4c 20 |A....inc| AL |
|000030a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 49 | | ; I|
|000030b0| 6e 63 72 65 6d 65 6e 74 | 20 41 4c 20 74 6f 20 73 |ncrement| AL to s|
|000030c0| 68 6f 77 20 74 68 69 73 | 20 69 73 20 45 47 41 0d |how this| is EGA.|
|000030d0| 0a 09 45 49 5f 44 6f 6e | 65 3a 0d 0a 09 09 70 6f |..EI_Don|e:....po|
|000030e0| 70 20 20 20 20 20 63 78 | 20 20 20 20 20 20 20 20 |p cx| |
|000030f0| 20 20 20 20 20 20 3b 20 | 52 65 73 74 6f 72 65 20 | ; |Restore |
|00003100| 72 65 67 73 0d 0a 09 09 | 70 6f 70 20 20 20 20 20 |regs....|pop |
|00003110| 62 78 0d 0a 09 09 72 65 | 74 0d 0a 0d 0a 09 45 4e |bx....re|t.....EN|
|00003120| 44 50 20 45 47 41 49 6e | 73 74 61 6c 6c 65 64 0d |DP EGAIn|stalled.|
|00003130| 0a 0d 0a 09 47 4c 4f 42 | 41 4c 20 20 47 65 74 56 |....GLOB|AL GetV|
|00003140| 69 64 65 6f 4d 6f 64 65 | 3a 50 52 4f 43 0d 0a 09 |ideoMode|:PROC...|
|00003150| 50 52 4f 43 20 20 20 20 | 47 65 74 56 69 64 65 6f |PROC |GetVideo|
|00003160| 4d 6f 64 65 0d 0a 09 3b | 0d 0a 09 3b 20 54 68 69 |Mode...;|...; Thi|
|00003170| 73 20 70 72 6f 63 65 64 | 75 72 65 20 63 68 65 63 |s proced|ure chec|
|00003180| 6b 73 20 74 68 65 20 76 | 69 64 65 6f 20 6d 6f 64 |ks the v|ideo mod|
|00003190| 65 20 61 6e 64 20 73 65 | 74 73 20 74 68 65 20 42 |e and se|ts the B|
|000031a0| 61 73 65 4f 66 53 63 72 | 65 65 6e 0d 0a 09 3b 20 |aseOfScr|een...; |
|000031b0| 61 63 63 6f 72 64 69 6e | 67 6c 79 2e 20 20 49 74 |accordin|gly. It|
|000031c0| 20 61 6c 73 6f 20 73 65 | 74 73 20 53 6e 6f 77 43 | also se|ts SnowC|
|000031d0| 68 65 63 6b 20 74 6f 20 | 31 20 69 66 20 61 64 61 |heck to |1 if ada|
|000031e0| 70 74 65 72 20 69 73 20 | 61 20 43 47 41 2e 0d 0a |pter is |a CGA...|
|000031f0| 09 3b 0d 0a 09 3b 20 4f | 75 74 70 75 74 0d 0a 09 |.;...; O|utput...|
|00003200| 3b 20 20 20 20 20 20 20 | 42 61 73 65 4f 66 53 63 |; |BaseOfSc|
|00003210| 72 65 65 6e 0d 0a 09 3b | 20 20 20 20 20 20 20 56 |reen...;| V|
|00003220| 69 64 65 6f 4d 6f 64 65 | 0d 0a 09 3b 20 20 20 20 |ideoMode|...; |
|00003230| 20 20 20 53 6e 6f 77 43 | 68 65 63 6b 0d 0a 09 3b | SnowC|heck...;|
|00003240| 20 55 73 65 73 0d 0a 09 | 3b 20 20 20 20 20 20 20 | Uses...|; |
|00003250| 45 47 41 49 6e 73 74 61 | 6c 6c 65 64 0d 0a 09 3b |EGAInsta|lled...;|
|00003260| 0d 0a 09 09 70 75 73 68 | 20 20 20 20 61 78 20 20 |....push| ax |
|00003270| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003280| 20 20 20 20 3b 20 53 74 | 6f 72 65 20 72 65 67 69 | ; St|ore regi|
|00003290| 73 74 65 72 73 0d 0a 09 | 09 70 75 73 68 20 20 20 |sters...|.push |
|000032a0| 20 64 69 0d 0a 09 09 70 | 75 73 68 20 20 20 20 64 | di....p|ush d|
|000032b0| 73 0d 0a 09 09 6d 6f 76 | 20 20 20 20 20 61 78 2c |s....mov| ax,|
|000032c0| 20 40 64 61 74 61 20 20 | 20 20 20 20 20 20 20 20 | @data | |
|000032d0| 20 20 20 20 20 3b 20 4d | 6f 76 65 20 44 41 54 41 | ; M|ove DATA|
|000032e0| 53 45 47 20 73 65 67 6d | 65 6e 74 0d 0a 09 09 6d |SEG segm|ent....m|
|000032f0| 6f 76 20 20 20 20 20 64 | 73 2c 20 61 78 20 20 20 |ov d|s, ax |
|00003300| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;|
|00003310| 20 20 20 69 6e 74 6f 20 | 44 53 20 72 65 67 69 73 | into |DS regis|
|00003320| 74 65 72 73 0d 0a 09 09 | 6d 6f 76 20 20 20 20 20 |ters....|mov |
|00003330| 64 69 2c 20 43 47 41 53 | 65 67 20 20 20 20 20 20 |di, CGAS|eg |
|00003340| 20 20 20 20 20 20 20 20 | 3b 20 6d 6f 76 65 20 6f | |; move o|
|00003350| 66 66 73 65 74 20 6f 66 | 20 43 47 41 20 74 6f 20 |ffset of| CGA to |
|00003360| 44 49 0d 0a 09 09 6d 6f | 76 20 20 20 20 20 61 68 |DI....mo|v ah|
|00003370| 2c 20 30 46 68 20 20 20 | 20 20 20 20 20 20 20 20 |, 0Fh | |
|00003380| 20 20 20 20 20 20 3b 20 | 49 4e 54 20 31 30 20 67 | ; |INT 10 g|
|00003390| 65 74 20 76 69 64 20 6d | 6f 64 65 20 66 75 6e 63 |et vid m|ode func|
|000033a0| 0d 0a 09 09 69 6e 74 20 | 20 20 20 20 31 30 68 20 |....int | 10h |
|000033b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000033c0| 20 20 20 20 3b 20 67 65 | 74 20 74 68 65 20 76 69 | ; ge|t the vi|
|000033d0| 64 65 6f 20 6d 6f 64 65 | 0d 0a 09 09 78 6f 72 20 |deo mode|....xor |
|000033e0| 20 20 20 20 61 68 2c 20 | 61 68 20 20 20 20 20 20 | ah, |ah |
|000033f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 63 6c | | ; cl|
|00003400| 65 61 72 20 74 68 65 20 | 41 48 20 72 65 67 0d 0a |ear the |AH reg..|
|00003410| 09 09 6d 6f 76 20 20 20 | 20 20 5b 56 69 64 65 6f |..mov | [Video|
|00003420| 4d 6f 64 65 5d 2c 20 61 | 6c 20 20 20 20 20 20 20 |Mode], a|l |
|00003430| 20 20 3b 20 70 6c 61 63 | 65 20 6d 6f 64 65 20 69 | ; plac|e mode i|
|00003440| 6e 74 6f 20 56 69 64 65 | 6f 4d 6f 64 65 0d 0a 09 |nto Vide|oMode...|
|00003450| 09 63 6d 70 20 20 20 20 | 20 61 6c 2c 20 37 20 20 |.cmp | al, 7 |
|00003460| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003470| 20 3b 20 49 73 20 74 68 | 69 73 20 61 20 6d 6f 6e | ; Is th|is a mon|
|00003480| 6f 20 73 63 72 65 65 6e | 3f 0d 0a 09 09 6a 6e 65 |o screen|?....jne|
|00003490| 20 20 20 20 20 4e 6f 74 | 4d 6f 6e 6f 20 20 20 20 | Not|Mono |
|000034a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 69 | | ; i|
|000034b0| 66 20 6e 6f 74 20 6a 75 | 6d 70 20 74 6f 20 4e 6f |f not ju|mp to No|
|000034c0| 74 4d 6f 6e 6f 0d 0a 09 | 09 6d 6f 76 20 20 20 20 |tMono...|.mov |
|000034d0| 20 64 69 2c 20 4d 6f 6e | 6f 53 65 67 20 20 20 20 | di, Mon|oSeg |
|000034e0| 20 20 20 20 20 20 20 20 | 20 3b 20 6d 6f 76 65 20 | | ; move |
|000034f0| 6f 66 66 73 65 74 20 6f | 66 20 6d 6f 6e 6f 20 74 |offset o|f mono t|
|00003500| 6f 20 44 49 0d 0a 09 09 | 6d 6f 76 20 20 20 20 20 |o DI....|mov |
|00003510| 5b 53 6e 6f 77 43 68 65 | 63 6b 5d 2c 20 30 20 20 |[SnowChe|ck], 0 |
|00003520| 20 20 20 20 20 20 20 20 | 3b 20 4e 45 56 45 52 20 | |; NEVER |
|00003530| 43 48 45 43 4b 20 52 45 | 54 52 41 43 45 20 4f 4e |CHECK RE|TRACE ON|
|00003540| 20 4d 4f 4e 4f 21 0d 0a | 09 09 6a 6d 70 20 20 20 | MONO!..|..jmp |
|00003550| 20 20 47 56 4d 5f 44 6f | 6e 65 0d 0a 09 4e 6f 74 | GVM_Do|ne...Not|
|00003560| 4d 6f 6e 6f 3a 20 20 20 | 20 20 20 20 20 20 20 20 |Mono: | |
|00003570| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003580| 20 20 20 20 20 3b 20 50 | 72 6f 63 65 73 73 20 43 | ; P|rocess C|
|00003590| 47 41 2f 45 47 41 2f 56 | 47 41 20 61 64 61 70 2e |GA/EGA/V|GA adap.|
|000035a0| 0d 0a 09 09 63 61 6c 6c | 20 20 20 20 45 47 41 49 |....call| EGAI|
|000035b0| 6e 73 74 61 6c 6c 65 64 | 20 20 20 20 20 20 20 20 |nstalled| |
|000035c0| 20 20 20 20 3b 20 43 68 | 65 63 6b 20 66 6f 72 20 | ; Ch|eck for |
|000035d0| 45 47 41 20 61 64 61 70 | 2e 0d 0a 09 09 72 63 72 |EGA adap|.....rcr|
|000035e0| 20 20 20 20 20 61 6c 2c | 20 31 20 20 20 20 20 20 | al,| 1 |
|000035f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 4d | | ; M|
|00003600| 6f 76 65 20 62 69 74 20 | 31 20 74 6f 20 63 61 72 |ove bit |1 to car|
|00003610| 72 79 20 66 6c 61 67 0d | 0a 09 09 6a 63 20 20 20 |ry flag.|...jc |
|00003620| 20 20 20 47 56 4d 5f 44 | 6f 6e 65 20 20 20 20 20 | GVM_D|one |
|00003630| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 49 66 20 | | ; If |
|00003640| 45 47 41 20 74 68 65 6e | 20 6e 6f 20 73 6e 6f 77 |EGA then| no snow|
|00003650| 20 63 68 65 63 6b 0d 0a | 09 09 6d 6f 76 20 20 20 | check..|..mov |
|00003660| 20 20 5b 53 6e 6f 77 43 | 68 65 63 6b 5d 2c 20 31 | [SnowC|heck], 1|
|00003670| 20 20 20 20 20 20 20 20 | 20 20 3b 20 4e 6f 74 20 | | ; Not |
|00003680| 45 47 41 20 73 6f 20 73 | 65 74 20 73 6e 6f 77 20 |EGA so s|et snow |
|00003690| 63 68 65 63 6b 0d 0a 09 | 47 56 4d 5f 44 6f 6e 65 |check...|GVM_Done|
|000036a0| 3a 0d 0a 09 09 6d 6f 76 | 20 20 20 20 20 5b 42 61 |:....mov| [Ba|
|000036b0| 73 65 4f 66 53 63 72 65 | 65 6e 5d 2c 20 64 69 20 |seOfScre|en], di |
|000036c0| 20 20 20 20 20 3b 20 4d | 6f 76 65 20 44 49 20 74 | ; M|ove DI t|
|000036d0| 6f 20 62 61 73 65 20 6f | 66 20 73 63 72 65 65 6e |o base o|f screen|
|000036e0| 0d 0a 09 09 70 6f 70 20 | 20 20 20 20 64 73 20 20 |....pop | ds |
|000036f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003700| 20 20 20 20 3b 20 52 65 | 73 74 6f 72 65 20 72 65 | ; Re|store re|
|00003710| 67 73 0d 0a 09 09 70 6f | 70 20 20 20 20 20 64 69 |gs....po|p di|
|00003720| 0d 0a 09 09 70 6f 70 20 | 20 20 20 20 61 78 0d 0a |....pop | ax..|
|00003730| 09 09 72 65 74 0d 0a 0d | 0a 09 45 4e 44 50 20 47 |..ret...|..ENDP G|
|00003740| 65 74 56 69 64 65 6f 4d | 6f 64 65 0d 0a 0d 0a 09 |etVideoM|ode.....|
|00003750| 47 4c 4f 42 41 4c 20 20 | 44 57 72 69 74 65 43 48 |GLOBAL |DWriteCH|
|00003760| 3a 50 52 4f 43 0d 0a 09 | 50 52 4f 43 20 20 20 20 |:PROC...|PROC |
|00003770| 44 57 72 69 74 65 43 48 | 0d 0a 09 3b 0d 0a 09 3b |DWriteCH|...;...;|
|00003780| 20 57 72 69 74 65 73 20 | 61 20 63 68 61 72 61 63 | Writes |a charac|
|00003790| 74 65 72 20 74 6f 20 74 | 68 65 20 73 63 72 65 65 |ter to t|he scree|
|000037a0| 6e 20 75 73 69 6e 67 20 | 64 69 72 65 63 74 20 6d |n using |direct m|
|000037b0| 65 6d 6f 72 79 20 61 63 | 63 65 73 73 2e 0d 0a 09 |emory ac|cess....|
|000037c0| 3b 0d 0a 09 3b 20 2a 2a | 2a 20 49 4d 50 4f 52 54 |;...; **|* IMPORT|
|000037d0| 41 4e 54 20 2d 2d 20 43 | 41 4c 4c 20 47 65 74 56 |ANT -- C|ALL GetV|
|000037e0| 69 64 65 6f 4d 6f 64 65 | 20 42 65 66 6f 72 65 20 |ideoMode| Before |
|000037f0| 75 73 69 6e 67 20 74 68 | 69 73 20 72 6f 75 74 69 |using th|is routi|
|00003800| 6e 65 21 0d 0a 09 3b 0d | 0a 09 3b 20 49 6e 70 75 |ne!...;.|..; Inpu|
|00003810| 74 0d 0a 09 3b 20 20 20 | 20 20 20 20 41 48 20 20 |t...; | AH |
|00003820| 20 20 20 20 52 6f 77 20 | 6f 6e 20 73 63 72 65 65 | Row |on scree|
|00003830| 6e 20 31 2d 32 35 0d 0a | 09 3b 20 20 20 20 20 20 |n 1-25..|.; |
|00003840| 20 41 4c 20 20 20 20 20 | 20 43 6f 6c 75 6d 6e 20 | AL | Column |
|00003850| 6f 6e 20 73 63 72 65 65 | 6e 20 31 2d 38 30 0d 0a |on scree|n 1-80..|
|00003860| 09 3b 20 20 20 20 20 20 | 20 42 48 20 20 20 20 20 |.; | BH |
|00003870| 20 56 69 64 65 6f 20 41 | 74 74 72 69 62 75 74 65 | Video A|ttribute|
|00003880| 0d 0a 09 3b 20 20 20 20 | 20 20 20 42 4c 20 20 20 |...; | BL |
|00003890| 20 20 20 43 68 61 72 61 | 63 74 65 72 0d 0a 09 3b | Chara|cter...;|
|000038a0| 20 20 20 20 20 20 20 43 | 58 20 20 20 20 20 20 4e | C|X N|
|000038b0| 75 6d 62 65 72 20 6f 66 | 20 74 69 6d 65 73 0d 0a |umber of| times..|
|000038c0| 09 3b 20 4f 75 74 70 75 | 74 0d 0a 09 3b 20 20 20 |.; Outpu|t...; |
|000038d0| 20 20 20 20 53 63 72 65 | 65 6e 20 6d 65 6d 6f 72 | Scre|en memor|
|000038e0| 79 20 28 42 30 30 30 3a | 30 30 30 30 20 6f 72 20 |y (B000:|0000 or |
|000038f0| 38 30 30 30 20 43 47 41 | 2f 4d 4f 4e 4f 0d 0a 09 |8000 CGA|/MONO...|
|00003900| 3b 0d 0a 09 09 70 75 73 | 68 20 20 20 20 61 78 20 |;....pus|h ax |
|00003910| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 53 | | ; S|
|00003920| 74 6f 72 65 20 74 68 65 | 20 72 65 67 69 73 74 65 |tore the| registe|
|00003930| 72 73 0d 0a 09 09 70 75 | 73 68 20 20 20 20 63 78 |rs....pu|sh cx|
|00003940| 0d 0a 09 09 70 75 73 68 | 20 20 20 20 64 78 0d 0a |....push| dx..|
|00003950| 09 09 70 75 73 68 20 20 | 20 20 65 73 0d 0a 09 09 |..push | es....|
|00003960| 70 75 73 68 20 20 20 20 | 64 69 0d 0a 09 09 63 61 |push |di....ca|
|00003970| 6c 6c 20 20 20 20 4d 6f | 76 65 58 59 5f 44 49 20 |ll Mo|veXY_DI |
|00003980| 20 20 20 20 20 20 3b 20 | 53 65 74 20 44 49 20 74 | ; |Set DI t|
|00003990| 6f 20 72 6f 77 20 2f 20 | 63 6f 6c 75 6d 6e 20 6f |o row / |column o|
|000039a0| 66 66 73 65 74 0d 0a 09 | 09 6d 6f 76 20 20 20 20 |ffset...|.mov |
|000039b0| 20 65 73 2c 20 5b 42 61 | 73 65 4f 66 53 63 72 65 | es, [Ba|seOfScre|
|000039c0| 65 6e 5d 20 20 20 20 20 | 20 3b 20 4d 6f 76 65 20 |en] | ; Move |
|000039d0| 73 63 72 65 65 6e 20 73 | 65 67 20 74 6f 20 45 53 |screen s|eg to ES|
|000039e0| 0d 0a 09 09 6d 6f 76 20 | 20 20 20 20 61 6c 2c 20 |....mov | al, |
|000039f0| 5b 53 6e 6f 77 43 68 65 | 63 6b 5d 20 20 20 20 20 |[SnowChe|ck] |
|00003a00| 20 20 20 20 3b 20 4d 6f | 76 65 20 73 6e 6f 77 20 | ; Mo|ve snow |
|00003a10| 63 68 65 63 6b 20 74 6f | 20 61 6c 0d 0a 09 09 72 |check to| al....r|
|00003a20| 63 72 20 20 20 20 20 61 | 6c 2c 20 31 20 20 20 20 |cr a|l, 1 |
|00003a30| 20 20 20 20 20 20 20 3b | 20 53 6e 6f 77 43 68 65 | ;| SnowChe|
|00003a40| 63 6b 0d 0a 09 09 6a 6e | 63 20 20 20 20 20 44 57 |ck....jn|c DW|
|00003a50| 43 5f 4e 6f 57 61 69 74 | 20 20 20 20 20 20 3b 20 |C_NoWait| ; |
|00003a60| 69 66 20 6e 6f 20 73 6e | 6f 77 63 68 65 63 6b 20 |if no sn|owcheck |
|00003a70| 67 6f 74 6f 20 46 57 5f | 4e 6f 57 61 69 74 0d 0a |goto FW_|NoWait..|
|00003a80| 09 44 57 43 5f 4e 65 78 | 74 3a 0d 0a 09 09 63 6c |.DWC_Nex|t:....cl|
|00003a90| 69 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |i | |
|00003aa0| 20 20 20 20 20 20 3b 20 | 44 69 73 61 62 6c 65 20 | ; |Disable |
|00003ab0| 69 6e 74 65 72 72 75 70 | 74 73 0d 0a 09 09 57 61 |interrup|ts....Wa|
|00003ac0| 69 74 52 65 74 72 61 63 | 65 20 20 20 20 20 20 20 |itRetrac|e |
|00003ad0| 20 20 20 20 20 20 3b 20 | 4d 61 63 72 6f 20 74 6f | ; |Macro to|
|00003ae0| 20 77 61 69 74 20 66 6f | 72 20 68 6f 72 69 7a 20 | wait fo|r horiz |
|00003af0| 72 65 74 72 61 63 65 0d | 0a 09 09 6d 6f 76 20 20 |retrace.|...mov |
|00003b00| 20 20 20 61 78 2c 20 62 | 78 20 20 20 20 20 20 20 | ax, b|x |
|00003b10| 20 20 20 3b 20 4d 6f 76 | 65 20 63 68 61 72 2f 61 | ; Mov|e char/a|
|00003b20| 74 74 72 20 69 6e 74 6f | 20 41 58 0d 0a 09 09 73 |ttr into| AX....s|
|00003b30| 74 6f 73 77 20 20 20 20 | 20 20 20 20 20 20 20 20 |tosw | |
|00003b40| 20 20 20 20 20 20 20 3b | 20 4d 6f 76 65 20 63 68 | ;| Move ch|
|00003b50| 61 72 2f 61 74 74 72 20 | 74 6f 20 73 63 72 65 65 |ar/attr |to scree|
|00003b60| 6e 0d 0a 09 09 73 74 69 | 20 20 20 20 20 20 20 20 |n....sti| |
|00003b70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 45 | | ; E|
|00003b80| 6e 61 62 6c 65 20 69 6e | 74 65 72 72 75 70 74 73 |nable in|terrupts|
|00003b90| 0d 0a 09 09 6c 6f 6f 70 | 20 20 20 20 44 57 43 5f |....loop| DWC_|
|00003ba0| 4e 65 78 74 20 20 20 20 | 20 20 20 20 3b 20 52 65 |Next | ; Re|
|00003bb0| 70 65 61 74 20 43 58 20 | 74 69 6d 65 73 0d 0a 09 |peat CX |times...|
|00003bc0| 09 6a 6d 70 20 20 20 20 | 20 44 57 43 5f 45 78 69 |.jmp | DWC_Exi|
|00003bd0| 74 20 20 20 20 20 20 20 | 20 3b 20 45 78 69 74 20 |t | ; Exit |
|00003be0| 74 68 69 73 20 72 6f 75 | 74 69 6e 65 0d 0a 09 44 |this rou|tine...D|
|00003bf0| 57 43 5f 4e 6f 57 61 69 | 74 3a 0d 0a 09 09 6d 6f |WC_NoWai|t:....mo|
|00003c00| 76 20 20 20 20 20 61 78 | 2c 20 62 78 20 20 20 20 |v ax|, bx |
|00003c10| 20 20 20 20 20 20 3b 20 | 4d 6f 76 65 20 63 68 61 | ; |Move cha|
|00003c20| 72 2f 61 74 74 72 20 69 | 6e 74 6f 20 41 58 0d 0a |r/attr i|nto AX..|
|00003c30| 09 09 72 65 70 20 20 20 | 20 20 73 74 6f 73 77 20 |..rep | stosw |
|00003c40| 20 20 20 20 20 20 20 20 | 20 20 3b 20 4d 6f 76 65 | | ; Move|
|00003c50| 20 63 68 61 72 2f 61 74 | 74 72 20 74 6f 20 73 63 | char/at|tr to sc|
|00003c60| 72 65 65 6e 20 43 58 20 | 74 69 6d 65 73 0d 0a 0d |reen CX |times...|
|00003c70| 0a 09 44 57 43 5f 45 78 | 69 74 3a 0d 0a 09 09 70 |..DWC_Ex|it:....p|
|00003c80| 6f 70 20 20 20 20 20 64 | 69 20 20 20 20 20 20 20 |op d|i |
|00003c90| 20 20 20 20 20 20 20 3b | 20 52 65 73 74 6f 72 65 | ;| Restore|
|00003ca0| 20 74 68 65 20 72 65 67 | 69 73 74 65 72 73 0d 0a | the reg|isters..|
|00003cb0| 09 09 70 6f 70 20 20 20 | 20 20 65 73 0d 0a 09 09 |..pop | es....|
|00003cc0| 70 6f 70 20 20 20 20 20 | 64 78 0d 0a 09 09 70 6f |pop |dx....po|
|00003cd0| 70 20 20 20 20 20 63 78 | 0d 0a 09 09 70 6f 70 20 |p cx|....pop |
|00003ce0| 20 20 20 20 61 78 0d 0a | 09 09 72 65 74 0d 0a 0d | ax..|..ret...|
|00003cf0| 0a 09 45 4e 44 50 20 20 | 20 20 44 57 72 69 74 65 |..ENDP | DWrite|
|00003d00| 43 48 0d 0a 0d 0a 09 47 | 4c 4f 42 41 4c 20 20 44 |CH.....G|LOBAL D|
|00003d10| 57 72 69 74 65 43 48 4e | 41 3a 50 52 4f 43 0d 0a |WriteCHN|A:PROC..|
|00003d20| 09 50 52 4f 43 20 20 20 | 20 44 57 72 69 74 65 43 |.PROC | DWriteC|
|00003d30| 48 4e 41 0d 0a 09 3b 0d | 0a 09 3b 20 57 72 69 74 |HNA...;.|..; Writ|
|00003d40| 65 73 20 61 20 63 68 61 | 72 61 63 74 65 72 20 74 |es a cha|racter t|
|00003d50| 6f 20 74 68 65 20 73 63 | 72 65 65 6e 20 75 73 69 |o the sc|reen usi|
|00003d60| 6e 67 20 64 69 72 65 63 | 74 20 6d 65 6d 6f 72 79 |ng direc|t memory|
|00003d70| 20 61 63 63 65 73 73 2e | 0d 0a 09 3b 20 54 68 69 | access.|...; Thi|
|00003d80| 73 20 70 72 6f 63 65 64 | 75 72 65 20 64 6f 65 73 |s proced|ure does|
|00003d90| 20 6e 6f 74 20 64 69 73 | 74 75 72 62 20 63 75 72 | not dis|turb cur|
|00003da0| 72 65 6e 74 20 61 74 74 | 72 20 73 65 74 74 69 6e |rent att|r settin|
|00003db0| 67 2e 0d 0a 09 3b 0d 0a | 09 3b 20 2a 2a 2a 20 49 |g....;..|.; *** I|
|00003dc0| 4d 50 4f 52 54 41 4e 54 | 20 2d 2d 20 43 41 4c 4c |MPORTANT| -- CALL|
|00003dd0| 20 47 65 74 56 69 64 65 | 6f 4d 6f 64 65 20 42 65 | GetVide|oMode Be|
|00003de0| 66 6f 72 65 20 75 73 69 | 6e 67 20 74 68 69 73 20 |fore usi|ng this |
|00003df0| 72 6f 75 74 69 6e 65 21 | 0d 0a 09 3b 0d 0a 09 3b |routine!|...;...;|
|00003e00| 20 49 6e 70 75 74 0d 0a | 09 3b 20 20 20 20 20 20 | Input..|.; |
|00003e10| 20 41 48 20 20 20 20 20 | 20 52 6f 77 20 6f 6e 20 | AH | Row on |
|00003e20| 73 63 72 65 65 6e 20 31 | 2d 32 35 0d 0a 09 3b 20 |screen 1|-25...; |
|00003e30| 20 20 20 20 20 20 41 4c | 20 20 20 20 20 20 43 6f | AL| Co|
|00003e40| 6c 75 6d 6e 20 6f 6e 20 | 73 63 72 65 65 6e 20 31 |lumn on |screen 1|
|00003e50| 2d 38 30 0d 0a 09 3b 20 | 20 20 20 20 20 20 42 4c |-80...; | BL|
|00003e60| 20 20 20 20 20 20 43 68 | 61 72 61 63 74 65 72 0d | Ch|aracter.|
|00003e70| 0a 09 3b 20 20 20 20 20 | 20 20 43 58 20 20 20 20 |..; | CX |
|00003e80| 20 20 4e 75 6d 62 65 72 | 20 6f 66 20 74 69 6d 65 | Number| of time|
|00003e90| 73 0d 0a 09 3b 20 4f 75 | 74 70 75 74 0d 0a 09 3b |s...; Ou|tput...;|
|00003ea0| 20 20 20 20 20 20 20 53 | 63 72 65 65 6e 20 6d 65 | S|creen me|
|00003eb0| 6d 6f 72 79 20 28 42 30 | 30 30 3a 30 30 30 30 20 |mory (B0|00:0000 |
|00003ec0| 6f 72 20 38 30 30 30 20 | 43 47 41 2f 4d 4f 4e 4f |or 8000 |CGA/MONO|
|00003ed0| 0d 0a 09 3b 0d 0a 0d 0a | 09 09 70 75 73 68 20 20 |...;....|..push |
|00003ee0| 20 20 61 78 20 20 20 20 | 20 20 20 20 20 20 20 20 | ax | |
|00003ef0| 20 20 3b 20 53 74 6f 72 | 65 20 74 68 65 20 72 65 | ; Stor|e the re|
|00003f00| 67 69 73 74 65 72 73 0d | 0a 09 09 70 75 73 68 20 |gisters.|...push |
|00003f10| 20 20 20 63 78 0d 0a 09 | 09 70 75 73 68 20 20 20 | cx...|.push |
|00003f20| 20 64 78 0d 0a 09 09 70 | 75 73 68 20 20 20 20 65 | dx....p|ush e|
|00003f30| 73 0d 0a 09 09 70 75 73 | 68 20 20 20 20 64 69 0d |s....pus|h di.|
|00003f40| 0a 09 09 63 61 6c 6c 20 | 20 20 20 4d 6f 76 65 58 |...call | MoveX|
|00003f50| 59 5f 44 49 20 20 20 20 | 20 20 20 3b 20 53 65 74 |Y_DI | ; Set|
|00003f60| 20 44 49 20 74 6f 20 72 | 6f 77 20 2f 20 63 6f 6c | DI to r|ow / col|
|00003f70| 75 6d 6e 20 6f 66 66 73 | 65 74 0d 0a 09 09 6d 6f |umn offs|et....mo|
|00003f80| 76 20 20 20 20 20 65 73 | 2c 20 5b 42 61 73 65 4f |v es|, [BaseO|
|00003f90| 66 53 63 72 65 65 6e 5d | 20 20 20 20 20 20 3b 20 |fScreen]| ; |
|00003fa0| 4d 6f 76 65 20 73 63 72 | 65 65 6e 20 73 65 67 20 |Move scr|een seg |
|00003fb0| 74 6f 20 45 53 0d 0a 09 | 09 6d 6f 76 20 20 20 20 |to ES...|.mov |
|00003fc0| 20 61 6c 2c 20 5b 53 6e | 6f 77 43 68 65 63 6b 5d | al, [Sn|owCheck]|
|00003fd0| 20 20 20 20 20 20 20 20 | 20 3b 20 4d 6f 76 65 20 | | ; Move |
|00003fe0| 73 6e 6f 77 20 63 68 65 | 63 6b 20 74 6f 20 61 6c |snow che|ck to al|
|00003ff0| 0d 0a 09 09 72 63 72 20 | 20 20 20 20 61 6c 2c 20 |....rcr | al, |
|00004000| 31 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 53 6e |1 | ; Sn|
|00004010| 6f 77 43 68 65 63 6b 0d | 0a 09 09 6a 6e 63 20 20 |owCheck.|...jnc |
|00004020| 20 20 20 44 57 43 4e 5f | 4e 6f 57 61 69 74 20 20 | DWCN_|NoWait |
|00004030| 20 20 20 3b 20 69 66 20 | 6e 6f 20 73 6e 6f 77 63 | ; if |no snowc|
|00004040| 68 65 63 6b 20 67 6f 74 | 6f 20 46 57 5f 4e 6f 57 |heck got|o FW_NoW|
|00004050| 61 69 74 0d 0a 09 44 57 | 43 4e 5f 4e 65 78 74 3a |ait...DW|CN_Next:|
|00004060| 0d 0a 09 09 63 6c 69 20 | 20 20 20 20 20 20 20 20 |....cli | |
|00004070| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 44 69 | | ; Di|
|00004080| 73 61 62 6c 65 20 69 6e | 74 65 72 72 75 70 74 73 |sable in|terrupts|
|00004090| 0d 0a 09 09 57 61 69 74 | 52 65 74 72 61 63 65 20 |....Wait|Retrace |
|000040a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 4d 61 | | ; Ma|
|000040b0| 63 72 6f 20 74 6f 20 77 | 61 69 74 20 66 6f 72 20 |cro to w|ait for |
|000040c0| 68 6f 72 69 7a 20 72 65 | 74 72 61 63 65 0d 0a 09 |horiz re|trace...|
|000040d0| 09 6d 6f 76 20 20 20 20 | 20 61 6c 2c 20 62 6c 20 |.mov | al, bl |
|000040e0| 20 20 20 20 20 20 20 20 | 20 3b 20 4d 6f 76 65 20 | | ; Move |
|000040f0| 63 68 61 72 20 69 6e 74 | 6f 20 61 6c 0d 0a 09 09 |char int|o al....|
|00004100| 73 74 6f 73 62 20 20 20 | 20 20 20 20 20 20 20 20 |stosb | |
|00004110| 20 20 20 20 20 20 20 20 | 3b 20 4d 6f 76 65 20 63 | |; Move c|
|00004120| 68 61 72 20 74 6f 20 73 | 63 72 65 65 6e 0d 0a 09 |har to s|creen...|
|00004130| 09 73 74 69 20 20 20 20 | 20 20 20 20 20 20 20 20 |.sti | |
|00004140| 20 20 20 20 20 20 20 20 | 20 3b 20 45 6e 61 62 6c | | ; Enabl|
|00004150| 65 20 69 6e 74 65 72 72 | 75 70 74 73 0d 0a 09 09 |e interr|upts....|
|00004160| 69 6e 63 20 20 20 20 20 | 64 69 20 20 20 20 20 20 |inc |di |
|00004170| 20 20 20 20 20 20 20 20 | 3b 20 53 6b 69 70 20 6f | |; Skip o|
|00004180| 76 65 72 20 61 74 74 72 | 0d 0a 09 09 6c 6f 6f 70 |ver attr|....loop|
|00004190| 20 20 20 20 44 57 43 4e | 5f 4e 65 78 74 20 20 20 | DWCN|_Next |
|000041a0| 20 20 20 20 3b 20 52 65 | 70 65 61 74 20 43 58 20 | ; Re|peat CX |
|000041b0| 74 69 6d 65 73 0d 0a 09 | 09 6a 6d 70 20 20 20 20 |times...|.jmp |
|000041c0| 20 44 57 43 4e 5f 45 78 | 69 74 20 20 20 20 20 20 | DWCN_Ex|it |
|000041d0| 20 3b 20 45 78 69 74 20 | 74 68 69 73 20 72 6f 75 | ; Exit |this rou|
|000041e0| 74 69 6e 65 0d 0a 09 44 | 57 43 4e 5f 4e 6f 57 61 |tine...D|WCN_NoWa|
|000041f0| 69 74 3a 0d 0a 09 09 6d | 6f 76 20 20 20 20 20 61 |it:....m|ov a|
|00004200| 6c 2c 20 62 6c 20 20 20 | 20 20 20 20 20 20 20 3b |l, bl | ;|
|00004210| 20 4d 6f 76 65 20 63 68 | 61 72 20 69 6e 74 6f 20 | Move ch|ar into |
|00004220| 41 58 0d 0a 09 44 57 43 | 4e 5f 4e 6f 57 61 69 74 |AX...DWC|N_NoWait|
|00004230| 4c 6f 6f 70 3a 0d 0a 09 | 09 73 74 6f 73 62 20 20 |Loop:...|.stosb |
|00004240| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004250| 20 3b 20 4d 6f 76 65 20 | 63 68 61 72 20 74 6f 20 | ; Move |char to |
|00004260| 73 63 72 65 65 6e 0d 0a | 09 09 69 6e 63 20 20 20 |screen..|..inc |
|00004270| 20 20 64 69 20 20 20 20 | 20 20 20 20 20 20 20 20 | di | |
|00004280| 20 20 3b 20 53 6b 69 70 | 20 6f 76 65 72 20 61 74 | ; Skip| over at|
|00004290| 74 72 0d 0a 09 09 6c 6f | 6f 70 20 20 20 20 44 57 |tr....lo|op DW|
|000042a0| 43 4e 5f 4e 6f 57 61 69 | 74 4c 6f 6f 70 20 3b 20 |CN_NoWai|tLoop ; |
|000042b0| 52 65 70 65 61 74 20 43 | 58 20 74 69 6d 65 73 0d |Repeat C|X times.|
|000042c0| 0a 0d 0a 09 44 57 43 4e | 5f 45 78 69 74 3a 0d 0a |....DWCN|_Exit:..|
|000042d0| 09 09 70 6f 70 20 20 20 | 20 20 64 69 20 20 20 20 |..pop | di |
|000042e0| 20 20 20 20 20 20 20 20 | 20 20 3b 20 52 65 73 74 | | ; Rest|
|000042f0| 6f 72 65 20 74 68 65 20 | 72 65 67 69 73 74 65 72 |ore the |register|
|00004300| 73 0d 0a 09 09 70 6f 70 | 20 20 20 20 20 65 73 0d |s....pop| es.|
|00004310| 0a 09 09 70 6f 70 20 20 | 20 20 20 64 78 0d 0a 09 |...pop | dx...|
|00004320| 09 70 6f 70 20 20 20 20 | 20 63 78 0d 0a 09 09 70 |.pop | cx....p|
|00004330| 6f 70 20 20 20 20 20 61 | 78 0d 0a 09 09 72 65 74 |op a|x....ret|
|00004340| 0d 0a 0d 0a 09 45 4e 44 | 50 20 20 20 20 44 57 72 |.....END|P DWr|
|00004350| 69 74 65 43 48 4e 41 0d | 0a 0d 0a 09 47 4c 4f 42 |iteCHNA.|....GLOB|
|00004360| 41 4c 20 20 44 57 72 69 | 74 65 53 74 72 3a 50 52 |AL DWri|teStr:PR|
|00004370| 4f 43 0d 0a 09 50 52 4f | 43 20 20 20 20 44 57 72 |OC...PRO|C DWr|
|00004380| 69 74 65 53 74 72 0d 0a | 09 3b 0d 0a 09 3b 20 54 |iteStr..|.;...; T|
|00004390| 68 69 73 20 70 72 6f 63 | 65 64 75 72 65 20 77 72 |his proc|edure wr|
|000043a0| 69 74 65 73 20 61 20 6e | 75 6c 6c 20 64 65 6c 69 |ites a n|ull deli|
|000043b0| 6d 69 74 65 64 20 73 74 | 72 69 6e 67 20 74 6f 20 |mited st|ring to |
|000043c0| 74 68 65 20 73 63 72 65 | 65 6e 20 75 73 69 6e 67 |the scre|en using|
|000043d0| 0d 0a 09 3b 20 64 69 72 | 65 63 74 20 6d 65 6d 6f |...; dir|ect memo|
|000043e0| 72 79 20 61 63 63 65 73 | 73 2e 0d 0a 09 3b 0d 0a |ry acces|s....;..|
|000043f0| 09 3b 20 2a 2a 2a 20 49 | 4d 50 4f 52 54 41 4e 54 |.; *** I|MPORTANT|
|00004400| 20 2d 2d 20 43 41 4c 4c | 20 47 65 74 56 69 64 65 | -- CALL| GetVide|
|00004410| 6f 4d 6f 64 65 20 42 65 | 66 6f 72 65 20 75 73 69 |oMode Be|fore usi|
|00004420| 6e 67 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 21 |ng this |routine!|
|00004430| 0d 0a 09 3b 0d 0a 09 3b | 20 49 6e 70 75 74 0d 0a |...;...;| Input..|
|00004440| 09 3b 20 20 20 20 20 20 | 20 44 53 3a 53 49 20 20 |.; | DS:SI |
|00004450| 20 4e 75 6c 6c 20 74 65 | 72 6d 69 6e 61 74 65 64 | Null te|rminated|
|00004460| 20 73 74 72 69 6e 67 20 | 74 6f 20 70 72 69 6e 74 | string |to print|
|00004470| 0d 0a 09 3b 20 20 20 20 | 20 20 20 41 48 20 20 20 |...; | AH |
|00004480| 20 20 20 52 6f 77 20 6f | 6e 20 73 63 72 65 65 6e | Row o|n screen|
|00004490| 20 31 2d 32 35 0d 0a 09 | 3b 20 20 20 20 20 20 20 | 1-25...|; |
|000044a0| 41 4c 20 20 20 20 20 20 | 43 6f 6c 75 6d 6e 20 6f |AL |Column o|
|000044b0| 6e 20 73 63 72 65 65 6e | 20 31 2d 38 30 0d 0a 09 |n screen| 1-80...|
|000044c0| 3b 20 20 20 20 20 20 20 | 42 48 20 20 20 20 20 20 |; |BH |
|000044d0| 56 69 64 65 6f 20 41 74 | 74 72 69 62 75 74 65 0d |Video At|tribute.|
|000044e0| 0a 09 3b 20 4f 75 74 70 | 75 74 0d 0a 09 3b 20 20 |..; Outp|ut...; |
|000044f0| 20 20 20 20 20 53 63 72 | 65 65 6e 20 6d 65 6d 6f | Scr|een memo|
|00004500| 72 79 20 28 42 30 30 30 | 3a 30 30 30 30 20 6f 72 |ry (B000|:0000 or|
|00004510| 20 38 30 30 30 20 43 47 | 41 2f 4d 4f 4e 4f 0d 0a | 8000 CG|A/MONO..|
|00004520| 09 3b 20 4d 6f 64 69 66 | 69 65 73 0d 0a 09 3b 20 |.; Modif|ies...; |
|00004530| 20 20 20 20 20 20 53 49 | 20 2d 20 50 6f 69 6e 74 | SI| - Point|
|00004540| 73 20 31 20 62 79 74 65 | 20 62 65 79 6f 6e 64 20 |s 1 byte| beyond |
|00004550| 6e 75 6c 6c 20 6f 66 20 | 73 74 72 20 64 69 73 70 |null of |str disp|
|00004560| 6c 61 79 65 64 0d 0a 09 | 3b 0d 0a 09 09 70 75 73 |layed...|;....pus|
|00004570| 68 20 20 20 20 61 78 20 | 20 20 20 20 20 20 20 20 |h ax | |
|00004580| 20 20 20 20 20 3b 20 53 | 74 6f 72 65 20 74 68 65 | ; S|tore the|
|00004590| 20 72 65 67 69 73 74 65 | 72 73 0d 0a 09 09 70 75 | registe|rs....pu|
|000045a0| 73 68 20 20 20 20 62 78 | 0d 0a 09 09 70 75 73 68 |sh bx|....push|
|000045b0| 20 20 20 20 63 78 0d 0a | 09 09 70 75 73 68 20 20 | cx..|..push |
|000045c0| 20 20 64 78 0d 0a 09 09 | 70 75 73 68 20 20 20 20 | dx....|push |
|000045d0| 65 73 0d 0a 09 09 70 75 | 73 68 20 20 20 20 64 69 |es....pu|sh di|
|000045e0| 0d 0a 0d 0a 09 09 63 61 | 6c 6c 20 20 20 20 4d 6f |......ca|ll Mo|
|000045f0| 76 65 58 59 5f 44 49 20 | 20 20 20 20 20 20 3b 20 |veXY_DI | ; |
|00004600| 53 65 74 20 44 49 20 74 | 6f 20 72 6f 77 20 2f 20 |Set DI t|o row / |
|00004610| 63 6f 6c 75 6d 6e 20 6f | 66 66 73 65 74 0d 0a 09 |column o|ffset...|
|00004620| 09 6d 6f 76 20 20 20 20 | 20 65 73 2c 20 5b 42 61 |.mov | es, [Ba|
|00004630| 73 65 4f 66 53 63 72 65 | 65 6e 5d 20 20 20 20 20 |seOfScre|en] |
|00004640| 20 3b 20 4d 6f 76 65 20 | 73 63 72 65 65 6e 20 73 | ; Move |screen s|
|00004650| 65 67 20 74 6f 20 45 53 | 0d 0a 09 09 6d 6f 76 20 |eg to ES|....mov |
|00004660| 20 20 20 20 63 6c 2c 20 | 5b 53 6e 6f 77 43 68 65 | cl, |[SnowChe|
|00004670| 63 6b 5d 20 20 20 20 20 | 20 20 20 20 3b 20 4d 6f |ck] | ; Mo|
|00004680| 76 65 20 73 6e 6f 77 20 | 63 68 65 63 6b 20 74 6f |ve snow |check to|
|00004690| 20 61 6c 0d 0a 09 09 63 | 6c 64 20 20 20 20 20 20 | al....c|ld |
|000046a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;|
|000046b0| 20 43 6c 65 61 72 20 74 | 68 65 20 64 69 72 65 63 | Clear t|he direc|
|000046c0| 74 69 6f 6e 20 66 6c 61 | 67 0d 0a 09 09 72 63 72 |tion fla|g....rcr|
|000046d0| 20 20 20 20 20 63 6c 2c | 20 31 20 20 20 20 20 20 | cl,| 1 |
|000046e0| 20 20 20 20 20 3b 20 53 | 6e 6f 77 43 68 65 63 6b | ; S|nowCheck|
|000046f0| 0d 0a 09 09 6d 6f 76 20 | 20 20 20 20 61 68 2c 20 |....mov | ah, |
|00004700| 62 68 20 20 20 20 20 20 | 20 20 20 20 3b 20 50 6c |bh | ; Pl|
|00004710| 61 63 65 20 76 69 64 65 | 6f 20 61 74 74 72 20 69 |ace vide|o attr i|
|00004720| 6e 20 41 48 0d 0a 09 09 | 6a 6e 63 20 20 20 20 20 |n AH....|jnc |
|00004730| 44 57 53 5f 4e 6f 57 61 | 69 74 20 20 20 20 20 20 |DWS_NoWa|it |
|00004740| 3b 20 69 66 20 6e 6f 20 | 73 6e 6f 77 63 68 65 63 |; if no |snowchec|
|00004750| 6b 20 67 6f 74 6f 20 44 | 57 53 5f 4e 6f 57 61 69 |k goto D|WS_NoWai|
|00004760| 74 0d 0a 09 44 57 53 5f | 4e 65 78 74 3a 0d 0a 09 |t...DWS_|Next:...|
|00004770| 09 6c 6f 64 73 62 20 20 | 20 20 20 20 20 20 20 20 |.lodsb | |
|00004780| 20 20 20 20 20 20 20 20 | 20 3b 20 47 65 74 20 61 | | ; Get a|
|00004790| 20 63 68 61 72 61 63 74 | 65 72 20 66 72 6f 6d 20 | charact|er from |
|000047a0| 73 6f 75 72 63 65 0d 0a | 09 09 6f 72 20 20 20 20 |source..|..or |
|000047b0| 20 20 61 6c 2c 20 61 6c | 20 20 20 20 20 20 20 20 | al, al| |
|000047c0| 20 20 3b 20 43 68 65 63 | 6b 20 66 6f 72 20 4e 55 | ; Chec|k for NU|
|000047d0| 4c 4c 0d 0a 09 09 6a 7a | 20 20 20 20 20 20 44 57 |LL....jz| DW|
|000047e0| 53 5f 45 78 69 74 20 20 | 20 20 20 20 20 20 3b 20 |S_Exit | ; |
|000047f0| 49 66 20 4e 55 4c 4c 20 | 74 68 65 6e 20 65 78 69 |If NULL |then exi|
|00004800| 74 0d 0a 09 09 6d 6f 76 | 20 20 20 20 20 62 78 2c |t....mov| bx,|
|00004810| 20 61 78 20 20 20 20 20 | 20 20 20 20 20 3b 20 53 | ax | ; S|
|00004820| 74 6f 72 65 20 76 69 64 | 65 6f 20 77 6f 72 64 20 |tore vid|eo word |
|00004830| 69 6e 74 6f 20 42 58 0d | 0a 09 09 63 6c 69 20 20 |into BX.|...cli |
|00004840| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004850| 20 20 20 3b 20 44 69 73 | 61 62 6c 65 20 69 6e 74 | ; Dis|able int|
|00004860| 65 72 72 75 70 74 73 0d | 0a 09 09 57 61 69 74 52 |errupts.|...WaitR|
|00004870| 65 74 72 61 63 65 20 20 | 20 20 20 20 20 20 20 20 |etrace | |
|00004880| 20 20 20 3b 20 4d 61 63 | 72 6f 20 74 6f 20 77 61 | ; Mac|ro to wa|
|00004890| 69 74 20 66 6f 72 20 68 | 6f 72 69 7a 20 72 65 74 |it for h|oriz ret|
|000048a0| 72 61 63 65 0d 0a 09 09 | 6d 6f 76 20 20 20 20 20 |race....|mov |
|000048b0| 61 78 2c 20 62 78 20 20 | 20 20 20 20 20 20 20 20 |ax, bx | |
|000048c0| 3b 20 4d 6f 76 65 20 77 | 6f 72 64 20 62 61 63 6b |; Move w|ord back|
|000048d0| 20 74 6f 20 41 58 2e 2e | 2e 0d 0a 09 09 73 74 6f | to AX..|.....sto|
|000048e0| 73 77 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |sw | |
|000048f0| 20 20 20 20 20 3b 20 4d | 6f 76 65 20 77 6f 72 64 | ; M|ove word|
|00004900| 20 74 6f 20 73 63 72 65 | 65 6e 0d 0a 09 09 73 74 | to scre|en....st|
|00004910| 69 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |i | |
|00004920| 20 20 20 20 20 20 3b 20 | 45 6e 61 62 6c 65 20 69 | ; |Enable i|
|00004930| 6e 74 65 72 72 75 70 74 | 73 0d 0a 09 09 6a 6d 70 |nterrupt|s....jmp|
|00004940| 20 20 20 20 20 44 57 53 | 5f 4e 65 78 74 20 20 20 | DWS|_Next |
|00004950| 20 20 20 20 20 3b 20 43 | 6f 6e 74 69 6e 75 65 0d | ; C|ontinue.|
|00004960| 0a 09 44 57 53 5f 4e 6f | 57 61 69 74 3a 0d 0a 09 |..DWS_No|Wait:...|
|00004970| 09 6c 6f 64 73 62 20 20 | 20 20 20 20 20 20 20 20 |.lodsb | |
|00004980| 20 20 20 20 20 20 20 20 | 20 3b 20 47 65 74 20 61 | | ; Get a|
|00004990| 20 63 68 61 72 61 63 74 | 65 72 20 66 72 6f 6d 20 | charact|er from |
|000049a0| 73 74 72 69 6e 67 0d 0a | 09 09 6f 72 20 20 20 20 |string..|..or |
|000049b0| 20 20 61 6c 2c 20 61 6c | 20 20 20 20 20 20 20 20 | al, al| |
|000049c0| 20 20 3b 20 43 68 65 63 | 6b 20 66 6f 72 20 4e 55 | ; Chec|k for NU|
|000049d0| 4c 4c 0d 0a 09 09 6a 7a | 20 20 20 20 20 20 44 57 |LL....jz| DW|
|000049e0| 53 5f 45 78 69 74 20 20 | 20 20 20 20 20 20 3b 20 |S_Exit | ; |
|000049f0| 49 66 20 4e 55 4c 4c 20 | 74 68 65 6e 20 65 78 69 |If NULL |then exi|
|00004a00| 74 0d 0a 09 09 73 74 6f | 73 77 20 20 20 20 20 20 |t....sto|sw |
|00004a10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 4d | | ; M|
|00004a20| 6f 76 65 20 77 6f 72 64 | 20 74 6f 20 73 63 72 65 |ove word| to scre|
|00004a30| 65 6e 0d 0a 09 09 6c 6f | 6f 70 20 20 20 20 44 57 |en....lo|op DW|
|00004a40| 53 5f 4e 6f 57 61 69 74 | 20 20 20 20 20 20 3b 20 |S_NoWait| ; |
|00004a50| 43 6f 6e 74 69 6e 75 65 | 0d 0a 09 44 57 53 5f 45 |Continue|...DWS_E|
|00004a60| 78 69 74 3a 0d 0a 09 09 | 70 6f 70 20 20 20 20 20 |xit:....|pop |
|00004a70| 64 69 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |di | |
|00004a80| 3b 20 52 65 73 74 6f 72 | 65 20 74 68 65 20 72 65 |; Restor|e the re|
|00004a90| 67 69 73 74 65 72 73 0d | 0a 09 09 70 6f 70 20 20 |gisters.|...pop |
|00004aa0| 20 20 20 65 73 0d 0a 09 | 09 70 6f 70 20 20 20 20 | es...|.pop |
|00004ab0| 20 64 78 0d 0a 09 09 70 | 6f 70 20 20 20 20 20 63 | dx....p|op c|
|00004ac0| 78 0d 0a 09 09 70 6f 70 | 20 20 20 20 20 62 78 0d |x....pop| bx.|
|00004ad0| 0a 09 09 70 6f 70 20 20 | 20 20 20 61 78 0d 0a 09 |...pop | ax...|
|00004ae0| 09 72 65 74 0d 0a 0d 0a | 09 45 4e 44 50 20 20 20 |.ret....|.ENDP |
|00004af0| 20 44 57 72 69 74 65 53 | 74 72 0d 0a 0d 0a 09 47 | DWriteS|tr.....G|
|00004b00| 4c 4f 42 41 4c 20 20 44 | 57 72 69 74 65 53 74 72 |LOBAL D|WriteStr|
|00004b10| 4e 41 3a 50 52 4f 43 0d | 0a 09 50 52 4f 43 20 20 |NA:PROC.|..PROC |
|00004b20| 20 20 44 57 72 69 74 65 | 53 74 72 4e 41 0d 0a 09 | DWrite|StrNA...|
|00004b30| 3b 0d 0a 09 3b 20 54 68 | 69 73 20 70 72 6f 63 65 |;...; Th|is proce|
|00004b40| 64 75 72 65 20 77 72 69 | 74 65 73 20 61 20 6e 75 |dure wri|tes a nu|
|00004b50| 6c 6c 20 64 65 6c 69 6d | 69 74 65 64 20 73 74 72 |ll delim|ited str|
|00004b60| 69 6e 67 20 74 6f 20 74 | 68 65 20 73 63 72 65 65 |ing to t|he scree|
|00004b70| 6e 20 75 73 69 6e 67 0d | 0a 09 3b 20 64 69 72 65 |n using.|..; dire|
|00004b80| 63 74 20 6d 65 6d 6f 72 | 79 20 61 63 63 65 73 73 |ct memor|y access|
|00004b90| 2c 20 61 74 74 72 69 62 | 75 74 65 20 69 73 20 6e |, attrib|ute is n|
|00004ba0| 6f 74 20 63 68 61 6e 67 | 65 64 2e 0d 0a 09 3b 0d |ot chang|ed....;.|
|00004bb0| 0a 09 3b 20 2a 2a 2a 20 | 49 4d 50 4f 52 54 41 4e |..; *** |IMPORTAN|
|00004bc0| 54 20 2d 2d 20 43 41 4c | 4c 20 47 65 74 56 69 64 |T -- CAL|L GetVid|
|00004bd0| 65 6f 4d 6f 64 65 20 42 | 65 66 6f 72 65 20 75 73 |eoMode B|efore us|
|00004be0| 69 6e 67 20 74 68 69 73 | 20 72 6f 75 74 69 6e 65 |ing this| routine|
|00004bf0| 21 0d 0a 09 3b 0d 0a 09 | 3b 20 49 6e 70 75 74 0d |!...;...|; Input.|
|00004c00| 0a 09 3b 20 20 20 20 20 | 20 20 44 53 3a 53 49 20 |..; | DS:SI |
|00004c10| 20 20 4e 75 6c 6c 20 74 | 65 72 6d 69 6e 61 74 65 | Null t|erminate|
|00004c20| 64 20 73 74 72 69 6e 67 | 20 74 6f 20 70 72 69 6e |d string| to prin|
|00004c30| 74 0d 0a 09 3b 20 20 20 | 20 20 20 20 41 48 20 20 |t...; | AH |
|00004c40| 20 20 20 20 52 6f 77 20 | 6f 6e 20 73 63 72 65 65 | Row |on scree|
|00004c50| 6e 20 31 2d 32 35 0d 0a | 09 3b 20 20 20 20 20 20 |n 1-25..|.; |
|00004c60| 20 41 4c 20 20 20 20 20 | 20 43 6f 6c 75 6d 6e 20 | AL | Column |
|00004c70| 6f 6e 20 73 63 72 65 65 | 6e 20 31 2d 38 30 0d 0a |on scree|n 1-80..|
|00004c80| 09 3b 20 4f 75 74 70 75 | 74 0d 0a 09 3b 20 20 20 |.; Outpu|t...; |
|00004c90| 20 20 20 20 53 63 72 65 | 65 6e 20 6d 65 6d 6f 72 | Scre|en memor|
|00004ca0| 79 20 28 42 30 30 30 3a | 30 30 30 30 20 6f 72 20 |y (B000:|0000 or |
|00004cb0| 38 30 30 30 20 43 47 41 | 2f 4d 4f 4e 4f 29 0d 0a |8000 CGA|/MONO)..|
|00004cc0| 09 3b 20 4d 6f 64 69 66 | 69 65 73 0d 0a 09 3b 20 |.; Modif|ies...; |
|00004cd0| 20 20 20 20 20 20 53 49 | 20 2d 20 50 6f 69 6e 74 | SI| - Point|
|00004ce0| 73 20 31 20 62 79 74 65 | 20 62 65 79 6f 6e 64 20 |s 1 byte| beyond |
|00004cf0| 6e 75 6c 6c 20 6f 66 20 | 73 74 72 20 64 69 73 70 |null of |str disp|
|00004d00| 6c 61 79 65 64 0d 0a 09 | 3b 0d 0a 09 09 70 75 73 |layed...|;....pus|
|00004d10| 68 20 20 20 20 61 78 20 | 20 20 20 20 20 20 20 20 |h ax | |
|00004d20| 20 20 20 20 20 3b 20 53 | 74 6f 72 65 20 74 68 65 | ; S|tore the|
|00004d30| 20 72 65 67 69 73 74 65 | 72 73 0d 0a 09 09 70 75 | registe|rs....pu|
|00004d40| 73 68 20 20 20 20 62 78 | 0d 0a 09 09 70 75 73 68 |sh bx|....push|
|00004d50| 20 20 20 20 63 78 0d 0a | 09 09 70 75 73 68 20 20 | cx..|..push |
|00004d60| 20 20 64 78 0d 0a 09 09 | 70 75 73 68 20 20 20 20 | dx....|push |
|00004d70| 65 73 0d 0a 09 09 70 75 | 73 68 20 20 20 20 64 69 |es....pu|sh di|
|00004d80| 0d 0a 0d 0a 09 09 63 61 | 6c 6c 20 20 20 20 4d 6f |......ca|ll Mo|
|00004d90| 76 65 58 59 5f 44 49 20 | 20 20 20 20 20 20 3b 20 |veXY_DI | ; |
|00004da0| 53 65 74 20 44 49 20 74 | 6f 20 73 63 72 65 65 6e |Set DI t|o screen|
|00004db0| 20 6f 66 66 73 65 74 20 | 70 6f 73 0d 0a 09 09 6d | offset |pos....m|
|00004dc0| 6f 76 20 20 20 20 20 65 | 73 2c 20 5b 42 61 73 65 |ov e|s, [Base|
|00004dd0| 4f 66 53 63 72 65 65 6e | 5d 20 20 20 20 20 20 3b |OfScreen|] ;|
|00004de0| 20 4d 6f 76 65 20 73 63 | 72 65 65 6e 20 73 65 67 | Move sc|reen seg|
|00004df0| 20 74 6f 20 45 53 0d 0a | 09 09 6d 6f 76 20 20 20 | to ES..|..mov |
|00004e00| 20 20 63 6c 2c 20 5b 53 | 6e 6f 77 43 68 65 63 6b | cl, [S|nowCheck|
|00004e10| 5d 20 20 20 20 20 20 20 | 20 20 3b 20 4d 6f 76 65 |] | ; Move|
|00004e20| 20 73 6e 6f 77 20 63 68 | 65 63 6b 20 74 6f 20 63 | snow ch|eck to c|
|00004e30| 6c 0d 0a 09 09 63 6c 64 | 20 20 20 20 20 20 20 20 |l....cld| |
|00004e40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 43 | | ; C|
|00004e50| 6c 65 61 72 20 74 68 65 | 20 64 69 72 65 63 74 69 |lear the| directi|
|00004e60| 6f 6e 20 66 6c 61 67 0d | 0a 09 09 72 63 72 20 20 |on flag.|...rcr |
|00004e70| 20 20 20 63 6c 2c 20 31 | 20 20 20 20 20 20 20 20 | cl, 1| |
|00004e80| 20 20 20 3b 20 53 6e 6f | 77 43 68 65 63 6b 0d 0a | ; Sno|wCheck..|
|00004e90| 09 09 6a 6e 63 20 20 20 | 20 20 44 57 53 4e 5f 4e |..jnc | DWSN_N|
|00004ea0| 6f 57 61 69 74 20 20 20 | 20 20 3b 20 69 66 20 6e |oWait | ; if n|
|00004eb0| 6f 20 73 6e 6f 77 63 68 | 65 63 6b 20 67 6f 74 6f |o snowch|eck goto|
|00004ec0| 20 44 57 53 4e 5f 4e 6f | 57 61 69 74 0d 0a 09 44 | DWSN_No|Wait...D|
|00004ed0| 57 53 4e 5f 4e 65 78 74 | 3a 0d 0a 09 09 6c 6f 64 |WSN_Next|:....lod|
|00004ee0| 73 62 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |sb | |
|00004ef0| 20 20 20 20 20 3b 20 47 | 65 74 20 61 20 63 68 61 | ; G|et a cha|
|00004f00| 72 61 63 74 65 72 20 66 | 72 6f 6d 20 73 6f 75 72 |racter f|rom sour|
|00004f10| 63 65 0d 0a 09 09 6f 72 | 20 20 20 20 20 20 61 6c |ce....or| al|
|00004f20| 2c 20 61 6c 20 20 20 20 | 20 20 20 20 20 20 3b 20 |, al | ; |
|00004f30| 43 68 65 63 6b 20 66 6f | 72 20 4e 55 4c 4c 0d 0a |Check fo|r NULL..|
|00004f40| 09 09 6a 7a 20 20 20 20 | 20 20 44 57 53 4e 5f 45 |..jz | DWSN_E|
|00004f50| 78 69 74 20 20 20 20 20 | 20 20 3b 20 49 66 20 4e |xit | ; If N|
|00004f60| 55 4c 4c 20 74 68 65 6e | 20 65 78 69 74 0d 0a 09 |ULL then| exit...|
|00004f70| 09 6d 6f 76 20 20 20 20 | 20 62 78 2c 20 61 78 20 |.mov | bx, ax |
|00004f80| 20 20 20 20 20 20 20 20 | 20 3b 20 53 74 6f 72 65 | | ; Store|
|00004f90| 20 76 69 64 65 6f 20 77 | 6f 72 64 20 69 6e 74 6f | video w|ord into|
|00004fa0| 20 42 58 0d 0a 09 09 63 | 6c 69 20 20 20 20 20 20 | BX....c|li |
|00004fb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;|
|00004fc0| 20 54 75 72 6e 20 6f 66 | 66 20 69 6e 74 65 72 72 | Turn of|f interr|
|00004fd0| 75 70 74 73 0d 0a 09 09 | 57 61 69 74 52 65 74 72 |upts....|WaitRetr|
|00004fe0| 61 63 65 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ace | |
|00004ff0| 3b 20 4d 61 63 72 6f 20 | 2d 20 57 61 69 74 73 20 |; Macro |- Waits |
|00005000| 66 6f 72 20 68 6f 72 69 | 7a 20 72 65 74 72 61 63 |for hori|z retrac|
|00005010| 65 0d 0a 09 09 6d 6f 76 | 20 20 20 20 20 61 78 2c |e....mov| ax,|
|00005020| 20 62 78 20 20 20 20 20 | 20 20 20 20 20 3b 20 4d | bx | ; M|
|00005030| 6f 76 65 20 77 6f 72 64 | 20 62 61 63 6b 20 74 6f |ove word| back to|
|00005040| 20 41 58 2e 2e 2e 0d 0a | 09 09 73 74 6f 73 62 20 | AX.....|..stosb |
|00005050| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005060| 20 20 3b 20 4d 6f 76 65 | 20 77 6f 72 64 20 74 6f | ; Move| word to|
|00005070| 20 73 63 72 65 65 6e 0d | 0a 09 09 73 74 69 20 20 | screen.|...sti |
|00005080| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005090| 20 20 20 3b 20 45 6e 61 | 62 6c 65 20 69 6e 74 65 | ; Ena|ble inte|
|000050a0| 72 72 75 70 74 73 0d 0a | 09 09 69 6e 63 20 20 20 |rrupts..|..inc |
|000050b0| 20 20 64 69 20 20 20 20 | 20 20 20 20 20 20 20 20 | di | |
|000050c0| 20 20 3b 20 53 6b 69 70 | 20 74 68 65 20 61 74 74 | ; Skip| the att|
|000050d0| 72 69 62 75 74 65 2e 0d | 0a 09 09 6a 6d 70 20 20 |ribute..|...jmp |
|000050e0| 20 20 20 44 57 53 4e 5f | 4e 65 78 74 20 20 20 20 | DWSN_|Next |
|000050f0| 20 20 20 3b 20 43 6f 6e | 74 69 6e 75 65 0d 0a 09 | ; Con|tinue...|
|00005100| 44 57 53 4e 5f 4e 6f 57 | 61 69 74 3a 0d 0a 09 09 |DWSN_NoW|ait:....|
|00005110| 6c 6f 64 73 62 20 20 20 | 20 20 20 20 20 20 20 20 |lodsb | |
|00005120| 20 20 20 20 20 20 20 20 | 3b 20 47 65 74 20 61 20 | |; Get a |
|00005130| 63 68 61 72 61 63 74 65 | 72 20 66 72 6f 6d 20 73 |characte|r from s|
|00005140| 74 72 69 6e 67 0d 0a 09 | 09 6f 72 20 20 20 20 20 |tring...|.or |
|00005150| 20 61 6c 2c 20 61 6c 20 | 20 20 20 20 20 20 20 20 | al, al | |
|00005160| 20 3b 20 43 68 65 63 6b | 20 66 6f 72 20 4e 55 4c | ; Check| for NUL|
|00005170| 4c 0d 0a 09 09 6a 7a 20 | 20 20 20 20 20 44 57 53 |L....jz | DWS|
|00005180| 4e 5f 45 78 69 74 20 20 | 20 20 20 20 20 3b 20 49 |N_Exit | ; I|
|00005190| 66 20 4e 55 4c 4c 20 74 | 68 65 6e 20 65 78 69 74 |f NULL t|hen exit|
|000051a0| 0d 0a 09 09 73 74 6f 73 | 62 20 20 20 20 20 20 20 |....stos|b |
|000051b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 53 74 | | ; St|
|000051c0| 6f 72 65 20 74 68 65 20 | 62 79 74 65 20 6f 6e 20 |ore the |byte on |
|000051d0| 73 63 72 65 65 6e 0d 0a | 09 09 69 6e 63 20 20 20 |screen..|..inc |
|000051e0| 20 20 64 69 20 20 20 20 | 20 20 20 20 20 20 20 20 | di | |
|000051f0| 20 20 3b 20 53 6b 69 70 | 20 61 74 74 72 69 62 75 | ; Skip| attribu|
|00005200| 74 65 20 62 79 74 65 0d | 0a 09 09 6c 6f 6f 70 20 |te byte.|...loop |
|00005210| 20 20 20 44 57 53 4e 5f | 4e 6f 57 61 69 74 20 20 | DWSN_|NoWait |
|00005220| 20 20 20 3b 20 43 6f 6e | 74 69 6e 75 65 0d 0a 09 | ; Con|tinue...|
|00005230| 44 57 53 4e 5f 45 78 69 | 74 3a 0d 0a 09 09 70 6f |DWSN_Exi|t:....po|
|00005240| 70 20 20 20 20 20 64 69 | 20 20 20 20 20 20 20 20 |p di| |
|00005250| 20 20 20 20 20 20 3b 20 | 52 65 73 74 6f 72 65 20 | ; |Restore |
|00005260| 74 68 65 20 72 65 67 69 | 73 74 65 72 73 0d 0a 09 |the regi|sters...|
|00005270| 09 70 6f 70 20 20 20 20 | 20 65 73 0d 0a 09 09 70 |.pop | es....p|
|00005280| 6f 70 20 20 20 20 20 64 | 78 0d 0a 09 09 70 6f 70 |op d|x....pop|
|00005290| 20 20 20 20 20 63 78 0d | 0a 09 09 70 6f 70 20 20 | cx.|...pop |
|000052a0| 20 20 20 62 78 0d 0a 09 | 09 70 6f 70 20 20 20 20 | bx...|.pop |
|000052b0| 20 61 78 0d 0a 09 09 72 | 65 74 0d 0a 0d 0a 09 45 | ax....r|et.....E|
|000052c0| 4e 44 50 20 44 57 72 69 | 74 65 53 74 72 4e 41 0d |NDP DWri|teStrNA.|
|000052d0| 0a 0d 0a 09 47 4c 4f 42 | 41 4c 20 20 44 46 69 6c |....GLOB|AL DFil|
|000052e0| 6c 43 48 3a 50 52 4f 43 | 0d 0a 09 50 52 4f 43 20 |lCH:PROC|...PROC |
|000052f0| 20 20 20 44 46 69 6c 6c | 43 48 0d 0a 09 3b 0d 0a | DFill|CH...;..|
|00005300| 09 3b 20 54 68 69 73 20 | 70 72 6f 63 65 64 75 72 |.; This |procedur|
|00005310| 65 20 66 69 6c 6c 73 20 | 61 6e 20 61 72 65 61 20 |e fills |an area |
|00005320| 6f 66 20 74 68 65 20 73 | 63 72 65 65 6e 20 77 69 |of the s|creen wi|
|00005330| 74 68 20 74 68 65 20 73 | 70 65 63 69 66 69 65 64 |th the s|pecified|
|00005340| 0d 0a 09 3b 20 63 68 61 | 72 61 63 74 65 72 20 61 |...; cha|racter a|
|00005350| 6e 64 20 61 74 74 72 69 | 62 75 74 65 2e 0d 0a 09 |nd attri|bute....|
|00005360| 3b 0d 0a 09 3b 20 2a 2a | 2a 20 49 4d 50 4f 52 54 |;...; **|* IMPORT|
|00005370| 41 4e 54 20 2d 2d 20 43 | 41 4c 4c 20 47 65 74 56 |ANT -- C|ALL GetV|
|00005380| 69 64 65 6f 4d 6f 64 65 | 20 42 65 66 6f 72 65 20 |ideoMode| Before |
|00005390| 75 73 69 6e 67 20 74 68 | 69 73 20 72 6f 75 74 69 |using th|is routi|
|000053a0| 6e 65 21 0d 0a 09 3b 0d | 0a 09 3b 20 49 6e 70 75 |ne!...;.|..; Inpu|
|000053b0| 74 0d 0a 09 3b 20 20 20 | 20 20 20 20 41 48 20 20 |t...; | AH |
|000053c0| 20 20 20 20 3d 20 54 6f | 70 20 52 6f 77 0d 0a 09 | = To|p Row...|
|000053d0| 3b 20 20 20 20 20 20 20 | 41 4c 20 20 20 20 20 20 |; |AL |
|000053e0| 3d 20 4c 65 66 74 20 43 | 6f 6c 75 6d 6e 0d 0a 09 |= Left C|olumn...|
|000053f0| 3b 20 20 20 20 20 20 20 | 42 48 20 20 20 20 20 20 |; |BH |
|00005400| 3d 20 4e 75 6d 62 65 72 | 20 6f 66 20 72 6f 77 73 |= Number| of rows|
|00005410| 0d 0a 09 3b 20 20 20 20 | 20 20 20 42 4c 20 20 20 |...; | BL |
|00005420| 20 20 20 3d 20 4e 75 6d | 62 65 72 20 6f 66 20 63 | = Num|ber of c|
|00005430| 6f 6c 75 6d 6e 73 0d 0a | 09 3b 20 20 20 20 20 20 |olumns..|.; |
|00005440| 20 44 48 20 20 20 20 20 | 20 3d 20 41 74 74 72 69 | DH | = Attri|
|00005450| 62 75 74 65 0d 0a 09 3b | 20 20 20 20 20 20 20 44 |bute...;| D|
|00005460| 4c 20 20 20 20 20 20 3d | 20 43 68 61 72 61 63 74 |L =| Charact|
|00005470| 65 72 0d 0a 09 3b 0d 0a | 09 09 70 75 73 68 20 20 |er...;..|..push |
|00005480| 20 20 61 78 20 20 20 20 | 20 20 20 20 20 20 20 20 | ax | |
|00005490| 20 20 20 20 20 20 20 20 | 20 20 3b 20 53 74 6f 72 | | ; Stor|
|000054a0| 65 20 52 65 67 69 73 74 | 65 72 73 0d 0a 09 09 70 |e Regist|ers....p|
|000054b0| 75 73 68 20 20 20 20 62 | 78 0d 0a 09 09 70 75 73 |ush b|x....pus|
|000054c0| 68 20 20 20 20 63 78 0d | 0a 09 09 70 75 73 68 20 |h cx.|...push |
|000054d0| 20 20 20 64 78 0d 0a 09 | 09 70 75 73 68 20 20 20 | dx...|.push |
|000054e0| 20 65 73 0d 0a 09 09 70 | 75 73 68 20 20 20 20 64 | es....p|ush d|
|000054f0| 69 0d 0a 0d 0a 20 20 20 | 20 20 20 20 20 20 20 20 |i.... | |
|00005500| 20 20 20 20 20 6a 7a 20 | 20 20 20 20 20 44 46 43 | jz | DFC|
|00005510| 5f 45 78 69 74 20 20 20 | 20 20 20 20 20 20 20 20 |_Exit | |
|00005520| 20 20 20 20 20 3b 20 73 | 74 72 69 6e 67 20 77 6f | ; s|tring wo|
|00005530| 6e 27 74 20 66 69 74 0d | 0a 09 09 6d 6f 76 20 20 |n't fit.|...mov |
|00005540| 20 20 20 65 73 2c 20 5b | 42 61 73 65 4f 66 53 63 | es, [|BaseOfSc|
|00005550| 72 65 65 6e 5d 20 20 20 | 20 20 20 3b 20 4d 6f 76 |reen] | ; Mov|
|00005560| 65 20 73 63 72 65 65 6e | 20 73 65 67 20 74 6f 20 |e screen| seg to |
|00005570| 45 53 0d 0a 09 09 6d 6f | 76 20 20 20 20 20 63 6c |ES....mo|v cl|
|00005580| 2c 20 5b 53 6e 6f 77 43 | 68 65 63 6b 5d 20 20 20 |, [SnowC|heck] |
|00005590| 20 20 20 20 20 20 3b 20 | 4d 6f 76 65 20 73 6e 6f | ; |Move sno|
|000055a0| 77 20 63 68 65 63 6b 20 | 74 6f 20 43 4c 0d 0a 0d |w check |to CL...|
|000055b0| 0a 09 09 63 6c 64 20 20 | 20 20 20 20 20 20 20 20 |...cld | |
|000055c0| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 43 6c 65 | | ; Cle|
|000055d0| 61 72 20 74 68 65 20 64 | 69 72 65 63 74 69 6f 6e |ar the d|irection|
|000055e0| 20 66 6c 61 67 0d 0a 09 | 09 72 63 72 20 20 20 20 | flag...|.rcr |
|000055f0| 20 63 6c 2c 20 31 20 20 | 20 20 20 20 20 20 20 20 | cl, 1 | |
|00005600| 20 3b 20 53 6e 6f 77 43 | 68 65 63 6b 0d 0a 09 09 | ; SnowC|heck....|
|00005610| 6d 6f 76 20 20 20 20 20 | 63 68 2c 20 30 20 20 20 |mov |ch, 0 |
|00005620| 20 20 20 20 20 20 20 20 | 3b 20 43 6c 65 61 72 20 | |; Clear |
|00005630| 43 48 0d 0a 09 09 6a 6e | 63 20 20 20 20 20 44 46 |CH....jn|c DF|
|00005640| 43 5f 4e 6f 57 61 69 74 | 20 20 20 20 20 20 3b 20 |C_NoWait| ; |
|00005650| 69 66 20 6e 6f 20 73 6e | 6f 77 63 68 65 63 6b 20 |if no sn|owcheck |
|00005660| 67 6f 74 6f 20 44 46 43 | 5f 4e 6f 57 61 69 74 0d |goto DFC|_NoWait.|
|00005670| 0a 0d 0a 09 44 46 43 5f | 54 6f 70 3a 0d 0a 09 09 |....DFC_|Top:....|
|00005680| 6d 6f 76 20 20 20 20 20 | 63 6c 2c 20 62 6c 20 20 |mov |cl, bl |
|00005690| 20 20 20 20 20 20 20 20 | 3b 20 4c 6f 61 64 20 74 | |; Load t|
|000056a0| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 63 6f 6c |he numbe|r of col|
|000056b0| 75 6d 6e 73 0d 0a 09 09 | 63 61 6c 6c 20 20 20 20 |umns....|call |
|000056c0| 4d 6f 76 65 58 59 5f 44 | 49 20 20 20 20 20 20 20 |MoveXY_D|I |
|000056d0| 3b 20 53 65 74 20 44 49 | 20 74 6f 20 73 63 72 65 |; Set DI| to scre|
|000056e0| 65 6e 20 6f 66 66 73 65 | 74 20 70 6f 73 0d 0a 09 |en offse|t pos...|
|000056f0| 09 70 75 73 68 20 20 20 | 20 61 78 20 20 20 20 20 |.push | ax |
|00005700| 20 20 20 20 20 20 20 20 | 20 3b 20 53 74 6f 72 65 | | ; Store|
|00005710| 20 52 65 67 69 73 74 65 | 72 73 20 41 58 2c 20 42 | Registe|rs AX, B|
|00005720| 58 0d 0a 09 09 70 75 73 | 68 20 20 20 20 62 78 0d |X....pus|h bx.|
|00005730| 0a 0d 0a 09 44 46 43 5f | 4e 65 78 74 3a 0d 0a 09 |....DFC_|Next:...|
|00005740| 09 63 6c 69 20 20 20 20 | 20 20 20 20 20 20 20 20 |.cli | |
|00005750| 20 20 20 20 20 20 20 20 | 20 3b 20 54 75 72 6e 20 | | ; Turn |
|00005760| 6f 66 66 20 69 6e 74 65 | 72 72 75 70 74 73 0d 0a |off inte|rrupts..|
|00005770| 09 09 70 75 73 68 20 20 | 20 20 64 78 20 20 20 20 |..push | dx |
|00005780| 20 20 20 20 20 20 20 20 | 20 20 3b 20 53 74 6f 72 | | ; Stor|
|00005790| 65 20 76 69 64 65 6f 20 | 77 6f 72 64 0d 0a 09 09 |e video |word....|
|000057a0| 57 61 69 74 52 65 74 72 | 61 63 65 20 20 20 20 20 |WaitRetr|ace |
|000057b0| 20 20 20 20 20 20 20 20 | 3b 20 4d 61 63 72 6f 20 | |; Macro |
|000057c0| 2d 20 57 61 69 74 73 20 | 66 6f 72 20 68 6f 72 69 |- Waits |for hori|
|000057d0| 7a 20 72 65 74 72 61 63 | 65 0d 0a 09 09 70 6f 70 |z retrac|e....pop|
|000057e0| 20 20 20 20 20 64 78 20 | 20 20 20 20 20 20 20 20 | dx | |
|000057f0| 20 20 20 20 20 3b 20 52 | 65 73 74 6f 72 65 20 76 | ; R|estore v|
|00005800| 69 64 65 6f 20 77 6f 72 | 64 0d 0a 09 09 6d 6f 76 |ideo wor|d....mov|
|00005810| 20 20 20 20 20 61 78 2c | 20 64 78 20 20 20 20 20 | ax,| dx |
|00005820| 20 20 20 20 20 3b 20 4d | 6f 76 65 20 77 6f 72 64 | ; M|ove word|
|00005830| 20 69 6e 74 6f 20 41 58 | 0d 0a 09 09 73 74 6f 73 | into AX|....stos|
|00005840| 77 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |w | |
|00005850| 20 20 20 20 3b 20 4d 6f | 76 65 20 77 6f 72 64 20 | ; Mo|ve word |
|00005860| 74 6f 20 73 63 72 65 65 | 6e 0d 0a 09 09 73 74 69 |to scree|n....sti|
|00005870| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005880| 20 20 20 20 20 3b 20 45 | 6e 61 62 6c 65 20 69 6e | ; E|nable in|
|00005890| 74 65 72 72 75 70 74 73 | 0d 0a 09 09 6c 6f 6f 70 |terrupts|....loop|
|000058a0| 20 20 20 20 44 46 43 5f | 4e 65 78 74 20 20 20 20 | DFC_|Next |
|000058b0| 20 20 20 20 3b 20 43 6f | 6e 74 69 6e 75 65 0d 0a | ; Co|ntinue..|
|000058c0| 0d 0a 09 09 70 6f 70 20 | 20 20 20 20 62 78 20 20 |....pop | bx |
|000058d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 52 65 | | ; Re|
|000058e0| 73 74 6f 72 65 20 72 65 | 67 69 73 74 65 72 73 20 |store re|gisters |
|000058f0| 42 58 2c 20 41 58 0d 0a | 09 09 70 6f 70 20 20 20 |BX, AX..|..pop |
|00005900| 20 20 61 78 0d 0a 09 09 | 69 6e 63 20 20 20 20 20 | ax....|inc |
|00005910| 61 68 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ah | |
|00005920| 3b 20 4e 65 78 74 20 72 | 6f 77 0d 0a 09 09 64 65 |; Next r|ow....de|
|00005930| 63 20 20 20 20 20 62 68 | 20 20 20 20 20 20 20 20 |c bh| |
|00005940| 20 20 20 20 20 20 3b 20 | 44 65 63 72 65 6d 65 6e | ; |Decremen|
|00005950| 74 20 74 68 65 20 6e 75 | 6d 62 65 72 20 6f 66 20 |t the nu|mber of |
|00005960| 72 6f 77 73 20 64 6f 6e | 65 0d 0a 09 09 6f 72 20 |rows don|e....or |
|00005970| 20 20 20 20 20 62 68 2c | 20 62 68 20 20 20 20 20 | bh,| bh |
|00005980| 20 20 20 20 20 3b 20 43 | 68 65 63 6b 20 4e 75 6d | ; C|heck Num|
|00005990| 62 65 72 20 6f 66 20 63 | 6f 6c 75 6d 6e 73 0d 0a |ber of c|olumns..|
|000059a0| 09 09 6a 6e 7a 20 20 20 | 20 20 44 46 43 5f 54 6f |..jnz | DFC_To|
|000059b0| 70 20 20 20 20 20 20 20 | 20 20 3b 20 44 6f 20 6e |p | ; Do n|
|000059c0| 65 78 74 20 63 6f 6c 75 | 6d 6e 20 69 66 20 6e 6f |ext colu|mn if no|
|000059d0| 74 20 64 6f 6e 65 0d 0a | 09 09 6a 6d 70 20 20 20 |t done..|..jmp |
|000059e0| 20 20 44 46 43 5f 45 78 | 69 74 20 20 20 20 20 20 | DFC_Ex|it |
|000059f0| 20 20 3b 20 45 78 69 74 | 20 72 6f 75 74 69 6e 65 | ; Exit| routine|
|00005a00| 0d 0a 0d 0a 09 44 46 43 | 5f 4e 6f 57 61 69 74 3a |.....DFC|_NoWait:|
|00005a10| 0d 0a 09 09 6d 6f 76 20 | 20 20 20 20 63 6c 2c 20 |....mov | cl, |
|00005a20| 62 6c 20 20 20 20 20 20 | 20 20 20 20 3b 20 4c 6f |bl | ; Lo|
|00005a30| 61 64 20 74 68 65 20 6e | 75 6d 62 65 72 20 6f 66 |ad the n|umber of|
|00005a40| 20 63 6f 6c 75 6d 6e 73 | 0d 0a 09 09 63 61 6c 6c | columns|....call|
|00005a50| 20 20 20 20 4d 6f 76 65 | 58 59 5f 44 49 20 20 20 | Move|XY_DI |
|00005a60| 20 20 20 20 3b 20 53 65 | 74 20 44 49 20 74 6f 20 | ; Se|t DI to |
|00005a70| 73 63 72 65 65 6e 20 6f | 66 66 73 65 74 20 70 6f |screen o|ffset po|
|00005a80| 73 0d 0a 09 09 70 75 73 | 68 20 20 20 20 61 78 20 |s....pus|h ax |
|00005a90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 53 | | ; S|
|00005aa0| 74 6f 72 65 20 74 68 65 | 20 63 68 61 72 2f 61 74 |tore the| char/at|
|00005ab0| 74 72 0d 0a 09 09 6d 6f | 76 20 20 20 20 20 61 78 |tr....mo|v ax|
|00005ac0| 2c 20 64 78 20 20 20 20 | 20 20 20 20 20 20 3b 20 |, dx | ; |
|00005ad0| 4d 6f 76 65 20 63 68 61 | 72 2f 61 74 74 72 20 69 |Move cha|r/attr i|
|00005ae0| 6e 74 6f 20 61 78 0d 0a | 09 09 72 65 70 20 20 20 |nto ax..|..rep |
|00005af0| 20 20 73 74 6f 73 77 20 | 20 20 20 20 20 20 20 20 | stosw | |
|00005b00| 20 20 3b 20 54 68 61 74 | 73 20 69 74 21 0d 0a 09 | ; That|s it!...|
|00005b10| 09 70 6f 70 20 20 20 20 | 20 61 78 20 20 20 20 20 |.pop | ax |
|00005b20| 20 20 20 20 20 20 20 20 | 20 3b 20 52 65 73 74 6f | | ; Resto|
|00005b30| 72 65 20 74 68 65 20 63 | 68 61 72 2f 61 74 74 72 |re the c|har/attr|
|00005b40| 0d 0a 09 09 69 6e 63 20 | 20 20 20 20 61 68 20 20 |....inc | ah |
|00005b50| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 4e 65 | | ; Ne|
|00005b60| 78 74 20 72 6f 77 0d 0a | 09 09 64 65 63 20 20 20 |xt row..|..dec |
|00005b70| 20 20 62 68 20 20 20 20 | 20 20 20 20 20 20 20 20 | bh | |
|00005b80| 20 20 3b 20 44 65 63 72 | 65 6d 65 6e 74 20 6e 75 | ; Decr|ement nu|
|00005b90| 6d 62 65 72 20 6f 66 20 | 72 6f 77 73 20 64 6f 6e |mber of |rows don|
|00005ba0| 65 0d 0a 09 09 6f 72 20 | 20 20 20 20 20 62 68 2c |e....or | bh,|
|00005bb0| 20 62 68 20 20 20 20 20 | 20 20 20 20 20 3b 20 43 | bh | ; C|
|00005bc0| 68 65 63 6b 20 6e 75 6d | 62 65 72 20 6f 66 20 63 |heck num|ber of c|
|00005bd0| 6f 6c 75 6d 6e 73 0d 0a | 09 09 6a 6e 7a 20 20 20 |olumns..|..jnz |
|00005be0| 20 20 44 46 43 5f 4e 6f | 57 61 69 74 20 20 20 20 | DFC_No|Wait |
|00005bf0| 20 20 3b 20 44 6f 20 6e | 65 78 74 20 63 6f 6c 75 | ; Do n|ext colu|
|00005c00| 6d 6e 0d 0a 0d 0a 09 44 | 46 43 5f 45 78 69 74 3a |mn.....D|FC_Exit:|
|00005c10| 0d 0a 09 09 70 6f 70 20 | 20 20 20 20 64 69 20 20 |....pop | di |
|00005c20| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 52 65 | | ; Re|
|00005c30| 73 74 6f 72 65 20 72 65 | 67 69 73 74 65 72 73 0d |store re|gisters.|
|00005c40| 0a 09 09 70 6f 70 20 20 | 20 20 20 65 73 0d 0a 09 |...pop | es...|
|00005c50| 09 70 6f 70 20 20 20 20 | 20 64 78 0d 0a 09 09 70 |.pop | dx....p|
|00005c60| 6f 70 20 20 20 20 20 63 | 78 0d 0a 09 09 70 6f 70 |op c|x....pop|
|00005c70| 20 20 20 20 20 62 78 0d | 0a 09 09 70 6f 70 20 20 | bx.|...pop |
|00005c80| 20 20 20 61 78 0d 0a 09 | 09 72 65 74 0d 0a 0d 0a | ax...|.ret....|
|00005c90| 09 45 4e 44 50 20 44 46 | 69 6c 6c 43 48 0d 0a 0d |.ENDP DF|illCH...|
|00005ca0| 0a 09 47 4c 4f 42 41 4c | 20 20 44 46 69 6c 6c 43 |..GLOBAL| DFillC|
|00005cb0| 48 4e 41 3a 50 52 4f 43 | 0d 0a 09 50 52 4f 43 20 |HNA:PROC|...PROC |
|00005cc0| 20 20 20 44 46 69 6c 6c | 43 48 4e 41 0d 0a 09 3b | DFill|CHNA...;|
|00005cd0| 0d 0a 09 3b 20 54 68 69 | 73 20 70 72 6f 63 65 64 |...; Thi|s proced|
|00005ce0| 75 72 65 20 66 69 6c 6c | 73 20 61 6e 20 61 72 65 |ure fill|s an are|
|00005cf0| 61 20 6f 66 20 74 68 65 | 20 73 63 72 65 65 6e 20 |a of the| screen |
|00005d00| 77 69 74 68 20 74 68 65 | 20 73 70 65 63 69 66 69 |with the| specifi|
|00005d10| 65 64 0d 0a 09 3b 20 63 | 68 61 72 61 63 74 65 72 |ed...; c|haracter|
|00005d20| 2e 20 41 74 74 72 69 62 | 75 74 65 20 72 65 6d 61 |. Attrib|ute rema|
|00005d30| 69 6e 73 20 74 68 65 20 | 73 61 6d 65 2e 0d 0a 09 |ins the |same....|
|00005d40| 3b 0d 0a 09 3b 20 2a 2a | 2a 20 49 4d 50 4f 52 54 |;...; **|* IMPORT|
|00005d50| 41 4e 54 20 2d 2d 20 43 | 41 4c 4c 20 47 65 74 56 |ANT -- C|ALL GetV|
|00005d60| 69 64 65 6f 4d 6f 64 65 | 20 42 65 66 6f 72 65 20 |ideoMode| Before |
|00005d70| 75 73 69 6e 67 20 74 68 | 69 73 20 72 6f 75 74 69 |using th|is routi|
|00005d80| 6e 65 21 0d 0a 09 3b 0d | 0a 09 3b 20 49 6e 70 75 |ne!...;.|..; Inpu|
|00005d90| 74 0d 0a 09 3b 20 20 20 | 20 20 20 20 41 48 20 20 |t...; | AH |
|00005da0| 20 20 20 20 3d 20 54 6f | 70 20 52 6f 77 0d 0a 09 | = To|p Row...|
|00005db0| 3b 20 20 20 20 20 20 20 | 41 4c 20 20 20 20 20 20 |; |AL |
|00005dc0| 3d 20 4c 65 66 74 20 43 | 6f 6c 75 6d 6e 0d 0a 09 |= Left C|olumn...|
|00005dd0| 3b 20 20 20 20 20 20 20 | 42 48 20 20 20 20 20 20 |; |BH |
|00005de0| 3d 20 4e 75 6d 62 65 72 | 20 6f 66 20 72 6f 77 73 |= Number| of rows|
|00005df0| 0d 0a 09 3b 20 20 20 20 | 20 20 20 42 4c 20 20 20 |...; | BL |
|00005e00| 20 20 20 3d 20 4e 75 6d | 62 65 72 20 6f 66 20 63 | = Num|ber of c|
|00005e10| 6f 6c 75 6d 6e 73 0d 0a | 09 3b 20 20 20 20 20 20 |olumns..|.; |
|00005e20| 20 44 4c 20 20 20 20 20 | 20 3d 20 43 68 61 72 61 | DL | = Chara|
|00005e30| 63 74 65 72 0d 0a 09 3b | 0d 0a 09 09 70 75 73 68 |cter...;|....push|
|00005e40| 20 20 20 20 61 78 20 20 | 20 20 20 20 20 20 20 20 | ax | |
|00005e50| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 53 74 | | ; St|
|00005e60| 6f 72 65 20 52 65 67 69 | 73 74 65 72 73 0d 0a 09 |ore Regi|sters...|
|00005e70| 09 70 75 73 68 20 20 20 | 20 62 78 0d 0a 09 09 70 |.push | bx....p|
|00005e80| 75 73 68 20 20 20 20 63 | 78 0d 0a 09 09 70 75 73 |ush c|x....pus|
|00005e90| 68 20 20 20 20 64 78 0d | 0a 09 09 70 75 73 68 20 |h dx.|...push |
|00005ea0| 20 20 20 65 73 0d 0a 09 | 09 70 75 73 68 20 20 20 | es...|.push |
|00005eb0| 20 64 69 0d 0a 0d 0a 09 | 09 6d 6f 76 20 20 20 20 | di.....|.mov |
|00005ec0| 20 65 73 2c 20 5b 42 61 | 73 65 4f 66 53 63 72 65 | es, [Ba|seOfScre|
|00005ed0| 65 6e 5d 20 20 20 20 20 | 20 3b 20 4d 6f 76 65 20 |en] | ; Move |
|00005ee0| 73 63 72 65 65 6e 20 73 | 65 67 20 74 6f 20 45 53 |screen s|eg to ES|
|00005ef0| 0d 0a 09 09 6d 6f 76 20 | 20 20 20 20 63 6c 2c 20 |....mov | cl, |
|00005f00| 5b 53 6e 6f 77 43 68 65 | 63 6b 5d 20 20 20 20 20 |[SnowChe|ck] |
|00005f10| 20 20 20 20 3b 20 4d 6f | 76 65 20 73 6e 6f 77 20 | ; Mo|ve snow |
|00005f20| 63 68 65 63 6b 20 74 6f | 20 43 4c 0d 0a 0d 0a 09 |check to| CL.....|
|00005f30| 09 63 6c 64 20 20 20 20 | 20 20 20 20 20 20 20 20 |.cld | |
|00005f40| 20 20 20 20 20 20 20 20 | 20 3b 20 43 6c 65 61 72 | | ; Clear|
|00005f50| 20 74 68 65 20 64 69 72 | 65 63 74 69 6f 6e 20 66 | the dir|ection f|
|00005f60| 6c 61 67 0d 0a 09 09 72 | 63 72 20 20 20 20 20 63 |lag....r|cr c|
|00005f70| 6c 2c 20 31 20 20 20 20 | 20 20 20 20 20 20 20 3b |l, 1 | ;|
|00005f80| 20 53 6e 6f 77 43 68 65 | 63 6b 0d 0a 09 09 6d 6f | SnowChe|ck....mo|
|00005f90| 76 20 20 20 20 20 63 68 | 2c 20 30 20 20 20 20 20 |v ch|, 0 |
|00005fa0| 20 20 20 20 20 20 3b 20 | 43 6c 65 61 72 20 43 48 | ; |Clear CH|
|00005fb0| 0d 0a 09 09 6a 6e 63 20 | 20 20 20 20 44 46 43 4e |....jnc | DFCN|
|00005fc0| 5f 4e 6f 57 61 69 74 20 | 20 20 20 20 3b 20 69 66 |_NoWait | ; if|
|00005fd0| 20 6e 6f 20 73 6e 6f 77 | 63 68 65 63 6b 20 67 6f | no snow|check go|
|00005fe0| 74 6f 20 44 46 43 4e 5f | 4e 6f 57 61 69 74 0d 0a |to DFCN_|NoWait..|
|00005ff0| 0d 0a 09 44 46 43 4e 5f | 54 6f 70 3a 0d 0a 09 09 |...DFCN_|Top:....|
|00006000| 6d 6f 76 20 20 20 20 20 | 63 6c 2c 20 62 6c 20 20 |mov |cl, bl |
|00006010| 20 20 20 20 20 20 20 20 | 3b 20 4c 6f 61 64 20 74 | |; Load t|
|00006020| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 63 6f 6c |he numbe|r of col|
|00006030| 75 6d 6e 73 0d 0a 09 09 | 63 61 6c 6c 20 20 20 20 |umns....|call |
|00006040| 4d 6f 76 65 58 59 5f 44 | 49 20 20 20 20 20 20 20 |MoveXY_D|I |
|00006050| 3b 20 53 65 74 20 44 49 | 20 74 6f 20 73 63 72 65 |; Set DI| to scre|
|00006060| 65 6e 20 6f 66 66 73 65 | 74 20 70 6f 73 0d 0a 09 |en offse|t pos...|
|00006070| 09 70 75 73 68 20 20 20 | 20 61 78 20 20 20 20 20 |.push | ax |
|00006080| 20 20 20 20 20 20 20 20 | 20 3b 20 53 74 6f 72 65 | | ; Store|
|00006090| 20 52 65 67 69 73 74 65 | 72 73 20 41 58 2c 20 42 | Registe|rs AX, B|
|000060a0| 58 0d 0a 09 09 70 75 73 | 68 20 20 20 20 62 78 0d |X....pus|h bx.|
|000060b0| 0a 0d 0a 09 44 46 43 4e | 5f 4e 65 78 74 3a 0d 0a |....DFCN|_Next:..|
|000060c0| 09 09 63 6c 69 20 20 20 | 20 20 20 20 20 20 20 20 |..cli | |
|000060d0| 20 20 20 20 20 20 20 20 | 20 20 3b 20 54 75 72 6e | | ; Turn|
|000060e0| 20 6f 66 66 20 69 6e 74 | 65 72 72 75 70 74 73 0d | off int|errupts.|
|000060f0| 0a 09 09 70 75 73 68 20 | 20 20 20 64 78 20 20 20 |...push | dx |
|00006100| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 53 61 76 | | ; Sav|
|00006110| 65 20 76 69 64 65 6f 20 | 77 6f 72 64 0d 0a 09 09 |e video |word....|
|00006120| 57 61 69 74 52 65 74 72 | 61 63 65 20 20 20 20 20 |WaitRetr|ace |
|00006130| 20 20 20 20 20 20 20 20 | 3b 20 4d 61 63 72 6f 20 | |; Macro |
|00006140| 2d 20 57 61 69 74 73 20 | 66 6f 72 20 68 6f 72 69 |- Waits |for hori|
|00006150| 7a 20 72 65 74 72 61 63 | 65 0d 0a 09 09 70 6f 70 |z retrac|e....pop|
|00006160| 20 20 20 20 20 64 78 20 | 20 20 20 20 20 20 20 20 | dx | |
|00006170| 20 20 20 20 20 3b 20 52 | 65 73 74 6f 72 65 20 76 | ; R|estore v|
|00006180| 69 64 65 6f 20 77 6f 72 | 64 0d 0a 09 09 6d 6f 76 |ideo wor|d....mov|
|00006190| 20 20 20 20 20 61 6c 2c | 20 64 6c 20 20 20 20 20 | al,| dl |
|000061a0| 20 20 20 20 20 3b 20 4d | 6f 76 65 20 63 68 61 72 | ; M|ove char|
|000061b0| 61 63 74 65 72 20 69 6e | 74 6f 20 61 6c 0d 0a 09 |acter in|to al...|
|000061c0| 09 73 74 6f 73 62 20 20 | 20 20 20 20 20 20 20 20 |.stosb | |
|000061d0| 20 20 20 20 20 20 20 20 | 20 3b 20 4d 6f 76 65 20 | | ; Move |
|000061e0| 77 6f 72 64 20 74 6f 20 | 73 63 72 65 65 6e 0d 0a |word to |screen..|
|000061f0| 09 09 73 74 69 20 20 20 | 20 20 20 20 20 20 20 20 |..sti | |
|00006200| 20 20 20 20 20 20 20 20 | 20 20 3b 20 45 6e 61 62 | | ; Enab|
|00006210| 6c 65 20 69 6e 74 65 72 | 72 75 70 74 73 0d 0a 09 |le inter|rupts...|
|00006220| 09 69 6e 63 20 20 20 20 | 20 64 69 20 20 20 20 20 |.inc | di |
|00006230| 20 20 20 20 20 20 20 20 | 20 3b 20 53 6b 69 70 20 | | ; Skip |
|00006240| 61 74 74 72 0d 0a 09 09 | 6c 6f 6f 70 20 20 20 20 |attr....|loop |
|00006250| 44 46 43 4e 5f 4e 65 78 | 74 20 20 20 20 20 20 20 |DFCN_Nex|t |
|00006260| 3b 20 43 6f 6e 74 69 6e | 75 65 0d 0a 0d 0a 09 09 |; Contin|ue......|
|00006270| 70 6f 70 20 20 20 20 20 | 62 78 20 20 20 20 20 20 |pop |bx |
|00006280| 20 20 20 20 20 20 20 20 | 3b 20 52 65 73 74 6f 72 | |; Restor|
|00006290| 65 20 72 65 67 69 73 74 | 65 72 73 20 42 58 2c 20 |e regist|ers BX, |
|000062a0| 41 58 0d 0a 09 09 70 6f | 70 20 20 20 20 20 61 78 |AX....po|p ax|
|000062b0| 0d 0a 09 09 69 6e 63 20 | 20 20 20 20 61 68 20 20 |....inc | ah |
|000062c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 4e 65 | | ; Ne|
|000062d0| 78 74 20 72 6f 77 0d 0a | 09 09 64 65 63 20 20 20 |xt row..|..dec |
|000062e0| 20 20 62 68 20 20 20 20 | 20 20 20 20 20 20 20 20 | bh | |
|000062f0| 20 20 3b 20 44 65 63 72 | 65 6d 65 6e 74 20 74 68 | ; Decr|ement th|
|00006300| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 72 6f 77 73 |e number| of rows|
|00006310| 20 64 6f 6e 65 0d 0a 09 | 09 6f 72 20 20 20 20 20 | done...|.or |
|00006320| 20 62 68 2c 20 62 68 20 | 20 20 20 20 20 20 20 20 | bh, bh | |
|00006330| 20 3b 20 43 68 65 63 6b | 20 4e 75 6d 62 65 72 20 | ; Check| Number |
|00006340| 6f 66 20 63 6f 6c 75 6d | 6e 73 0d 0a 09 09 6a 6e |of colum|ns....jn|
|00006350| 7a 20 20 20 20 20 44 46 | 43 4e 5f 54 6f 70 20 20 |z DF|CN_Top |
|00006360| 20 20 20 20 20 20 3b 20 | 44 6f 20 6e 65 78 74 20 | ; |Do next |
|00006370| 63 6f 6c 75 6d 6e 20 69 | 66 20 6e 6f 74 20 64 6f |column i|f not do|
|00006380| 6e 65 0d 0a 09 09 6a 6d | 70 20 20 20 20 20 44 46 |ne....jm|p DF|
|00006390| 43 4e 5f 45 78 69 74 20 | 20 20 20 20 20 20 3b 20 |CN_Exit | ; |
|000063a0| 45 78 69 74 20 72 6f 75 | 74 69 6e 65 0d 0a 0d 0a |Exit rou|tine....|
|000063b0| 09 44 46 43 4e 5f 4e 6f | 57 61 69 74 3a 0d 0a 09 |.DFCN_No|Wait:...|
|000063c0| 09 6d 6f 76 20 20 20 20 | 20 63 6c 2c 20 62 6c 20 |.mov | cl, bl |
|000063d0| 20 20 20 20 20 20 20 20 | 20 3b 20 4c 6f 61 64 20 | | ; Load |
|000063e0| 74 68 65 20 6e 75 6d 62 | 65 72 20 6f 66 20 63 6f |the numb|er of co|
|000063f0| 6c 75 6d 6e 73 0d 0a 09 | 09 63 61 6c 6c 20 20 20 |lumns...|.call |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.