home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 02 - 1986 / 02.01 Jan 86.sit / 02.01 Jan 86 / modula2 / serial ports 2-1 / SCCHack.MOD < prev   
MacBinary  |  1985-11-23  |  2.4 KB  |  [TEXT/EDIT]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert SoundTracker Module (music/soundTracker) ext Supported
66% dexvert Chip Tracker Module (music/chipTracker) ext Supported
66% dexvert Protracker Module (music/mod) ext Supported
66% dexvert Octalyser Module (music/octalyser) ext Supported
66% dexvert Star Tracker/StarTrekker Module (music/starTracker) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert PollyTracker Module (music/pollyTracker) ext Unsupported
1% dexvert Black Viper packed music (music/blackViperPackedMusic) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Sat Nov 23 11:54:09 1985, modified Sat Nov 23 11:54:09 1985, creator Macintosh Edit, type ASCII, 1787 bytes "SCCHack.MOD" , at 0x77b 490 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[EDIT]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0b 53 43 43 48 61 63 | 6b 2e 4d 4f 44 00 00 00 |..SCCHac|k.MOD...|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 45 44 49 | 54 01 00 00 00 00 00 00 |.TEXTEDI|T.......|
|00000050| 00 00 00 00 00 06 fb 00 | 00 01 ea 9a 0b b1 b1 9a |........|........|
|00000060| 0b b1 b1 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 58 af 00 00 |........|....X...|
|00000080| 0d 4d 4f 44 55 4c 45 20 | 53 43 43 48 61 63 6b 3b |.MODULE |SCCHack;|
|00000090| 0d 0d 28 2a 09 57 72 69 | 74 74 65 6e 20 62 79 20 |..(*.Wri|tten by |
|000000a0| 4a 65 66 66 20 4d 69 74 | 63 68 65 6c 6c 0d 09 09 |Jeff Mit|chell...|
|000000b0| 44 69 67 69 74 61 6c 20 | 53 6f 6c 75 74 69 6f 6e |Digital |Solution|
|000000c0| 73 2c 20 20 31 39 38 35 | 0d 09 09 0d 54 68 69 73 |s, 1985|....This|
|000000d0| 20 70 72 6f 67 72 61 6d | 20 61 6c 6c 6f 77 73 20 | program| allows |
|000000e0| 69 6e 74 65 72 61 63 74 | 69 76 65 20 6d 61 6e 69 |interact|ive mani|
|000000f0| 70 75 6c 61 74 69 6f 6e | 0d 6f 66 20 74 68 65 20 |pulation|.of the |
|00000100| 69 6e 74 65 72 6e 61 6c | 20 53 43 43 20 72 65 67 |internal| SCC reg|
|00000110| 69 73 74 65 72 73 2e 09 | 49 74 20 75 73 65 73 20 |isters..|It uses |
|00000120| 6f 6e 6c 79 0d 63 68 61 | 6e 6e 65 6c 20 41 20 62 |only.cha|nnel A b|
|00000130| 75 74 20 49 27 76 65 20 | 69 6e 63 6c 75 64 65 64 |ut I've |included|
|00000140| 20 74 68 65 20 6f 66 66 | 73 65 74 73 20 66 6f 72 | the off|sets for|
|00000150| 0d 63 68 61 6e 6e 65 6c | 20 42 20 66 6f 72 20 72 |.channel| B for r|
|00000160| 65 66 65 72 65 6e 63 65 | 2e 09 09 09 09 09 09 09 |eference|........|
|00000170| 09 09 09 2a 29 0d 0d 0d | 46 52 4f 4d 09 54 65 72 |...*)...|FROM.Ter|
|00000180| 6d 69 6e 61 6c 09 49 4d | 50 4f 52 54 09 52 65 61 |minal.IM|PORT.Rea|
|00000190| 64 2c 57 72 69 74 65 2c | 57 72 69 74 65 4c 6e 2c |d,Write,|WriteLn,|
|000001a0| 0d 09 09 09 09 09 09 09 | 09 09 09 09 09 57 72 69 |........|.....Wri|
|000001b0| 74 65 53 74 72 69 6e 67 | 2c 43 6c 65 61 72 53 63 |teString|,ClearSc|
|000001c0| 72 65 65 6e 3b 0d 09 09 | 09 09 09 09 09 09 09 09 |reen;...|........|
|000001d0| 09 09 0d 46 52 4f 4d 09 | 49 6e 4f 75 74 09 09 09 |...FROM.|InOut...|
|000001e0| 49 4d 50 4f 52 54 09 52 | 65 61 64 49 6e 74 2c 57 |IMPORT.R|eadInt,W|
|000001f0| 72 69 74 65 48 65 78 3b | 09 09 09 09 09 09 09 09 |riteHex;|........|
|00000200| 09 09 09 09 09 09 09 0d | 0d 0d 09 43 4f 4e 53 54 |........|...CONST|
|00000210| 0d 09 09 28 2a 20 4f 66 | 66 73 65 74 73 20 69 6e |...(* Of|fsets in|
|00000220| 74 6f 20 53 43 43 20 72 | 65 67 69 73 74 65 72 73 |to SCC r|egisters|
|00000230| 20 2a 29 0d 09 09 61 44 | 61 74 61 09 09 3d 20 20 | *)...aD|ata..= |
|00000240| 36 3b 09 28 2a 20 41 20 | 63 68 61 6e 6e 65 6c 20 |6;.(* A |channel |
|00000250| 64 61 74 61 20 2a 29 0d | 09 09 61 43 74 6c 09 09 |data *).|..aCtl..|
|00000260| 3d 20 20 32 3b 09 28 2a | 20 41 20 63 68 61 6e 6e |= 2;.(*| A chann|
|00000270| 65 6c 20 63 6f 6e 74 72 | 6f 6c 20 2a 29 0d 09 09 |el contr|ol *)...|
|00000280| 62 44 61 74 61 09 09 3d | 20 20 34 3b 09 28 2a 20 |bData..=| 4;.(* |
|00000290| 42 20 63 68 61 6e 6e 65 | 6c 20 64 61 74 61 20 2a |B channe|l data *|
|000002a0| 29 0d 09 09 62 43 74 6c | 09 09 3d 20 20 30 3b 09 |)...bCtl|..= 0;.|
|000002b0| 28 2a 20 42 20 63 68 61 | 6e 6e 65 6c 20 63 6f 6e |(* B cha|nnel con|
|000002c0| 74 72 6f 6c 20 2a 29 0d | 09 09 63 6e 74 6c 5f 42 |trol *).|..cntl_B|
|000002d0| 09 3d 20 20 32 3b 09 28 | 2a 20 41 53 43 49 49 20 |.= 2;.(|* ASCII |
|000002e0| 76 61 6c 75 65 20 2a 29 | 0d 09 09 63 6e 74 6c 5f |value *)|...cntl_|
|000002f0| 43 09 3d 20 20 33 3b 09 | 28 2a 20 41 53 43 49 49 |C.= 3;.|(* ASCII|
|00000300| 20 76 61 6c 75 65 20 2a | 29 0d 09 09 4e 55 4c 4c | value *|)...NULL|
|00000310| 09 09 3d 20 20 30 3b 09 | 28 2a 20 41 53 43 49 49 |..= 0;.|(* ASCII|
|00000320| 20 76 61 6c 75 65 20 2a | 29 0d 09 09 0d 09 54 59 | value *|).....TY|
|00000330| 50 45 0d 09 09 53 65 72 | 50 74 72 09 3d 20 50 4f |PE...Ser|Ptr.= PO|
|00000340| 49 4e 54 45 52 20 54 4f | 20 41 52 52 41 59 20 5b |INTER TO| ARRAY [|
|00000350| 30 2e 2e 36 5d 20 4f 46 | 20 43 48 41 52 3b 0d 09 |0..6] OF| CHAR;..|
|00000360| 09 28 2a 20 4e 65 65 64 | 65 64 20 66 6f 72 20 62 |.(* Need|ed for b|
|00000370| 79 74 65 20 61 63 63 65 | 73 73 20 2a 29 0d 09 09 |yte acce|ss *)...|
|00000380| 0d 09 56 41 52 0d 09 09 | 53 43 43 52 64 20 5b 31 |..VAR...|SCCRd [1|
|00000390| 44 38 48 5d 3a 20 53 65 | 72 50 74 72 3b 09 28 2a |D8H]: Se|rPtr;.(*|
|000003a0| 20 52 65 61 64 20 70 6f | 69 6e 74 65 72 20 2a 29 | Read po|inter *)|
|000003b0| 09 0d 09 09 53 43 43 57 | 72 09 5b 31 44 43 48 5d |....SCCW|r.[1DCH]|
|000003c0| 3a 20 53 65 72 50 74 72 | 3b 09 28 2a 20 57 72 69 |: SerPtr|;.(* Wri|
|000003d0| 74 65 20 70 6f 69 6e 74 | 65 72 20 2a 29 0d 09 09 |te point|er *)...|
|000003e0| 63 68 3a 20 43 48 41 52 | 3b 0d 09 09 72 65 67 3a |ch: CHAR|;...reg:|
|000003f0| 20 49 4e 54 45 47 45 52 | 3b 0d 0d 0d 42 45 47 49 | INTEGER|;...BEGI|
|00000400| 4e 09 28 2a 20 53 43 43 | 48 61 63 6b 20 2a 29 0d |N.(* SCC|Hack *).|
|00000410| 09 43 6c 65 61 72 53 63 | 72 65 65 6e 3b 0d 09 63 |.ClearSc|reen;..c|
|00000420| 68 3a 3d 20 53 43 43 52 | 64 5e 5b 61 43 74 6c 5d |h:= SCCR|d^[aCtl]|
|00000430| 3b 09 09 28 2a 20 45 6e | 73 75 72 65 20 70 74 72 |;..(* En|sure ptr|
|00000440| 20 72 65 67 20 3d 20 30 | 20 2a 29 0d 09 0d 09 52 | reg = 0| *)....R|
|00000450| 45 50 45 41 54 0d 09 09 | 57 72 69 74 65 53 74 72 |EPEAT...|WriteStr|
|00000460| 69 6e 67 28 27 57 68 69 | 63 68 20 72 65 67 69 73 |ing('Whi|ch regis|
|00000470| 74 65 72 20 3f 20 27 29 | 3b 0d 09 09 52 65 61 64 |ter ? ')|;...Read|
|00000480| 49 6e 74 28 72 65 67 29 | 3b 0d 09 09 57 72 69 74 |Int(reg)|;...Writ|
|00000490| 65 4c 6e 3b 0d 09 09 53 | 43 43 57 72 5e 5b 61 43 |eLn;...S|CCWr^[aC|
|000004a0| 74 6c 5d 3a 3d 20 43 48 | 52 28 72 65 67 29 3b 09 |tl]:= CH|R(reg);.|
|000004b0| 09 28 2a 20 53 65 74 20 | 70 6f 69 6e 74 65 72 20 |.(* Set |pointer |
|000004c0| 2a 29 0d 09 09 0d 09 09 | 52 45 50 45 41 54 0d 09 |*)......|REPEAT..|
|000004d0| 09 09 57 72 69 74 65 53 | 74 72 69 6e 67 28 27 52 |..WriteS|tring('R|
|000004e0| 65 61 64 20 6f 72 20 57 | 72 69 74 65 3f 20 27 29 |ead or W|rite? ')|
|000004f0| 3b 0d 09 09 09 52 65 61 | 64 28 63 68 29 3b 0d 09 |;....Rea|d(ch);..|
|00000500| 09 09 57 72 69 74 65 28 | 63 68 29 3b 0d 09 09 09 |..Write(|ch);....|
|00000510| 57 72 69 74 65 4c 6e 0d | 09 09 55 4e 54 49 4c 20 |WriteLn.|..UNTIL |
|00000520| 28 43 41 50 28 63 68 29 | 20 3d 20 27 52 27 29 20 |(CAP(ch)| = 'R') |
|00000530| 4f 52 20 28 43 41 50 28 | 63 68 29 20 3d 20 27 57 |OR (CAP(|ch) = 'W|
|00000540| 27 29 3b 0d 09 09 0d 09 | 09 49 46 20 28 43 41 50 |');.....|.IF (CAP|
|00000550| 28 63 68 29 20 3d 20 27 | 52 27 29 20 54 48 45 4e |(ch) = '|R') THEN|
|00000560| 0d 09 09 09 63 68 3a 3d | 20 53 43 43 52 64 5e 5b |....ch:=| SCCRd^[|
|00000570| 61 43 74 6c 5d 3b 09 09 | 09 09 28 2a 20 52 65 61 |aCtl];..|..(* Rea|
|00000580| 64 20 72 65 67 69 73 74 | 65 72 20 2a 29 0d 09 09 |d regist|er *)...|
|00000590| 09 57 72 69 74 65 48 65 | 78 28 43 41 52 44 49 4e |.WriteHe|x(CARDIN|
|000005a0| 41 4c 28 63 68 29 2c 34 | 29 3b 09 28 2a 20 44 69 |AL(ch),4|);.(* Di|
|000005b0| 73 70 6c 61 79 20 69 6e | 20 68 65 78 20 2a 29 0d |splay in| hex *).|
|000005c0| 09 09 09 57 72 69 74 65 | 4c 6e 0d 09 09 45 4c 53 |...Write|Ln...ELS|
|000005d0| 45 09 0d 09 09 09 57 72 | 69 74 65 53 74 72 69 6e |E.....Wr|iteStrin|
|000005e0| 67 28 27 52 65 67 69 73 | 74 65 72 20 56 61 6c 75 |g('Regis|ter Valu|
|000005f0| 65 3f 20 27 29 3b 0d 09 | 09 09 52 65 61 64 49 6e |e? ');..|..ReadIn|
|00000600| 74 28 72 65 67 29 3b 09 | 09 09 28 2a 20 49 6e 74 |t(reg);.|..(* Int|
|00000610| 65 67 65 72 20 76 61 6c | 75 65 2c 20 6e 6f 74 20 |eger val|ue, not |
|00000620| 68 65 78 20 2a 29 0d 09 | 09 09 57 72 69 74 65 4c |hex *)..|..WriteL|
|00000630| 6e 3b 0d 09 09 09 57 72 | 69 74 65 53 74 72 69 6e |n;....Wr|iteStrin|
|00000640| 67 28 27 48 65 78 20 65 | 71 75 69 76 61 6c 65 6e |g('Hex e|quivalen|
|00000650| 74 20 3d 20 27 29 3b 0d | 09 09 09 57 72 69 74 65 |t = ');.|...Write|
|00000660| 48 65 78 28 43 41 52 44 | 49 4e 41 4c 28 72 65 67 |Hex(CARD|INAL(reg|
|00000670| 29 2c 34 29 3b 0d 09 09 | 09 57 72 69 74 65 4c 6e |),4);...|.WriteLn|
|00000680| 3b 0d 09 09 09 53 43 43 | 57 72 5e 5b 61 43 74 6c |;....SCC|Wr^[aCtl|
|00000690| 5d 3a 3d 20 43 48 52 28 | 72 65 67 29 09 28 2a 20 |]:= CHR(|reg).(* |
|000006a0| 57 72 69 74 65 20 74 6f | 20 72 65 67 69 73 74 65 |Write to| registe|
|000006b0| 72 20 2a 29 0d 09 09 45 | 4e 44 3b 0d 09 09 0d 09 |r *)...E|ND;.....|
|000006c0| 09 52 45 50 45 41 54 0d | 09 09 09 57 72 69 74 65 |.REPEAT.|...Write|
|000006d0| 53 74 72 69 6e 67 28 27 | 54 72 79 20 61 6e 6f 74 |String('|Try anot|
|000006e0| 68 65 72 3f 20 27 29 3b | 09 28 2a 20 46 75 6e 2c |her? ');|.(* Fun,|
|000006f0| 20 68 75 68 3f 20 2a 29 | 0d 09 09 09 52 65 61 64 | huh? *)|....Read|
|00000700| 28 63 68 29 3b 0d 09 09 | 09 57 72 69 74 65 28 63 |(ch);...|.Write(c|
|00000710| 68 29 3b 0d 09 09 09 57 | 72 69 74 65 4c 6e 0d 09 |h);....W|riteLn..|
|00000720| 09 55 4e 54 49 4c 20 28 | 43 41 50 28 63 68 29 20 |.UNTIL (|CAP(ch) |
|00000730| 3d 20 27 59 27 29 20 4f | 52 20 28 43 41 50 28 63 |= 'Y') O|R (CAP(c|
|00000740| 68 29 20 3d 20 27 4e 27 | 29 3b 0d 09 09 57 72 69 |h) = 'N'|);...Wri|
|00000750| 74 65 4c 6e 0d 09 55 4e | 54 49 4c 20 28 43 41 50 |teLn..UN|TIL (CAP|
|00000760| 28 63 68 29 20 3c 3e 20 | 27 59 27 29 0d 09 0d 45 |(ch) <> |'Y')...E|
|00000770| 4e 44 20 53 43 43 48 61 | 63 6b 2e 00 00 00 00 00 |ND SCCHa|ck......|
|00000780| 00 00 01 00 00 00 01 16 | 00 00 00 16 00 00 00 d4 |........|........|
|00000790| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;. | |
|000007a0| 20 20 20 20 20 20 72 65 | 66 43 6f 6e 3a 20 20 20 | re|fCon: |
|000007b0| 0b 53 43 43 48 61 63 6b | 2e 4d 4f 44 02 00 00 00 |.SCCHack|.MOD....|
|000007c0| 54 45 58 54 45 44 49 54 | 01 00 00 00 00 40 00 00 |TEXTEDIT|.....@..|
|000007d0| 00 00 54 45 58 54 45 44 | 49 54 01 00 00 00 00 40 |..TEXTED|IT.....@|
|000007e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007f0| 00 00 9a 09 44 03 00 00 | 06 fb 00 00 01 ea 55 52 |....D...|......UR|
|00000800| 45 20 48 69 64 65 57 69 | 6e 64 6f 77 20 20 20 20 |E HideWi|ndow |
|00000810| 28 74 68 65 57 69 6e 64 | 6f 77 3a 20 57 69 6e 64 |(theWind|ow: Wind|
|00000820| 6f 77 50 74 72 29 3b 0d | 43 4f 44 45 20 43 58 3b |owPtr);.|CODE CX;|
|00000830| 20 57 69 6e 64 6f 77 4d | 61 6e 61 67 65 72 4d 6f | WindowM|anagerMo|
|00000840| 64 4e 75 6d 3b 20 31 30 | 20 45 4e 44 20 48 69 64 |dNum; 10| END Hid|
|00000850| 65 57 69 6e 64 6f 77 3b | 0d 0d 50 52 4f 43 45 44 |eWindow;|..PROCED|
|00000860| 55 52 45 20 53 65 6c 65 | 63 74 57 69 6e 64 6f 77 |URE Sele|ctWindow|
|00000870| 20 20 28 74 68 65 57 69 | 6e 64 6f 77 3a 20 57 69 | (theWi|ndow: Wi|
|00000880| 00 00 00 0a 00 09 06 4d | 6f 6e 61 63 6f 4f 00 00 |.......M|onacoO..|
|00000890| 00 04 00 06 00 02 00 00 | 01 00 00 00 01 16 00 00 |........|........|
|000008a0| 00 16 00 00 00 d4 00 00 | cc 1c 00 7a 00 00 00 1c |........|...z....|
|000008b0| 00 46 00 01 45 46 4e 54 | 00 00 00 12 45 54 41 42 |.F..EFNT|....ETAB|
|000008c0| 00 00 00 1e 03 eb 00 00 | 00 00 00 00 00 01 68 b8 |........|......h.|
|000008d0| 03 ec 00 47 00 00 00 0e | 00 01 68 c8 46 4f 42 4a |...G....|..h.FOBJ|
|000008e0| ff ff ff ff 00 40 01 aa | 00 40 01 ac 00 40 01 ae |.....@..|.@...@..|
|000008f0| 00 40 01 b0 00 40 01 b2 | 00 40 01 b4 00 40 01 b6 |.@...@..|.@...@..|
|00000900| 00 40 01 b8 00 40 10 18 | 00 40 01 bc 00 40 01 be |.@...@..|.@...@..|
|00000910| 00 40 01 be 00 40 01 be | 00 40 01 be 00 40 01 be |.@...@..|.@...@..|
|00000920| 00 40 01 46 4f 42 4a ff | ff ff ff 00 40 01 aa 00 |.@.FOBJ.|....@...|
|00000930| 40 01 ac 00 40 01 ae 00 | 40 01 b0 00 40 01 b2 00 |@...@...|@...@...|
|00000940| 40 01 b4 00 40 01 b6 00 | 40 01 b8 00 40 10 18 00 |@...@...|@...@...|
|00000950| 40 01 bc 00 40 01 be 00 | 40 01 be 00 40 01 be 00 |@...@...|@...@...|
|00000960| 40 01 be 00 40 01 be 00 | 40 01 00 00 00 00 00 00 |@...@...|@.......|
|00000970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+