home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: SHell self-extracting ARchive
(archive/shar).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| SHell self-extracting ARchive (archive/shar)
| magic
| Supported |
100%
| dexvert
| Internet Message Format (text/imf)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news or mail, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/329 Shell Archive Format
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| message/rfc822
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 53 75 62 6a 65 63 74 3a | 20 53 6d 61 6c 6c 20 43 |Subject:| Small C|
|00000010| 20 63 6f 6d 70 69 6c 65 | 72 20 76 65 72 73 69 6f | compile|r versio|
|00000020| 6e 20 43 33 2e 30 52 31 | 2e 31 20 28 70 61 72 74 |n C3.0R1|.1 (part|
|00000030| 20 31 20 6f 66 20 33 29 | 0a 4e 65 77 73 67 72 6f | 1 of 3)|.Newsgro|
|00000040| 75 70 73 3a 20 6d 6f 64 | 2e 73 6f 75 72 63 65 73 |ups: mod|.sources|
|00000050| 0a 41 70 70 72 6f 76 65 | 64 3a 20 6a 70 6e 40 70 |.Approve|d: jpn@p|
|00000060| 61 6e 64 61 2e 55 55 43 | 50 0a 0a 4d 6f 64 2e 73 |anda.UUC|P..Mod.s|
|00000070| 6f 75 72 63 65 73 3a 20 | 20 56 6f 6c 75 6d 65 20 |ources: | Volume |
|00000080| 35 2c 20 49 73 73 75 65 | 20 37 0a 53 75 62 6d 69 |5, Issue| 7.Submi|
|00000090| 74 74 65 64 20 62 79 3a | 20 67 65 6e 72 61 64 21 |tted by:| genrad!|
|000000a0| 6c 69 6e 75 73 21 6d 6e | 65 74 6f 72 21 63 6c 65 |linus!mn|etor!cle|
|000000b0| 77 69 73 20 28 43 68 72 | 69 73 20 4c 65 77 69 73 |wis (Chr|is Lewis|
|000000c0| 29 0a 0a 54 68 65 72 65 | 27 76 65 20 62 65 65 6e |)..There|'ve been|
|000000d0| 20 71 75 69 74 65 20 61 | 20 66 65 77 20 72 65 71 | quite a| few req|
|000000e0| 75 65 73 74 73 20 66 6f | 72 20 74 68 69 73 20 76 |uests fo|r this v|
|000000f0| 69 61 20 6e 65 74 2e 6d | 69 63 72 6f 2e 63 70 6d |ia net.m|icro.cpm|
|00000100| 2c 20 73 6f 27 73 20 49 | 0a 74 68 6f 75 67 68 74 |, so's I|.thought|
|00000110| 20 49 27 64 20 70 6f 73 | 74 20 69 74 20 74 68 72 | I'd pos|t it thr|
|00000120| 75 20 6d 6f 64 2e 73 6f | 75 72 63 65 73 2e 20 20 |u mod.so|urces. |
|00000130| 54 68 69 73 20 69 73 20 | 52 6f 6e 20 43 61 69 6e |This is |Ron Cain|
|00000140| 27 73 20 6f 72 69 67 69 | 6e 61 6c 20 53 6d 61 6c |'s origi|nal Smal|
|00000150| 6c 0a 43 20 63 6f 6d 70 | 69 6c 65 72 2c 20 62 75 |l.C comp|iler, bu|
|00000160| 74 20 68 69 67 68 6c 79 | 20 65 78 74 65 6e 64 65 |t highly| extende|
|00000170| 64 2e 20 20 49 6e 63 6c | 75 64 65 64 20 61 72 65 |d. Incl|uded are|
|00000180| 20 63 6f 64 65 20 67 65 | 6e 65 72 61 74 6f 72 73 | code ge|nerators|
|00000190| 20 66 6f 72 20 38 30 38 | 30 2c 0a 36 38 30 39 2c | for 808|0,.6809,|
|000001a0| 20 36 38 30 30 30 2c 20 | 61 6e 64 20 56 41 58 2c | 68000, |and VAX,|
|000001b0| 20 61 73 20 77 65 6c 6c | 20 61 73 20 72 75 6e 2d | as well| as run-|
|000001c0| 74 69 6d 65 20 73 75 70 | 70 6f 72 74 20 66 6f 72 |time sup|port for|
|000001d0| 20 38 30 38 30 20 43 50 | 4d 2c 20 56 41 58 20 42 | 8080 CP|M, VAX B|
|000001e0| 53 44 34 2e 31 2c 0a 61 | 6e 64 20 61 20 46 4c 45 |SD4.1,.a|nd a FLE|
|000001f0| 58 20 36 38 30 39 20 65 | 6e 76 69 72 6f 6e 6d 65 |X 6809 e|nvironme|
|00000200| 6e 74 2e 20 20 53 65 65 | 20 74 68 65 20 52 45 41 |nt. See| the REA|
|00000210| 44 4d 45 20 66 6f 72 20 | 61 20 64 65 73 63 72 69 |DME for |a descri|
|00000220| 70 74 69 6f 6e 20 6f 66 | 20 53 6d 61 6c 6c 20 43 |ption of| Small C|
|00000230| 27 73 0a 6c 69 6d 69 74 | 61 74 69 6f 6e 73 2e 0a |'s.limit|ations..|
|00000240| 0a 23 21 20 2f 62 69 6e | 2f 73 68 0a 23 20 54 68 |.#! /bin|/sh.# Th|
|00000250| 69 73 20 69 73 20 61 20 | 73 68 65 6c 6c 20 61 72 |is is a |shell ar|
|00000260| 63 68 69 76 65 2c 20 6d | 65 61 6e 69 6e 67 3a 0a |chive, m|eaning:.|
|00000270| 23 20 31 2e 20 52 65 6d | 6f 76 65 20 65 76 65 72 |# 1. Rem|ove ever|
|00000280| 79 74 68 69 6e 67 20 61 | 62 6f 76 65 20 74 68 65 |ything a|bove the|
|00000290| 20 23 21 20 2f 62 69 6e | 2f 73 68 20 6c 69 6e 65 | #! /bin|/sh line|
|000002a0| 2e 0a 23 20 32 2e 20 53 | 61 76 65 20 74 68 65 20 |..# 2. S|ave the |
|000002b0| 72 65 73 75 6c 74 69 6e | 67 20 74 65 78 74 20 69 |resultin|g text i|
|000002c0| 6e 20 61 20 66 69 6c 65 | 2e 0a 23 20 33 2e 20 45 |n a file|..# 3. E|
|000002d0| 78 65 63 75 74 65 20 74 | 68 65 20 66 69 6c 65 20 |xecute t|he file |
|000002e0| 77 69 74 68 20 2f 62 69 | 6e 2f 73 68 20 28 6e 6f |with /bi|n/sh (no|
|000002f0| 74 20 63 73 68 29 20 74 | 6f 20 63 72 65 61 74 65 |t csh) t|o create|
|00000300| 20 74 68 65 20 66 69 6c | 65 73 3a 0a 23 09 52 45 | the fil|es:.#.RE|
|00000310| 41 44 4d 45 0a 23 09 4d | 5f 52 45 41 44 4d 45 0a |ADME.#.M|_README.|
|00000320| 23 09 4d 61 6b 65 66 69 | 6c 65 0a 23 09 4d 61 6b |#.Makefi|le.#.Mak|
|00000330| 65 66 69 6c 65 2e 62 73 | 64 0a 23 09 63 6f 64 65 |efile.bs|d.#.code|
|00000340| 38 30 38 30 2e 63 0a 23 | 09 63 6f 64 65 61 73 30 |8080.c.#|.codeas0|
|00000350| 39 2e 63 0a 23 09 63 6f | 64 65 6d 36 38 6b 2e 63 |9.c.#.co|dem68k.c|
|00000360| 0a 23 09 63 6f 64 65 76 | 61 78 2e 63 0a 23 09 64 |.#.codev|ax.c.#.d|
|00000370| 61 74 61 2e 63 0a 23 09 | 64 61 74 61 2e 68 0a 23 |ata.c.#.|data.h.#|
|00000380| 20 54 68 69 73 20 61 72 | 63 68 69 76 65 20 63 72 | This ar|chive cr|
|00000390| 65 61 74 65 64 3a 20 53 | 75 6e 20 4d 61 79 20 31 |eated: S|un May 1|
|000003a0| 38 20 31 38 3a 32 38 3a | 34 32 20 31 39 38 36 0a |8 18:28:|42 1986.|
|000003b0| 65 78 70 6f 72 74 20 50 | 41 54 48 3b 20 50 41 54 |export P|ATH; PAT|
|000003c0| 48 3d 2f 62 69 6e 3a 24 | 50 41 54 48 0a 65 63 68 |H=/bin:$|PATH.ech|
|000003d0| 6f 20 73 68 61 72 3a 20 | 65 78 74 72 61 63 74 69 |o shar: |extracti|
|000003e0| 6e 67 20 22 27 52 45 41 | 44 4d 45 27 22 20 27 28 |ng "'REA|DME'" '(|
|000003f0| 32 39 35 39 20 63 68 61 | 72 61 63 74 65 72 73 29 |2959 cha|racters)|
|00000400| 27 0a 69 66 20 74 65 73 | 74 20 2d 66 20 27 52 45 |'.if tes|t -f 'RE|
|00000410| 41 44 4d 45 27 0a 74 68 | 65 6e 0a 09 65 63 68 6f |ADME'.th|en..echo|
|00000420| 20 73 68 61 72 3a 20 77 | 69 6c 6c 20 6e 6f 74 20 | shar: w|ill not |
|00000430| 6f 76 65 72 2d 77 72 69 | 74 65 20 65 78 69 73 74 |over-wri|te exist|
|00000440| 69 6e 67 20 66 69 6c 65 | 20 22 27 52 45 41 44 4d |ing file| "'READM|
|00000450| 45 27 22 0a 65 6c 73 65 | 0a 63 61 74 20 3c 3c 20 |E'".else|.cat << |
|00000460| 5c 53 48 41 52 5f 45 4f | 46 20 3e 20 27 52 45 41 |\SHAR_EO|F > 'REA|
|00000470| 44 4d 45 27 0a 09 09 09 | 53 6d 61 6c 6c 20 43 20 |DME'....|Small C |
|00000480| 76 65 72 73 69 6f 6e 20 | 43 33 2e 30 52 31 2e 31 |version |C3.0R1.1|
|00000490| 0a 09 09 09 20 20 20 20 | 20 20 28 53 43 43 33 29 |.... | (SCC3)|
|000004a0| 0a 0a 09 09 09 20 20 20 | 20 43 68 72 69 73 20 4c |..... | Chris L|
|000004b0| 65 77 69 73 0a 0a 54 68 | 69 73 20 64 69 72 65 63 |ewis..Th|is direc|
|000004c0| 74 6f 72 79 20 63 6f 6e | 74 61 69 6e 73 20 74 68 |tory con|tains th|
|000004d0| 65 20 73 6f 75 72 63 65 | 20 66 6f 72 20 61 20 76 |e source| for a v|
|000004e0| 65 72 73 69 6f 6e 20 6f | 66 20 52 6f 6e 20 43 61 |ersion o|f Ron Ca|
|000004f0| 69 6e 27 73 20 53 6d 61 | 6c 6c 20 43 20 0a 63 6f |in's Sma|ll C .co|
|00000500| 6d 70 69 6c 65 72 20 74 | 68 61 74 20 49 20 68 61 |mpiler t|hat I ha|
|00000510| 76 65 20 68 65 61 76 69 | 6c 79 20 6d 6f 64 69 66 |ve heavi|ly modif|
|00000520| 69 65 64 20 2d 20 62 65 | 79 6f 6e 64 20 74 68 65 |ied - be|yond the|
|00000530| 20 53 6d 61 6c 6c 2d 43 | 20 56 32 2e 30 20 6c 61 | Small-C| V2.0 la|
|00000540| 74 65 72 0a 70 75 62 6c | 69 73 68 65 64 20 69 6e |ter.publ|ished in|
|00000550| 20 44 72 2e 20 44 6f 62 | 62 73 2e 20 20 54 68 69 | Dr. Dob|bs. Thi|
|00000560| 73 20 63 6f 6d 70 69 6c | 65 72 20 67 65 6e 65 72 |s compil|er gener|
|00000570| 61 74 65 73 20 61 73 73 | 65 6d 62 6c 65 72 20 73 |ates ass|embler s|
|00000580| 6f 75 72 63 65 20 63 6f | 64 65 20 74 68 61 74 0a |ource co|de that.|
|00000590| 6e 65 65 64 73 20 74 6f | 20 62 65 20 61 73 73 65 |needs to| be asse|
|000005a0| 6d 62 6c 65 64 20 61 6e | 64 20 6c 69 6e 6b 65 64 |mbled an|d linked|
|000005b0| 20 74 6f 20 6d 61 6b 65 | 20 61 20 72 75 6e 6e 69 | to make| a runni|
|000005c0| 6e 67 20 70 72 6f 67 72 | 61 6d 2e 0a 0a 53 6d 61 |ng progr|am...Sma|
|000005d0| 6c 6c 20 43 20 69 73 20 | 61 20 70 75 62 6c 69 63 |ll C is |a public|
|000005e0| 20 64 6f 6d 61 69 6e 20 | 63 6f 6d 70 69 6c 65 72 | domain |compiler|
|000005f0| 20 66 6f 72 20 61 20 73 | 75 62 73 65 74 20 6f 66 | for a s|ubset of|
|00000600| 20 43 2e 20 20 54 68 65 | 20 6d 61 69 6e 20 74 68 | C. The| main th|
|00000610| 69 6e 67 73 0a 6c 61 63 | 6b 69 6e 67 20 61 72 65 |ings.lac|king are|
|00000620| 20 22 23 69 66 22 2c 20 | 73 74 72 75 63 74 73 2f | "#if", |structs/|
|00000630| 75 6e 69 6f 6e 73 2c 20 | 64 6f 75 62 6c 65 73 2f |unions, |doubles/|
|00000640| 66 6c 6f 61 74 73 2f 6c | 6f 6e 67 73 20 61 6e 64 |floats/l|ongs and|
|00000650| 20 6d 6f 72 65 20 74 68 | 61 6e 0a 6f 6e 65 20 6c | more th|an.one l|
|00000660| 65 76 65 6c 20 6f 66 20 | 69 6e 64 69 72 65 63 74 |evel of |indirect|
|00000670| 69 6f 6e 2e 20 20 45 76 | 65 6e 20 73 6f 2c 20 69 |ion. Ev|en so, i|
|00000680| 74 27 73 20 70 6f 77 65 | 72 66 75 6c 20 65 6e 6f |t's powe|rful eno|
|00000690| 75 67 68 20 74 6f 20 62 | 65 20 61 62 6c 65 20 74 |ugh to b|e able t|
|000006a0| 6f 0a 63 6f 6d 70 69 6c | 65 20 69 74 73 65 6c 66 |o.compil|e itself|
|000006b0| 2e 20 20 49 74 27 73 20 | 61 6c 73 6f 20 6c 6f 74 |. It's |also lot|
|000006c0| 73 20 6f 66 20 66 75 6e | 20 74 6f 20 70 6c 61 79 |s of fun| to play|
|000006d0| 20 61 72 6f 75 6e 64 20 | 77 69 74 68 2e 20 20 49 | around |with. I|
|000006e0| 74 20 63 6f 75 6c 64 0a | 75 73 65 20 6c 6f 74 73 |t could.|use lots|
|000006f0| 20 6f 66 20 6d 6f 72 65 | 20 77 6f 72 6b 20 28 65 | of more| work (e|
|00000700| 67 3a 20 61 20 72 65 61 | 6c 20 73 63 61 6e 6e 65 |g: a rea|l scanne|
|00000710| 72 29 2c 20 62 75 74 20 | 77 68 61 74 20 74 68 65 |r), but |what the|
|00000720| 20 68 65 63 6b 2e 2e 2e | 0a 52 65 74 61 72 67 65 | heck...|.Retarge|
|00000730| 74 74 69 6e 67 20 74 68 | 65 20 63 6f 6d 70 69 6c |tting th|e compil|
|00000740| 65 72 20 72 65 71 75 69 | 72 65 73 20 6f 6e 6c 79 |er requi|res only|
|00000750| 20 72 65 6c 69 6e 6b 69 | 6e 67 20 74 68 65 20 66 | relinki|ng the f|
|00000760| 72 6f 6e 74 65 6e 64 20 | 77 69 74 68 20 61 20 6e |rontend |with a n|
|00000770| 65 77 0a 63 6f 64 65 20 | 67 65 6e 65 72 61 74 6f |ew.code |generato|
|00000780| 72 2e 0a 0a 43 6f 64 65 | 20 67 65 6e 65 72 61 74 |r...Code| generat|
|00000790| 6f 72 73 20 66 6f 72 20 | 36 38 30 39 20 28 4d 49 |ors for |6809 (MI|
|000007a0| 54 20 55 4e 49 58 2d 6c | 69 6b 65 20 61 73 73 65 |T UNIX-l|ike asse|
|000007b0| 6d 62 6c 65 72 29 2c 20 | 4d 36 38 4b 20 28 4d 6f |mbler), |M68K (Mo|
|000007c0| 74 6f 72 6f 6c 61 20 56 | 2f 36 38 20 55 4e 49 58 |torola V|/68 UNIX|
|000007d0| 0a 61 73 73 65 6d 62 6c | 65 72 29 2c 20 56 41 58 |.assembl|er), VAX|
|000007e0| 20 28 42 53 44 20 34 2e | 31 20 61 73 73 65 6d 62 | (BSD 4.|1 assemb|
|000007f0| 6c 65 72 29 2c 20 61 6e | 64 20 38 30 38 30 20 28 |ler), an|d 8080 (|
|00000800| 52 4d 41 43 20 61 73 73 | 65 6d 62 6c 65 72 29 20 |RMAC ass|embler) |
|00000810| 61 72 65 20 70 72 6f 76 | 69 64 65 64 2e 0a 0a 55 |are prov|ided...U|
|00000820| 73 65 72 73 20 68 61 76 | 69 6e 67 20 61 63 63 65 |sers hav|ing acce|
|00000830| 73 73 20 74 6f 20 53 79 | 73 74 65 6d 20 56 20 6d |ss to Sy|stem V m|
|00000840| 61 6b 65 20 73 68 6f 75 | 6c 64 20 62 65 20 61 62 |ake shou|ld be ab|
|00000850| 6c 65 20 74 6f 20 75 73 | 65 20 74 68 65 20 4d 61 |le to us|e the Ma|
|00000860| 6b 65 66 69 6c 65 20 0a | 77 69 74 68 6f 75 74 20 |kefile .|without |
|00000870| 61 6e 79 20 6d 6f 64 69 | 66 69 63 61 74 69 6f 6e |any modi|fication|
|00000880| 20 65 78 63 65 70 74 20 | 66 6f 72 20 49 4e 43 44 | except |for INCD|
|00000890| 49 52 20 61 6e 64 20 4c | 49 42 44 49 52 20 28 77 |IR and L|IBDIR (w|
|000008a0| 68 65 72 65 20 79 6f 75 | 27 64 20 6c 69 6b 65 20 |here you|'d like |
|000008b0| 0a 74 6f 20 70 75 74 20 | 74 68 65 20 63 6f 6d 70 |.to put |the comp|
|000008c0| 69 6c 65 72 20 69 74 73 | 65 6c 66 29 2e 0a 0a 55 |iler its|elf)...U|
|000008d0| 73 65 72 73 20 6e 6f 74 | 20 68 61 76 69 6e 67 20 |sers not| having |
|000008e0| 61 63 63 65 73 73 20 74 | 6f 20 53 79 73 74 65 6d |access t|o System|
|000008f0| 20 56 20 77 69 6c 6c 20 | 70 72 6f 62 61 62 6c 79 | V will |probably|
|00000900| 20 68 61 76 65 20 74 6f | 20 72 65 77 72 69 74 65 | have to| rewrite|
|00000910| 20 74 68 65 20 4d 61 6b | 65 66 69 6c 65 2e 0a 5b | the Mak|efile..[|
|00000920| 20 49 20 68 61 76 65 20 | 70 72 6f 76 69 64 65 64 | I have |provided|
|00000930| 20 61 20 4d 61 6b 65 66 | 69 6c 65 20 74 68 61 74 | a Makef|ile that|
|00000940| 20 73 65 65 6d 73 20 74 | 6f 20 77 6f 72 6b 20 77 | seems t|o work w|
|00000950| 69 74 68 20 62 73 64 20 | 73 79 73 74 65 6d 73 20 |ith bsd |systems |
|00000960| 2d 20 6d 6f 64 5d 0a 0a | 57 41 52 4e 49 4e 47 3a |- mod]..|WARNING:|
|00000970| 20 79 6f 75 20 77 69 6c | 6c 20 70 72 6f 62 61 62 | you wil|l probab|
|00000980| 6c 79 20 73 65 65 20 61 | 20 67 72 65 61 74 20 64 |ly see a| great d|
|00000990| 65 61 6c 20 6f 66 20 63 | 6f 6d 70 69 6c 61 74 69 |eal of c|ompilati|
|000009a0| 6f 6e 20 77 61 72 6e 69 | 6e 67 73 20 77 68 65 6e |on warni|ngs when|
|000009b0| 0a 79 6f 75 20 63 6f 6d | 70 69 6c 65 20 74 68 69 |.you com|pile thi|
|000009c0| 73 20 63 6f 6d 70 69 6c | 65 72 20 77 69 74 68 20 |s compil|er with |
|000009d0| 61 20 22 72 65 61 6c 22 | 20 55 4e 49 58 20 43 2e |a "real"| UNIX C.|
|000009e0| 20 20 44 6f 6e 27 74 20 | 77 6f 72 72 79 20 2d 20 | Don't |worry - |
|000009f0| 74 68 69 73 20 69 73 0a | 2a 70 65 72 66 65 63 74 |this is.|*perfect|
|00000a00| 6c 79 2a 20 6e 6f 72 6d | 61 6c 20 2d 20 53 6d 61 |ly* norm|al - Sma|
|00000a10| 6c 6c 20 43 20 69 73 20 | 61 20 73 75 62 73 65 74 |ll C is |a subset|
|00000a20| 20 6f 66 20 72 65 61 6c | 20 43 2c 20 61 6e 64 20 | of real| C, and |
|00000a30| 69 6e 20 6f 72 64 65 72 | 20 74 6f 0a 6b 65 65 70 |in order| to.keep|
|00000a40| 20 74 68 65 20 63 6f 6d | 70 69 6c 65 72 20 69 6e | the com|piler in|
|00000a50| 20 74 68 69 73 20 73 75 | 62 73 65 74 20 79 6f 75 | this su|bset you|
|00000a60| 20 68 61 76 65 20 74 6f | 20 62 65 6e 64 20 74 68 | have to| bend th|
|00000a70| 65 20 72 75 6c 65 73 20 | 73 6f 6d 65 77 68 61 74 |e rules |somewhat|
|00000a80| 2e 0a 54 68 65 20 6f 6e | 6c 79 20 74 69 6d 65 20 |..The on|ly time |
|00000a90| 77 68 65 72 65 20 74 68 | 69 73 20 6d 69 67 68 74 |where th|is might|
|00000aa0| 20 63 61 75 73 65 20 61 | 20 70 72 6f 62 6c 65 6d | cause a| problem|
|00000ab0| 20 69 73 20 77 68 65 72 | 65 20 70 6f 69 6e 74 65 | is wher|e pointe|
|00000ac0| 72 73 20 61 72 65 0a 22 | 64 69 66 66 65 72 65 6e |rs are."|differen|
|00000ad0| 74 22 20 66 72 6f 6d 20 | 69 6e 74 73 20 28 69 65 |t" from |ints (ie|
|00000ae0| 3a 20 64 69 66 66 65 72 | 65 6e 74 20 6c 65 6e 67 |: differ|ent leng|
|00000af0| 74 68 20 6f 72 20 6f 6e | 20 6e 6f 6e 2d 62 79 74 |th or on| non-byt|
|00000b00| 65 2d 61 64 64 72 65 73 | 73 69 62 6c 65 0a 6d 61 |e-addres|sible.ma|
|00000b10| 63 68 69 6e 65 73 29 2e | 20 20 53 6d 61 6c 6c 20 |chines).| Small |
|00000b20| 43 20 61 73 73 75 6d 65 | 73 20 74 68 61 74 20 69 |C assume|s that i|
|00000b30| 6e 74 73 20 61 72 65 20 | 74 68 65 20 73 61 6d 65 |nts are |the same|
|00000b40| 20 61 73 20 70 6f 69 6e | 74 65 72 73 2e 0a 0a 49 | as poin|ters...I|
|00000b50| 6e 76 6f 63 61 74 69 6f | 6e 3a 0a 09 73 63 63 3c |nvocatio|n:..scc<|
|00000b60| 36 38 30 39 7c 76 61 78 | 7c 6d 36 38 6b 7c 38 30 |6809|vax||m68k|80|
|00000b70| 38 30 3e 20 66 69 6c 65 | 6e 61 6d 65 0a 0a 54 68 |80> file|name..Th|
|00000b80| 65 72 65 20 61 72 65 20 | 6f 74 68 65 72 20 6f 70 |ere are |other op|
|00000b90| 74 69 6f 6e 73 20 61 76 | 61 69 6c 61 62 6c 65 20 |tions av|ailable |
|00000ba0| 2d 20 73 65 65 20 6d 61 | 69 6e 2e 63 20 66 6f 72 |- see ma|in.c for|
|00000bb0| 20 64 65 74 61 69 6c 73 | 2e 0a 0a 54 68 65 20 63 | details|...The c|
|00000bc0| 6f 64 65 20 67 65 6e 65 | 72 61 74 65 64 20 62 79 |ode gene|rated by|
|00000bd0| 20 74 68 65 73 65 20 63 | 6f 6d 70 69 6c 65 72 73 | these c|ompilers|
|00000be0| 20 6e 65 65 64 20 61 20 | 72 75 6e 2d 74 69 6d 65 | need a |run-time|
|00000bf0| 20 73 75 70 70 6f 72 74 | 20 6c 69 62 72 61 72 79 | support| library|
|00000c00| 0a 66 6f 72 20 74 77 6f | 20 74 68 69 6e 67 73 3a |.for two| things:|
|00000c10| 20 6f 70 65 72 61 74 69 | 6f 6e 73 20 74 68 61 74 | operati|ons that|
|00000c20| 20 61 72 65 20 22 68 61 | 72 64 22 20 6f 6e 20 61 | are "ha|rd" on a|
|00000c30| 20 70 61 72 74 69 63 75 | 6c 61 72 20 70 72 6f 63 | particu|lar proc|
|00000c40| 65 73 73 6f 72 0a 28 65 | 67 3a 20 31 36 20 62 69 |essor.(e|g: 16 bi|
|00000c50| 74 20 6d 75 6c 74 69 70 | 6c 79 20 6f 6e 20 61 6e |t multip|ly on an|
|00000c60| 20 38 30 38 30 29 2c 20 | 6f 72 20 4f 2f 53 20 69 | 8080), |or O/S i|
|00000c70| 6e 74 65 72 66 61 63 65 | 20 28 76 61 78 20 69 73 |nterface| (vax is|
|00000c80| 20 42 53 44 20 34 2e 31 | 2c 0a 36 38 30 39 20 69 | BSD 4.1|,.6809 i|
|00000c90| 73 20 46 4c 45 58 2c 20 | 38 30 38 30 20 69 73 20 |s FLEX, |8080 is |
|00000ca0| 43 50 4d 2c 20 6e 65 76 | 65 72 20 68 61 64 20 6f |CPM, nev|er had o|
|00000cb0| 6e 65 20 66 6f 72 20 4d | 36 38 6b 29 2e 0a 0a 53 |ne for M|68k)...S|
|00000cc0| 74 61 74 75 73 3a 20 74 | 68 65 20 36 38 30 39 2c |tatus: t|he 6809,|
|00000cd0| 20 56 41 58 20 61 6e 64 | 20 38 30 38 30 20 76 65 | VAX and| 8080 ve|
|00000ce0| 72 73 69 6f 6e 73 20 77 | 6f 72 6b 20 6c 61 73 74 |rsions w|ork last|
|00000cf0| 20 49 20 63 68 65 63 6b | 65 64 20 2d 20 61 20 70 | I check|ed - a p|
|00000d00| 72 6f 62 6c 65 6d 20 6f | 72 0a 74 77 6f 20 6d 61 |roblem o|r.two ma|
|00000d10| 79 20 68 61 76 65 20 63 | 72 65 70 74 20 69 6e 20 |y have c|rept in |
|00000d20| 64 75 72 69 6e 67 20 74 | 68 65 20 69 6d 70 6c 65 |during t|he imple|
|00000d30| 6d 65 6e 74 61 74 69 6f | 6e 20 6f 66 20 74 68 65 |mentatio|n of the|
|00000d40| 20 63 6f 6d 70 69 6c 65 | 2f 61 73 73 65 6d 62 6c | compile|/assembl|
|00000d50| 65 2f 61 6e 64 0a 6c 69 | 6e 6b 20 63 6f 64 65 20 |e/and.li|nk code |
|00000d60| 66 6f 72 20 6d 61 63 68 | 69 6e 65 73 20 74 68 61 |for mach|ines tha|
|00000d70| 74 20 73 75 70 70 6f 72 | 74 20 69 74 2e 20 20 54 |t suppor|t it. T|
|00000d80| 68 65 20 4d 36 38 6b 20 | 76 65 72 73 69 6f 6e 20 |he M68k |version |
|00000d90| 68 61 73 20 6e 65 76 65 | 72 20 62 65 65 6e 0a 74 |has neve|r been.t|
|00000da0| 65 73 74 65 64 2e 20 20 | 49 20 64 6f 6e 27 74 20 |ested. |I don't |
|00000db0| 68 61 76 65 20 61 20 50 | 79 72 61 6d 69 64 20 76 |have a P|yramid v|
|00000dc0| 65 72 73 69 6f 6e 20 62 | 65 63 61 75 73 65 20 50 |ersion b|ecause P|
|00000dd0| 79 72 63 6f 72 70 20 73 | 65 65 6d 73 20 72 65 6c |yrcorp s|eems rel|
|00000de0| 75 63 74 61 6e 74 0a 74 | 6f 20 70 75 62 6c 69 73 |uctant.t|o publis|
|00000df0| 68 20 69 6e 73 74 72 75 | 63 74 69 6f 6e 20 73 65 |h instru|ction se|
|00000e00| 74 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 2e 0a 0a |t inform|ation...|
|00000e10| 53 6f 20 79 6f 75 20 77 | 61 6e 74 20 74 6f 20 77 |So you w|ant to w|
|00000e20| 72 69 74 65 20 61 20 6e | 65 77 20 63 6f 64 65 72 |rite a n|ew coder|
|00000e30| 20 64 6f 20 79 6f 75 3f | 20 20 57 65 6c 6c 2c 20 | do you?| Well, |
|00000e40| 69 74 27 73 20 65 61 73 | 79 20 2d 20 72 65 61 64 |it's eas|y - read|
|00000e50| 20 74 68 65 0a 63 6f 6d | 6d 65 6e 74 73 20 69 6e | the.com|ments in|
|00000e60| 20 6f 6e 65 20 6f 66 20 | 74 68 65 20 63 6f 64 65 | one of |the code|
|00000e70| 72 73 2e 20 20 59 6f 75 | 20 73 68 6f 75 6c 64 20 |rs. You| should |
|00000e80| 6e 6f 74 20 68 61 76 65 | 20 74 6f 20 6d 6f 64 69 |not have| to modi|
|00000e90| 66 79 20 2a 61 6e 79 2a | 20 6f 66 0a 74 68 65 20 |fy *any*| of.the |
|00000ea0| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 73 2c 20 |existing| files, |
|00000eb0| 6a 75 73 74 20 77 72 69 | 74 65 20 61 20 6e 65 77 |just wri|te a new|
|00000ec0| 20 63 6f 64 65 78 78 78 | 2e 63 20 66 69 6c 65 2e | codexxx|.c file.|
|00000ed0| 20 20 50 6c 65 61 73 65 | 20 63 6f 6e 74 61 63 74 | Please| contact|
|00000ee0| 0a 6d 65 20 69 66 20 79 | 6f 75 20 72 75 6e 20 69 |.me if y|ou run i|
|00000ef0| 6e 74 6f 20 74 72 6f 75 | 62 6c 65 2e 20 20 49 20 |nto trou|ble. I |
|00000f00| 77 6f 75 6c 64 20 62 65 | 20 67 72 65 61 74 6c 79 |would be| greatly|
|00000f10| 20 69 6e 74 65 72 65 73 | 74 65 64 20 69 6e 20 61 | interes|ted in a|
|00000f20| 6e 79 20 6e 65 77 0a 63 | 6f 64 65 72 73 20 6f 72 |ny new.c|oders or|
|00000f30| 20 62 75 67 20 72 65 70 | 6f 72 74 73 20 69 6e 20 | bug rep|orts in |
|00000f40| 74 68 65 20 63 6f 6d 70 | 69 6c 65 72 73 2e 20 20 |the comp|ilers. |
|00000f50| 41 73 20 66 61 72 20 61 | 73 20 49 20 61 6d 20 61 |As far a|s I am a|
|00000f60| 77 61 72 65 2c 20 74 68 | 65 0a 6d 61 6a 6f 72 20 |ware, th|e.major |
|00000f70| 72 65 73 74 72 69 63 74 | 69 6f 6e 20 6f 6e 20 70 |restrict|ion on p|
|00000f80| 6f 72 74 69 6e 67 20 74 | 68 69 73 20 74 68 69 6e |orting t|his thin|
|00000f90| 67 20 66 6f 72 20 64 69 | 66 66 65 72 65 6e 74 20 |g for di|fferent |
|00000fa0| 74 61 72 67 65 74 73 20 | 69 73 20 74 68 61 74 0a |targets |is that.|
|00000fb0| 70 6f 69 6e 74 65 72 73 | 20 61 6e 64 20 69 6e 74 |pointers| and int|
|00000fc0| 65 67 65 72 73 20 2a 6d | 75 73 74 2a 20 62 65 20 |egers *m|ust* be |
|00000fd0| 74 68 65 20 73 61 6d 65 | 20 6c 65 6e 67 74 68 2c |the same| length,|
|00000fe0| 20 61 6c 69 67 6e 6d 65 | 6e 74 2c 20 61 6e 64 20 | alignme|nt, and |
|00000ff0| 62 65 0a 69 6e 74 65 72 | 63 68 61 6e 67 65 61 62 |be.inter|changeab|
|00001000| 6c 65 2e 0a 53 48 41 52 | 5f 45 4f 46 0a 69 66 20 |le..SHAR|_EOF.if |
|00001010| 74 65 73 74 20 32 39 35 | 39 20 2d 6e 65 20 22 60 |test 295|9 -ne "`|
|00001020| 77 63 20 2d 63 20 3c 20 | 27 52 45 41 44 4d 45 27 |wc -c < |'README'|
|00001030| 60 22 0a 74 68 65 6e 0a | 09 65 63 68 6f 20 73 68 |`".then.|.echo sh|
|00001040| 61 72 3a 20 65 72 72 6f | 72 20 74 72 61 6e 73 6d |ar: erro|r transm|
|00001050| 69 74 74 69 6e 67 20 22 | 27 52 45 41 44 4d 45 27 |itting "|'README'|
|00001060| 22 20 27 28 73 68 6f 75 | 6c 64 20 68 61 76 65 20 |" '(shou|ld have |
|00001070| 62 65 65 6e 20 32 39 35 | 39 20 63 68 61 72 61 63 |been 295|9 charac|
|00001080| 74 65 72 73 29 27 0a 66 | 69 0a 66 69 0a 65 63 68 |ters)'.f|i.fi.ech|
|00001090| 6f 20 73 68 61 72 3a 20 | 65 78 74 72 61 63 74 69 |o shar: |extracti|
|000010a0| 6e 67 20 22 27 4d 5f 52 | 45 41 44 4d 45 27 22 20 |ng "'M_R|EADME'" |
|000010b0| 27 28 35 35 30 20 63 68 | 61 72 61 63 74 65 72 73 |'(550 ch|aracters|
|000010c0| 29 27 0a 69 66 20 74 65 | 73 74 20 2d 66 20 27 4d |)'.if te|st -f 'M|
|000010d0| 5f 52 45 41 44 4d 45 27 | 0a 74 68 65 6e 0a 09 65 |_README'|.then..e|
|000010e0| 63 68 6f 20 73 68 61 72 | 3a 20 77 69 6c 6c 20 6e |cho shar|: will n|
|000010f0| 6f 74 20 6f 76 65 72 2d | 77 72 69 74 65 20 65 78 |ot over-|write ex|
|00001100| 69 73 74 69 6e 67 20 66 | 69 6c 65 20 22 27 4d 5f |isting f|ile "'M_|
|00001110| 52 45 41 44 4d 45 27 22 | 0a 65 6c 73 65 0a 63 61 |README'"|.else.ca|
|00001120| 74 20 3c 3c 20 5c 53 48 | 41 52 5f 45 4f 46 20 3e |t << \SH|AR_EOF >|
|00001130| 20 27 4d 5f 52 45 41 44 | 4d 45 27 0a 09 09 2a 2a | 'M_READ|ME'...**|
|00001140| 2a 20 20 4d 6f 64 65 72 | 61 74 6f 72 27 73 20 52 |* Moder|ator's R|
|00001150| 45 41 44 4d 45 20 2a 2a | 2a 0a 0a 54 68 69 73 20 |EADME **|*..This |
|00001160| 64 69 72 65 63 74 6f 72 | 79 20 63 6f 6e 74 61 69 |director|y contai|
|00001170| 6e 73 20 74 68 65 20 62 | 61 73 65 20 73 6f 75 72 |ns the b|ase sour|
|00001180| 63 65 20 63 6f 64 65 20 | 66 6f 72 20 74 68 65 20 |ce code |for the |
|00001190| 73 6d 61 6c 6c 43 20 63 | 6f 6d 70 69 6c 65 72 0a |smallC c|ompiler.|
|000011a0| 28 61 63 74 75 61 6c 6c | 79 20 74 68 72 65 65 20 |(actuall|y three |
|000011b0| 76 65 72 73 69 6f 6e 73 | 3a 20 20 74 68 65 20 38 |versions|: the 8|
|000011c0| 30 38 30 2c 20 36 38 30 | 39 20 61 6e 64 20 76 61 |080, 680|9 and va|
|000011d0| 78 20 63 6f 64 65 20 67 | 65 6e 65 72 61 74 6f 72 |x code g|enerator|
|000011e0| 73 20 61 72 65 0a 68 65 | 72 65 20 61 6c 73 6f 2e |s are.he|re also.|
|000011f0| 29 0a 0a 54 68 65 20 22 | 69 6e 63 6c 75 64 65 73 |)..The "|includes|
|00001200| 22 20 64 69 72 65 63 74 | 6f 72 79 20 63 6f 6e 74 |" direct|ory cont|
|00001210| 61 69 6e 73 20 68 65 61 | 64 65 72 73 20 77 68 69 |ains hea|ders whi|
|00001220| 63 68 20 61 72 65 20 69 | 6e 74 65 6e 64 65 64 20 |ch are i|ntended |
|00001230| 74 6f 20 62 65 20 69 6e | 63 6c 75 64 65 64 20 69 |to be in|cluded i|
|00001240| 6e 0a 75 73 65 72 20 70 | 72 6f 67 72 61 6d 73 20 |n.user p|rograms |
|00001250| 2d 20 74 68 65 20 70 6c | 61 63 65 20 77 68 65 72 |- the pl|ace wher|
|00001260| 65 20 74 68 65 73 65 20 | 66 69 6c 65 73 20 72 65 |e these |files re|
|00001270| 73 69 64 65 20 73 68 6f | 75 6c 64 20 62 65 20 73 |side sho|uld be s|
|00001280| 65 74 20 69 6e 20 74 68 | 65 20 4d 61 6b 65 66 69 |et in th|e Makefi|
|00001290| 6c 65 0a 61 73 20 49 4e | 43 44 49 52 2e 20 20 54 |le.as IN|CDIR. T|
|000012a0| 68 65 20 64 69 72 65 63 | 74 6f 72 69 65 73 20 22 |he direc|tories "|
|000012b0| 36 38 30 39 22 2c 20 22 | 38 30 38 30 22 2c 20 61 |6809", "|8080", a|
|000012c0| 6e 64 20 22 76 61 78 22 | 20 63 6f 6e 74 61 69 6e |nd "vax"| contain|
|000012d0| 20 72 75 6e 74 69 6d 65 | 20 73 75 70 70 6f 72 74 | runtime| support|
|000012e0| 0a 66 6f 72 20 74 68 65 | 20 72 65 73 70 65 63 74 |.for the| respect|
|000012f0| 69 76 65 20 63 6f 6d 70 | 69 6c 65 72 73 2e 20 20 |ive comp|ilers. |
|00001300| 54 68 65 20 64 69 72 65 | 63 74 6f 72 79 20 22 6c |The dire|ctory "l|
|00001310| 69 62 22 20 63 6f 6e 74 | 61 69 6e 73 20 74 68 65 |ib" cont|ains the|
|00001320| 20 73 6f 75 72 63 65 20 | 63 6f 64 65 0a 66 6f 72 | source |code.for|
|00001330| 20 73 6f 6d 65 20 63 6f | 6d 6d 6f 6e 20 43 20 6c | some co|mmon C l|
|00001340| 69 62 72 61 72 79 20 66 | 75 6e 63 74 69 6f 6e 73 |ibrary f|unctions|
|00001350| 20 28 70 6f 72 74 61 62 | 6c 65 20 6f 6e 65 73 29 | (portab|le ones)|
|00001360| 2e 0a 53 48 41 52 5f 45 | 4f 46 0a 69 66 20 74 65 |..SHAR_E|OF.if te|
|00001370| 73 74 20 35 35 30 20 2d | 6e 65 20 22 60 77 63 20 |st 550 -|ne "`wc |
|00001380| 2d 63 20 3c 20 27 4d 5f | 52 45 41 44 4d 45 27 60 |-c < 'M_|README'`|
|00001390| 22 0a 74 68 65 6e 0a 09 | 65 63 68 6f 20 73 68 61 |".then..|echo sha|
|000013a0| 72 3a 20 65 72 72 6f 72 | 20 74 72 61 6e 73 6d 69 |r: error| transmi|
|000013b0| 74 74 69 6e 67 20 22 27 | 4d 5f 52 45 41 44 4d 45 |tting "'|M_README|
|000013c0| 27 22 20 27 28 73 68 6f | 75 6c 64 20 68 61 76 65 |'" '(sho|uld have|
|000013d0| 20 62 65 65 6e 20 35 35 | 30 20 63 68 61 72 61 63 | been 55|0 charac|
|000013e0| 74 65 72 73 29 27 0a 66 | 69 0a 66 69 0a 65 63 68 |ters)'.f|i.fi.ech|
|000013f0| 6f 20 73 68 61 72 3a 20 | 65 78 74 72 61 63 74 69 |o shar: |extracti|
|00001400| 6e 67 20 22 27 4d 61 6b | 65 66 69 6c 65 27 22 20 |ng "'Mak|efile'" |
|00001410| 27 28 31 34 32 39 20 63 | 68 61 72 61 63 74 65 72 |'(1429 c|haracter|
|00001420| 73 29 27 0a 69 66 20 74 | 65 73 74 20 2d 66 20 27 |s)'.if t|est -f '|
|00001430| 4d 61 6b 65 66 69 6c 65 | 27 0a 74 68 65 6e 0a 09 |Makefile|'.then..|
|00001440| 65 63 68 6f 20 73 68 61 | 72 3a 20 77 69 6c 6c 20 |echo sha|r: will |
|00001450| 6e 6f 74 20 6f 76 65 72 | 2d 77 72 69 74 65 20 65 |not over|-write e|
|00001460| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 20 22 27 4d |xisting |file "'M|
|00001470| 61 6b 65 66 69 6c 65 27 | 22 0a 65 6c 73 65 0a 63 |akefile'|".else.c|
|00001480| 61 74 20 3c 3c 20 5c 53 | 48 41 52 5f 45 4f 46 20 |at << \S|HAR_EOF |
|00001490| 3e 20 27 4d 61 6b 65 66 | 69 6c 65 27 0a 23 09 52 |> 'Makef|ile'.#.R|
|000014a0| 65 71 75 69 72 65 73 20 | 53 79 73 74 65 6d 20 56 |equires |System V|
|000014b0| 20 6d 61 6b 65 0a 23 09 | 40 28 23 29 4d 61 6b 65 | make.#.|@(#)Make|
|000014c0| 66 69 6c 65 20 31 2e 35 | 20 38 36 2f 30 35 2f 31 |file 1.5| 86/05/1|
|000014d0| 33 0a 2e 53 55 46 46 49 | 58 45 53 3a 09 2e 6f 20 |3..SUFFI|XES:..o |
|000014e0| 2e 63 20 2e 63 7e 20 2e | 68 20 2e 68 7e 0a 2e 50 |.c .c~ .|h .h~..P|
|000014f0| 52 45 43 49 4f 55 53 3a | 09 73 63 63 6c 69 62 2e |RECIOUS:|.scclib.|
|00001500| 61 0a 23 09 59 6f 75 27 | 6c 6c 20 70 72 6f 62 61 |a.#.You'|ll proba|
|00001510| 62 61 62 6c 79 20 77 61 | 6e 74 20 74 6f 20 63 68 |bably wa|nt to ch|
|00001520| 61 6e 67 65 20 74 68 65 | 73 65 2e 20 20 54 68 65 |ange the|se. The|
|00001530| 73 65 20 61 72 65 20 75 | 73 65 64 20 62 79 20 74 |se are u|sed by t|
|00001540| 68 65 20 63 6f 6d 70 69 | 6c 65 72 73 23 09 74 6f |he compi|lers#.to|
|00001550| 20 66 69 67 75 72 65 20 | 6f 75 74 20 77 68 65 72 | figure |out wher|
|00001560| 65 20 74 68 65 20 69 6e | 63 6c 75 64 65 20 66 69 |e the in|clude fi|
|00001570| 6c 65 73 20 73 68 6f 75 | 6c 64 20 67 6f 2e 0a 54 |les shou|ld go..T|
|00001580| 41 52 47 44 49 52 20 3d | 20 2f 75 2f 63 6c 65 77 |ARGDIR =| /u/clew|
|00001590| 69 73 2f 6c 69 62 0a 49 | 4e 43 44 49 52 20 3d 20 |is/lib.I|NCDIR = |
|000015a0| 22 2f 75 2f 63 6c 65 77 | 69 73 2f 73 72 63 2f 73 |"/u/clew|is/src/s|
|000015b0| 63 63 2f 69 6e 63 6c 75 | 64 65 2f 22 0a 0a 49 4e |cc/inclu|de/"..IN|
|000015c0| 53 54 46 4c 41 47 53 20 | 3d 20 2d 44 49 4e 43 44 |STFLAGS |= -DINCD|
|000015d0| 49 52 3d 24 28 49 4e 43 | 44 49 52 29 0a 43 46 4c |IR=$(INC|DIR).CFL|
|000015e0| 41 47 53 20 3d 20 27 24 | 28 49 4e 53 54 46 4c 41 |AGS = '$|(INSTFLA|
|000015f0| 47 53 29 27 20 2d 4f 0a | 41 52 20 3d 20 61 72 0a |GS)' -O.|AR = ar.|
|00001600| 41 52 46 4c 41 47 53 20 | 3d 20 72 76 0a 0a 4c 49 |ARFLAGS |= rv..LI|
|00001610| 42 20 3d 20 73 63 63 6c | 69 62 2e 61 0a 0a 46 45 |B = sccl|ib.a..FE|
|00001620| 20 3d 09 24 28 4c 49 42 | 29 28 64 61 74 61 2e 6f | =.$(LIB|)(data.o|
|00001630| 29 20 5c 0a 09 24 28 4c | 49 42 29 28 65 72 72 6f |) \..$(L|IB)(erro|
|00001640| 72 2e 6f 29 20 5c 0a 09 | 24 28 4c 49 42 29 28 65 |r.o) \..|$(LIB)(e|
|00001650| 78 70 72 2e 6f 29 20 5c | 0a 09 24 28 4c 49 42 29 |xpr.o) \|..$(LIB)|
|00001660| 28 66 75 6e 63 74 69 6f | 6e 2e 6f 29 20 5c 0a 09 |(functio|n.o) \..|
|00001670| 24 28 4c 49 42 29 28 67 | 65 6e 2e 6f 29 20 5c 0a |$(LIB)(g|en.o) \.|
|00001680| 09 24 28 4c 49 42 29 28 | 69 6f 2e 6f 29 20 5c 0a |.$(LIB)(|io.o) \.|
|00001690| 09 24 28 4c 49 42 29 28 | 6c 65 78 2e 6f 29 20 5c |.$(LIB)(|lex.o) \|
|000016a0| 0a 09 24 28 4c 49 42 29 | 28 6d 61 69 6e 2e 6f 29 |..$(LIB)|(main.o)|
|000016b0| 20 5c 0a 09 24 28 4c 49 | 42 29 28 70 72 65 70 72 | \..$(LI|B)(prepr|
|000016c0| 6f 63 2e 6f 29 20 5c 0a | 09 24 28 4c 49 42 29 28 |oc.o) \.|.$(LIB)(|
|000016d0| 70 72 69 6d 61 72 79 2e | 6f 29 20 5c 0a 09 24 28 |primary.|o) \..$(|
|000016e0| 4c 49 42 29 28 73 74 6d | 74 2e 6f 29 20 5c 0a 09 |LIB)(stm|t.o) \..|
|000016f0| 24 28 4c 49 42 29 28 73 | 79 6d 2e 6f 29 20 5c 0a |$(LIB)(s|ym.o) \.|
|00001700| 09 24 28 4c 49 42 29 28 | 77 68 69 6c 65 2e 6f 29 |.$(LIB)(|while.o)|
|00001710| 0a 0a 61 6c 6c 3a 09 73 | 63 63 38 30 38 30 20 73 |..all:.s|cc8080 s|
|00001720| 63 63 61 73 30 39 20 73 | 63 63 76 61 78 20 73 63 |ccas09 s|ccvax sc|
|00001730| 63 6d 36 38 6b 0a 0a 24 | 28 46 45 29 20 63 6f 64 |cm68k..$|(FE) cod|
|00001740| 65 38 30 38 30 2e 6f 20 | 63 6f 64 65 61 73 30 39 |e8080.o |codeas09|
|00001750| 2e 6f 20 63 6f 64 65 76 | 61 78 2e 6f 20 63 6f 64 |.o codev|ax.o cod|
|00001760| 65 6d 36 38 6b 2e 6f 3a | 20 64 65 66 73 2e 68 20 |em68k.o:| defs.h |
|00001770| 64 61 74 61 2e 68 0a 0a | 69 6e 73 74 61 6c 6c 3a |data.h..|install:|
|00001780| 09 61 6c 6c 0a 09 6d 76 | 20 73 63 63 76 61 78 20 |.all..mv| sccvax |
|00001790| 73 63 63 38 30 38 30 20 | 73 63 63 61 73 30 39 20 |scc8080 |sccas09 |
|000017a0| 73 63 63 6d 36 38 6b 20 | 24 28 54 41 52 47 44 49 |sccm68k |$(TARGDI|
|000017b0| 52 29 0a 0a 23 41 6c 74 | 65 72 6e 61 74 65 6c 79 |R)..#Alt|ernately|
|000017c0| 2c 20 79 6f 75 20 6d 61 | 79 20 68 61 76 65 20 74 |, you ma|y have t|
|000017d0| 6f 20 64 6f 20 61 6e 20 | 6c 6f 72 64 65 72 0a 24 |o do an |lorder.$|
|000017e0| 28 4c 49 42 29 3a 09 24 | 28 46 45 29 0a 09 2d 72 |(LIB):.$|(FE)..-r|
|000017f0| 61 6e 6c 69 62 20 24 28 | 4c 49 42 29 0a 09 2d 75 |anlib $(|LIB)..-u|
|00001800| 63 62 20 72 61 6e 6c 69 | 62 20 24 28 4c 49 42 29 |cb ranli|b $(LIB)|
|00001810| 0a 0a 73 63 63 38 30 38 | 30 3a 09 63 6f 64 65 38 |..scc808|0:.code8|
|00001820| 30 38 30 2e 6f 20 24 28 | 4c 49 42 29 0a 09 24 28 |080.o $(|LIB)..$(|
|00001830| 43 43 29 20 2d 6f 20 73 | 63 63 38 30 38 30 20 24 |CC) -o s|cc8080 $|
|00001840| 28 43 46 4c 41 47 53 29 | 20 24 28 4c 49 42 29 20 |(CFLAGS)| $(LIB) |
|00001850| 63 6f 64 65 38 30 38 30 | 2e 6f 0a 0a 73 63 63 61 |code8080|.o..scca|
|00001860| 73 30 39 3a 09 63 6f 64 | 65 61 73 30 39 2e 6f 20 |s09:.cod|eas09.o |
|00001870| 24 28 4c 49 42 29 0a 09 | 24 28 43 43 29 20 2d 6f |$(LIB)..|$(CC) -o|
|00001880| 20 73 63 63 61 73 30 39 | 20 24 28 43 46 4c 41 47 | sccas09| $(CFLAG|
|00001890| 53 29 20 24 28 4c 49 42 | 29 20 63 6f 64 65 61 73 |S) $(LIB|) codeas|
|000018a0| 30 39 2e 6f 0a 0a 73 63 | 63 76 61 78 3a 09 09 63 |09.o..sc|cvax:..c|
|000018b0| 6f 64 65 76 61 78 2e 6f | 20 24 28 4c 49 42 29 0a |odevax.o| $(LIB).|
|000018c0| 09 24 28 43 43 29 20 2d | 6f 20 73 63 63 76 61 78 |.$(CC) -|o sccvax|
|000018d0| 20 24 28 43 46 4c 41 47 | 53 29 20 24 28 4c 49 42 | $(CFLAG|S) $(LIB|
|000018e0| 29 20 63 6f 64 65 76 61 | 78 2e 6f 0a 0a 73 63 63 |) codeva|x.o..scc|
|000018f0| 6d 36 38 6b 3a 09 63 6f | 64 65 6d 36 38 6b 2e 6f |m68k:.co|dem68k.o|
|00001900| 20 24 28 4c 49 42 29 0a | 09 24 28 43 43 29 20 2d | $(LIB).|.$(CC) -|
|00001910| 6f 20 73 63 63 6d 36 38 | 6b 20 24 28 43 46 4c 41 |o sccm68|k $(CFLA|
|00001920| 47 53 29 20 24 28 4c 49 | 42 29 20 63 6f 64 65 6d |GS) $(LI|B) codem|
|00001930| 36 38 6b 2e 6f 0a 0a 70 | 72 69 6e 74 3a 0a 09 70 |68k.o..p|rint:..p|
|00001940| 72 20 2d 6e 20 64 65 66 | 73 2e 68 20 64 61 74 61 |r -n def|s.h data|
|00001950| 2e 68 20 64 61 74 61 2e | 63 20 65 72 72 6f 72 2e |.h data.|c error.|
|00001960| 63 20 65 78 70 72 2e 63 | 20 66 75 6e 63 74 69 6f |c expr.c| functio|
|00001970| 6e 2e 63 20 67 65 6e 2e | 63 20 5c 0a 09 09 69 6f |n.c gen.|c \...io|
|00001980| 2e 63 20 6c 65 78 2e 63 | 20 6d 61 69 6e 2e 63 20 |.c lex.c| main.c |
|00001990| 70 72 65 70 72 6f 63 2e | 63 20 70 72 69 6d 61 72 |preproc.|c primar|
|000019a0| 79 2e 63 20 73 74 6d 74 | 2e 63 20 5c 0a 09 09 73 |y.c stmt|.c \...s|
|000019b0| 79 6d 2e 63 20 77 68 69 | 6c 65 2e 63 20 63 6f 64 |ym.c whi|le.c cod|
|000019c0| 65 2a 2e 63 20 7c 20 6c | 70 0a 63 6c 65 61 6e 3a |e*.c | l|p.clean:|
|000019d0| 0a 09 72 6d 20 2d 66 20 | 24 28 4c 49 42 29 20 63 |..rm -f |$(LIB) c|
|000019e0| 6f 64 65 38 30 38 30 2e | 6f 20 63 6f 64 65 61 73 |ode8080.|o codeas|
|000019f0| 30 39 2e 6f 20 63 6f 64 | 65 76 61 78 2e 6f 20 63 |09.o cod|evax.o c|
|00001a00| 6f 64 65 6d 36 38 6b 2e | 6f 20 5c 0a 09 09 20 20 |odem68k.|o \... |
|00001a10| 20 20 20 73 63 63 76 61 | 78 20 73 63 63 38 30 38 | sccva|x scc808|
|00001a20| 30 20 73 63 63 61 73 30 | 39 20 73 63 63 6d 36 38 |0 sccas0|9 sccm68|
|00001a30| 6b 0a 53 48 41 52 5f 45 | 4f 46 0a 69 66 20 74 65 |k.SHAR_E|OF.if te|
|00001a40| 73 74 20 31 34 32 39 20 | 2d 6e 65 20 22 60 77 63 |st 1429 |-ne "`wc|
|00001a50| 20 2d 63 20 3c 20 27 4d | 61 6b 65 66 69 6c 65 27 | -c < 'M|akefile'|
|00001a60| 60 22 0a 74 68 65 6e 0a | 09 65 63 68 6f 20 73 68 |`".then.|.echo sh|
|00001a70| 61 72 3a 20 65 72 72 6f | 72 20 74 72 61 6e 73 6d |ar: erro|r transm|
|00001a80| 69 74 74 69 6e 67 20 22 | 27 4d 61 6b 65 66 69 6c |itting "|'Makefil|
|00001a90| 65 27 22 20 27 28 73 68 | 6f 75 6c 64 20 68 61 76 |e'" '(sh|ould hav|
|00001aa0| 65 20 62 65 65 6e 20 31 | 34 32 39 20 63 68 61 72 |e been 1|429 char|
|00001ab0| 61 63 74 65 72 73 29 27 | 0a 66 69 0a 66 69 0a 65 |acters)'|.fi.fi.e|
|00001ac0| 63 68 6f 20 73 68 61 72 | 3a 20 65 78 74 72 61 63 |cho shar|: extrac|
|00001ad0| 74 69 6e 67 20 22 27 4d | 61 6b 65 66 69 6c 65 2e |ting "'M|akefile.|
|00001ae0| 62 73 64 27 22 20 27 28 | 31 33 35 39 20 63 68 61 |bsd'" '(|1359 cha|
|00001af0| 72 61 63 74 65 72 73 29 | 27 0a 69 66 20 74 65 73 |racters)|'.if tes|
|00001b00| 74 20 2d 66 20 27 4d 61 | 6b 65 66 69 6c 65 2e 62 |t -f 'Ma|kefile.b|
|00001b10| 73 64 27 0a 74 68 65 6e | 0a 09 65 63 68 6f 20 73 |sd'.then|..echo s|
|00001b20| 68 61 72 3a 20 77 69 6c | 6c 20 6e 6f 74 20 6f 76 |har: wil|l not ov|
|00001b30| 65 72 2d 77 72 69 74 65 | 20 65 78 69 73 74 69 6e |er-write| existin|
|00001b40| 67 20 66 69 6c 65 20 22 | 27 4d 61 6b 65 66 69 6c |g file "|'Makefil|
|00001b50| 65 2e 62 73 64 27 22 0a | 65 6c 73 65 0a 63 61 74 |e.bsd'".|else.cat|
|00001b60| 20 3c 3c 20 5c 53 48 41 | 52 5f 45 4f 46 20 3e 20 | << \SHA|R_EOF > |
|00001b70| 27 4d 61 6b 65 66 69 6c | 65 2e 62 73 64 27 0a 23 |'Makefil|e.bsd'.#|
|00001b80| 09 49 20 63 6f 75 6c 64 | 6e 27 74 20 67 65 74 20 |.I could|n't get |
|00001b90| 74 68 65 20 73 75 70 70 | 6c 69 65 64 20 6d 61 6b |the supp|lied mak|
|00001ba0| 65 66 69 6c 65 20 74 6f | 20 77 6f 72 6b 2c 20 73 |efile to| work, s|
|00001bb0| 6f 20 49 20 77 72 6f 74 | 65 20 6f 6e 65 20 66 6f |o I wrot|e one fo|
|00001bc0| 72 0a 23 20 20 20 20 20 | 20 20 42 53 44 20 73 79 |r.# | BSD sy|
|00001bd0| 73 74 65 6d 73 20 20 20 | 20 20 20 2d 20 4a 6f 68 |stems | - Joh|
|00001be0| 6e 20 4e 65 6c 73 6f 6e | 2c 20 6d 6f 64 65 72 61 |n Nelson|, modera|
|00001bf0| 74 6f 72 2c 20 6d 6f 64 | 2e 73 6f 75 72 63 65 73 |tor, mod|.sources|
|00001c00| 0a 23 0a 23 09 59 6f 75 | 27 6c 6c 20 70 72 6f 62 |.#.#.You|'ll prob|
|00001c10| 61 62 61 62 6c 79 20 77 | 61 6e 74 20 74 6f 20 63 |abably w|ant to c|
|00001c20| 68 61 6e 67 65 20 74 68 | 65 73 65 2e 20 20 54 68 |hange th|ese. Th|
|00001c30| 65 73 65 20 61 72 65 20 | 75 73 65 64 20 62 79 20 |ese are |used by |
|00001c40| 74 68 65 20 63 6f 6d 70 | 69 6c 65 72 73 23 09 74 |the comp|ilers#.t|
|00001c50| 6f 20 66 69 67 75 72 65 | 20 6f 75 74 20 77 68 65 |o figure| out whe|
|00001c60| 72 65 20 74 68 65 20 69 | 6e 63 6c 75 64 65 20 66 |re the i|nclude f|
|00001c70| 69 6c 65 73 20 73 68 6f | 75 6c 64 20 67 6f 2e 0a |iles sho|uld go..|
|00001c80| 54 41 52 47 44 49 52 20 | 3d 20 2f 75 2f 63 6c 65 |TARGDIR |= /u/cle|
|00001c90| 77 69 73 2f 6c 69 62 0a | 49 4e 43 44 49 52 20 3d |wis/lib.|INCDIR =|
|00001ca0| 20 22 2f 75 2f 63 6c 65 | 77 69 73 2f 73 72 63 2f | "/u/cle|wis/src/|
|00001cb0| 73 63 63 2f 69 6e 63 6c | 75 64 65 2f 22 0a 0a 49 |scc/incl|ude/"..I|
|00001cc0| 4e 53 54 46 4c 41 47 53 | 20 3d 20 2d 44 49 4e 43 |NSTFLAGS| = -DINC|
|00001cd0| 44 49 52 3d 24 28 49 4e | 43 44 49 52 29 0a 43 46 |DIR=$(IN|CDIR).CF|
|00001ce0| 4c 41 47 53 20 3d 20 27 | 24 28 49 4e 53 54 46 4c |LAGS = '|$(INSTFL|
|00001cf0| 41 47 53 29 27 20 2d 4f | 0a 41 52 20 3d 20 61 72 |AGS)' -O|.AR = ar|
|00001d00| 0a 41 52 46 4c 41 47 53 | 20 3d 20 72 76 0a 0a 4c |.ARFLAGS| = rv..L|
|00001d10| 49 42 20 3d 20 73 63 63 | 6c 69 62 2e 61 0a 0a 46 |IB = scc|lib.a..F|
|00001d20| 45 20 3d 09 64 61 74 61 | 2e 6f 20 5c 0a 09 65 72 |E =.data|.o \..er|
|00001d30| 72 6f 72 2e 6f 20 5c 0a | 09 65 78 70 72 2e 6f 20 |ror.o \.|.expr.o |
|00001d40| 5c 0a 09 66 75 6e 63 74 | 69 6f 6e 2e 6f 20 5c 0a |\..funct|ion.o \.|
|00001d50| 09 67 65 6e 2e 6f 20 5c | 0a 09 69 6f 2e 6f 20 5c |.gen.o \|..io.o \|
|00001d60| 0a 09 6c 65 78 2e 6f 20 | 5c 0a 09 6d 61 69 6e 2e |..lex.o |\..main.|
|00001d70| 6f 20 5c 0a 09 70 72 65 | 70 72 6f 63 2e 6f 20 5c |o \..pre|proc.o \|
|00001d80| 0a 09 70 72 69 6d 61 72 | 79 2e 6f 20 5c 0a 09 73 |..primar|y.o \..s|
|00001d90| 74 6d 74 2e 6f 20 5c 0a | 09 73 79 6d 2e 6f 20 5c |tmt.o \.|.sym.o \|
|00001da0| 0a 09 77 68 69 6c 65 2e | 6f 0a 0a 61 6c 6c 3a 09 |..while.|o..all:.|
|00001db0| 73 63 63 38 30 38 30 20 | 73 63 63 61 73 30 39 20 |scc8080 |sccas09 |
|00001dc0| 73 63 63 76 61 78 20 73 | 63 63 6d 36 38 6b 0a 0a |sccvax s|ccm68k..|
|00001dd0| 24 28 46 45 29 20 63 6f | 64 65 38 30 38 30 2e 6f |$(FE) co|de8080.o|
|00001de0| 20 63 6f 64 65 61 73 30 | 39 2e 6f 20 63 6f 64 65 | codeas0|9.o code|
|00001df0| 76 61 78 2e 6f 20 63 6f | 64 65 6d 36 38 6b 2e 6f |vax.o co|dem68k.o|
|00001e00| 3a 20 64 65 66 73 2e 68 | 20 64 61 74 61 2e 68 0a |: defs.h| data.h.|
|00001e10| 0a 69 6e 73 74 61 6c 6c | 3a 09 61 6c 6c 0a 09 6d |.install|:.all..m|
|00001e20| 76 20 73 63 63 76 61 78 | 20 73 63 63 38 30 38 30 |v sccvax| scc8080|
|00001e30| 20 73 63 63 61 73 30 39 | 20 73 63 63 6d 36 38 6b | sccas09| sccm68k|
|00001e40| 20 24 28 54 41 52 47 44 | 49 52 29 0a 0a 23 41 6c | $(TARGD|IR)..#Al|
|00001e50| 74 65 72 6e 61 74 65 6c | 79 2c 20 79 6f 75 20 6d |ternatel|y, you m|
|00001e60| 61 79 20 68 61 76 65 20 | 74 6f 20 64 6f 20 61 6e |ay have |to do an|
|00001e70| 20 6c 6f 72 64 65 72 0a | 24 28 4c 49 42 29 3a 09 | lorder.|$(LIB):.|
|00001e80| 24 28 46 45 29 0a 09 2d | 72 6d 20 24 40 0a 09 61 |$(FE)..-|rm $@..a|
|00001e90| 72 20 71 20 24 40 20 24 | 28 46 45 29 0a 09 2d 72 |r q $@ $|(FE)..-r|
|00001ea0| 61 6e 6c 69 62 20 24 28 | 4c 49 42 29 0a 0a 73 63 |anlib $(|LIB)..sc|
|00001eb0| 63 38 30 38 30 3a 09 63 | 6f 64 65 38 30 38 30 2e |c8080:.c|ode8080.|
|00001ec0| 6f 20 24 28 4c 49 42 29 | 0a 09 24 28 43 43 29 20 |o $(LIB)|..$(CC) |
|00001ed0| 2d 6f 20 73 63 63 38 30 | 38 30 20 24 28 43 46 4c |-o scc80|80 $(CFL|
|00001ee0| 41 47 53 29 20 24 28 4c | 49 42 29 20 63 6f 64 65 |AGS) $(L|IB) code|
|00001ef0| 38 30 38 30 2e 6f 0a 0a | 73 63 63 61 73 30 39 3a |8080.o..|sccas09:|
|00001f00| 09 63 6f 64 65 61 73 30 | 39 2e 6f 20 24 28 4c 49 |.codeas0|9.o $(LI|
|00001f10| 42 29 0a 09 24 28 43 43 | 29 20 2d 6f 20 73 63 63 |B)..$(CC|) -o scc|
|00001f20| 61 73 30 39 20 24 28 43 | 46 4c 41 47 53 29 20 24 |as09 $(C|FLAGS) $|
|00001f30| 28 4c 49 42 29 20 63 6f | 64 65 61 73 30 39 2e 6f |(LIB) co|deas09.o|
|00001f40| 0a 0a 73 63 63 76 61 78 | 3a 09 09 63 6f 64 65 76 |..sccvax|:..codev|
|00001f50| 61 78 2e 6f 20 24 28 4c | 49 42 29 0a 09 24 28 43 |ax.o $(L|IB)..$(C|
|00001f60| 43 29 20 2d 6f 20 73 63 | 63 76 61 78 20 24 28 43 |C) -o sc|cvax $(C|
|00001f70| 46 4c 41 47 53 29 20 24 | 28 4c 49 42 29 20 63 6f |FLAGS) $|(LIB) co|
|00001f80| 64 65 76 61 78 2e 6f 0a | 0a 73 63 63 6d 36 38 6b |devax.o.|.sccm68k|
|00001f90| 3a 09 63 6f 64 65 6d 36 | 38 6b 2e 6f 20 24 28 4c |:.codem6|8k.o $(L|
|00001fa0| 49 42 29 0a 09 24 28 43 | 43 29 20 2d 6f 20 73 63 |IB)..$(C|C) -o sc|
|00001fb0| 63 6d 36 38 6b 20 24 28 | 43 46 4c 41 47 53 29 20 |cm68k $(|CFLAGS) |
|00001fc0| 24 28 4c 49 42 29 20 63 | 6f 64 65 6d 36 38 6b 2e |$(LIB) c|odem68k.|
|00001fd0| 6f 0a 0a 70 72 69 6e 74 | 3a 0a 09 70 72 20 2d 6e |o..print|:..pr -n|
|00001fe0| 20 64 65 66 73 2e 68 20 | 64 61 74 61 2e 68 20 64 | defs.h |data.h d|
|00001ff0| 61 74 61 2e 63 20 65 72 | 72 6f 72 2e 63 20 65 78 |ata.c er|ror.c ex|
|00002000| 70 72 2e 63 20 66 75 6e | 63 74 69 6f 6e 2e 63 20 |pr.c fun|ction.c |
|00002010| 67 65 6e 2e 63 20 5c 0a | 09 09 69 6f 2e 63 20 6c |gen.c \.|..io.c l|
|00002020| 65 78 2e 63 20 6d 61 69 | 6e 2e 63 20 70 72 65 70 |ex.c mai|n.c prep|
|00002030| 72 6f 63 2e 63 20 70 72 | 69 6d 61 72 79 2e 63 20 |roc.c pr|imary.c |
|00002040| 73 74 6d 74 2e 63 20 5c | 0a 09 09 73 79 6d 2e 63 |stmt.c \|...sym.c|
|00002050| 20 77 68 69 6c 65 2e 63 | 20 63 6f 64 65 2a 2e 63 | while.c| code*.c|
|00002060| 20 7c 20 6c 70 0a 63 6c | 65 61 6e 3a 0a 09 72 6d | | lp.cl|ean:..rm|
|00002070| 20 2d 66 20 24 28 4c 49 | 42 29 20 63 6f 64 65 38 | -f $(LI|B) code8|
|00002080| 30 38 30 2e 6f 20 63 6f | 64 65 61 73 30 39 2e 6f |080.o co|deas09.o|
|00002090| 20 63 6f 64 65 76 61 78 | 2e 6f 20 63 6f 64 65 6d | codevax|.o codem|
|000020a0| 36 38 6b 2e 6f 20 5c 0a | 09 09 20 20 20 20 20 73 |68k.o \.|.. s|
|000020b0| 63 63 76 61 78 20 73 63 | 63 38 30 38 30 20 73 63 |ccvax sc|c8080 sc|
|000020c0| 63 61 73 30 39 20 73 63 | 63 6d 36 38 6b 0a 53 48 |cas09 sc|cm68k.SH|
|000020d0| 41 52 5f 45 4f 46 0a 69 | 66 20 74 65 73 74 20 31 |AR_EOF.i|f test 1|
|000020e0| 33 35 39 20 2d 6e 65 20 | 22 60 77 63 20 2d 63 20 |359 -ne |"`wc -c |
|000020f0| 3c 20 27 4d 61 6b 65 66 | 69 6c 65 2e 62 73 64 27 |< 'Makef|ile.bsd'|
|00002100| 60 22 0a 74 68 65 6e 0a | 09 65 63 68 6f 20 73 68 |`".then.|.echo sh|
|00002110| 61 72 3a 20 65 72 72 6f | 72 20 74 72 61 6e 73 6d |ar: erro|r transm|
|00002120| 69 74 74 69 6e 67 20 22 | 27 4d 61 6b 65 66 69 6c |itting "|'Makefil|
|00002130| 65 2e 62 73 64 27 22 20 | 27 28 73 68 6f 75 6c 64 |e.bsd'" |'(should|
|00002140| 20 68 61 76 65 20 62 65 | 65 6e 20 31 33 35 39 20 | have be|en 1359 |
|00002150| 63 68 61 72 61 63 74 65 | 72 73 29 27 0a 66 69 0a |characte|rs)'.fi.|
|00002160| 66 69 0a 65 63 68 6f 20 | 73 68 61 72 3a 20 65 78 |fi.echo |shar: ex|
|00002170| 74 72 61 63 74 69 6e 67 | 20 22 27 63 6f 64 65 38 |tracting| "'code8|
|00002180| 30 38 30 2e 63 27 22 20 | 27 28 39 36 37 31 20 63 |080.c'" |'(9671 c|
|00002190| 68 61 72 61 63 74 65 72 | 73 29 27 0a 69 66 20 74 |haracter|s)'.if t|
|000021a0| 65 73 74 20 2d 66 20 27 | 63 6f 64 65 38 30 38 30 |est -f '|code8080|
|000021b0| 2e 63 27 0a 74 68 65 6e | 0a 09 65 63 68 6f 20 73 |.c'.then|..echo s|
|000021c0| 68 61 72 3a 20 77 69 6c | 6c 20 6e 6f 74 20 6f 76 |har: wil|l not ov|
|000021d0| 65 72 2d 77 72 69 74 65 | 20 65 78 69 73 74 69 6e |er-write| existin|
|000021e0| 67 20 66 69 6c 65 20 22 | 27 63 6f 64 65 38 30 38 |g file "|'code808|
|000021f0| 30 2e 63 27 22 0a 65 6c | 73 65 0a 63 61 74 20 3c |0.c'".el|se.cat <|
|00002200| 3c 20 5c 53 48 41 52 5f | 45 4f 46 20 3e 20 27 63 |< \SHAR_|EOF > 'c|
|00002210| 6f 64 65 38 30 38 30 2e | 63 27 0a 2f 2a 09 46 69 |ode8080.|c'./*.Fi|
|00002220| 6c 65 20 63 6f 64 65 38 | 30 38 30 2e 63 3a 20 32 |le code8|080.c: 2|
|00002230| 2e 32 20 28 38 34 2f 30 | 38 2f 33 31 2c 31 30 3a |.2 (84/0|8/31,10:|
|00002240| 30 35 3a 30 39 29 20 2a | 2f 0a 2f 2a 25 20 63 63 |05:09) *|/./*% cc|
|00002250| 20 2d 4f 20 2d 63 20 25 | 0a 20 2a 0a 20 2a 2f 0a | -O -c %|. *. */.|
|00002260| 0a 23 69 6e 63 6c 75 64 | 65 20 3c 73 74 64 69 6f |.#includ|e <stdio|
|00002270| 2e 68 3e 0a 23 69 6e 63 | 6c 75 64 65 20 22 64 65 |.h>.#inc|lude "de|
|00002280| 66 73 2e 68 22 0a 23 69 | 6e 63 6c 75 64 65 20 22 |fs.h".#i|nclude "|
|00002290| 64 61 74 61 2e 68 22 0a | 0a 2f 2a 09 44 65 66 69 |data.h".|./*.Defi|
|000022a0| 6e 65 20 41 53 4e 4d 20 | 61 6e 64 20 4c 44 4e 4d |ne ASNM |and LDNM|
|000022b0| 20 74 6f 20 74 68 65 20 | 6e 61 6d 65 73 20 6f 66 | to the |names of|
|000022c0| 20 74 68 65 20 61 73 73 | 65 6d 62 6c 65 72 20 61 | the ass|embler a|
|000022d0| 6e 64 20 6c 69 6e 6b 65 | 72 0a 09 72 65 73 70 65 |nd linke|r..respe|
|000022e0| 63 74 69 76 65 6c 79 20 | 2a 2f 0a 0a 2f 2a 0a 20 |ctively |*/../*. |
|000022f0| 2a 09 53 6f 6d 65 20 70 | 72 65 64 65 66 69 6e 69 |*.Some p|redefini|
|00002300| 74 69 6f 6e 73 3a 0a 20 | 2a 0a 20 2a 09 49 4e 54 |tions:. |*. *.INT|
|00002310| 53 49 5a 45 20 69 73 20 | 74 68 65 20 73 69 7a 65 |SIZE is |the size|
|00002320| 20 6f 66 20 61 6e 20 69 | 6e 74 65 67 65 72 20 69 | of an i|nteger i|
|00002330| 6e 20 74 68 65 20 74 61 | 72 67 65 74 20 6d 61 63 |n the ta|rget mac|
|00002340| 68 69 6e 65 0a 20 2a 09 | 42 59 54 45 4f 46 46 20 |hine. *.|BYTEOFF |
|00002350| 69 73 20 74 68 65 20 6f | 66 66 73 65 74 20 6f 66 |is the o|ffset of|
|00002360| 20 61 6e 20 62 79 74 65 | 20 77 69 74 68 69 6e 20 | an byte| within |
|00002370| 61 6e 20 69 6e 74 65 67 | 65 72 20 6f 6e 20 74 68 |an integ|er on th|
|00002380| 65 0a 20 2a 09 09 74 61 | 72 67 65 74 20 6d 61 63 |e. *..ta|rget mac|
|00002390| 68 69 6e 65 2e 20 28 69 | 65 3a 20 38 30 38 30 2c |hine. (i|e: 8080,|
|000023a0| 70 64 70 31 31 20 3d 20 | 30 2c 20 36 38 30 39 20 |pdp11 = |0, 6809 |
|000023b0| 3d 20 31 2c 0a 20 2a 09 | 09 33 36 30 20 3d 20 33 |= 1,. *.|.360 = 3|
|000023c0| 29 0a 20 2a 09 54 68 69 | 73 20 63 6f 6d 70 69 6c |). *.Thi|s compil|
|000023d0| 65 72 20 61 73 73 75 6d | 65 73 20 74 68 61 74 20 |er assum|es that |
|000023e0| 61 6e 20 69 6e 74 65 67 | 65 72 20 69 73 20 74 68 |an integ|er is th|
|000023f0| 65 20 53 41 4d 45 20 6c | 65 6e 67 74 68 20 61 73 |e SAME l|ength as|
|00002400| 0a 20 2a 09 61 20 70 6f | 69 6e 74 65 72 20 2d 20 |. *.a po|inter - |
|00002410| 69 6e 20 66 61 63 74 2c | 20 74 68 65 20 63 6f 6d |in fact,| the com|
|00002420| 70 69 6c 65 72 20 75 73 | 65 73 20 49 4e 54 53 49 |piler us|es INTSI|
|00002430| 5a 45 20 66 6f 72 20 62 | 6f 74 68 2e 0a 20 2a 2f |ZE for b|oth.. */|
|00002440| 0a 23 64 65 66 69 6e 65 | 09 49 4e 54 53 49 5a 45 |.#define|.INTSIZE|
|00002450| 09 32 0a 23 64 65 66 69 | 6e 65 09 42 59 54 45 4f |.2.#defi|ne.BYTEO|
|00002460| 46 46 09 30 0a 0a 2f 2a | 0a 20 2a 09 70 72 69 6e |FF.0../*|. *.prin|
|00002470| 74 20 61 6c 6c 20 61 73 | 73 65 6d 62 6c 65 72 20 |t all as|sembler |
|00002480| 69 6e 66 6f 20 62 65 66 | 6f 72 65 20 61 6e 79 20 |info bef|ore any |
|00002490| 63 6f 64 65 20 69 73 20 | 67 65 6e 65 72 61 74 65 |code is |generate|
|000024a0| 64 0a 20 2a 0a 20 2a 2f | 0a 68 65 61 64 65 72 20 |d. *. */|.header |
|000024b0| 28 29 0a 7b 0a 09 6f 75 | 74 73 74 72 20 28 22 3b |().{..ou|tstr (";|
|000024c0| 09 53 6d 61 6c 6c 20 43 | 20 38 30 38 30 3b 5c 6e |.Small C| 8080;\n|
|000024d0| 3b 5c 74 43 6f 64 65 72 | 20 28 32 2e 34 2c 38 34 |;\tCoder| (2.4,84|
|000024e0| 2f 31 31 2f 32 37 29 5c | 6e 3b 22 29 3b 0a 09 46 |/11/27)\|n;");..F|
|000024f0| 45 76 65 72 73 28 29 3b | 0a 09 6e 6c 20 28 29 3b |Evers();|..nl ();|
|00002500| 0a 09 6f 6c 20 28 22 65 | 78 74 72 6e 09 3f 67 63 |..ol ("e|xtrn.?gc|
|00002510| 68 61 72 2c 3f 67 69 6e | 74 2c 3f 70 63 68 61 72 |har,?gin|t,?pchar|
|00002520| 2c 3f 70 69 6e 74 2c 3f | 62 6f 6f 6c 22 29 3b 0a |,?pint,?|bool");.|
|00002530| 09 6f 6c 20 28 22 65 78 | 74 72 6e 09 3f 73 78 74 |.ol ("ex|trn.?sxt|
|00002540| 22 29 3b 0a 09 6f 6c 20 | 28 22 65 78 74 72 6e 09 |");..ol |("extrn.|
|00002550| 3f 6f 72 2c 3f 61 6e 64 | 2c 3f 78 6f 72 22 29 3b |?or,?and|,?xor");|
|00002560| 0a 09 6f 6c 20 28 22 65 | 78 74 72 6e 09 3f 65 71 |..ol ("e|xtrn.?eq|
|00002570| 2c 3f 6e 65 2c 3f 67 74 | 2c 3f 6c 65 2c 3f 67 65 |,?ne,?gt|,?le,?ge|
|00002580| 2c 3f 6c 74 2c 3f 75 67 | 65 2c 3f 75 6c 74 2c 3f |,?lt,?ug|e,?ult,?|
|00002590| 75 67 74 2c 3f 75 6c 65 | 22 29 3b 0a 09 6f 6c 20 |ugt,?ule|");..ol |
|000025a0| 28 22 65 78 74 72 6e 09 | 3f 61 73 72 2c 3f 61 73 |("extrn.|?asr,?as|
|000025b0| 6c 22 29 3b 0a 09 6f 6c | 20 28 22 65 78 74 72 6e |l");..ol| ("extrn|
|000025c0| 09 3f 73 75 62 2c 3f 6e | 65 67 2c 3f 63 6f 6d 2c |.?sub,?n|eg,?com,|
|000025d0| 3f 6c 6e 65 67 2c 3f 6d | 75 6c 2c 3f 64 69 76 22 |?lneg,?m|ul,?div"|
|000025e0| 29 3b 0a 09 6f 6c 20 28 | 22 65 78 74 72 6e 09 3f |);..ol (|"extrn.?|
|000025f0| 63 61 73 65 22 29 3b 0a | 7d 0a 0a 6e 6c 20 28 29 |case");.|}..nl ()|
|00002600| 0a 7b 0a 09 6f 75 74 62 | 79 74 65 20 28 45 4f 4c |.{..outb|yte (EOL|
|00002610| 29 3b 0a 7d 0a 69 6e 69 | 74 6d 61 63 28 29 0a 7b |);.}.ini|tmac().{|
|00002620| 0a 09 64 65 66 6d 61 63 | 28 22 63 70 6d 5c 74 31 |..defmac|("cpm\t1|
|00002630| 22 29 3b 0a 09 64 65 66 | 6d 61 63 28 22 49 38 30 |");..def|mac("I80|
|00002640| 38 30 5c 74 31 22 29 3b | 0a 09 64 65 66 6d 61 63 |80\t1");|..defmac|
|00002650| 28 22 52 4d 41 43 5c 74 | 31 22 29 3b 0a 09 64 65 |("RMAC\t|1");..de|
|00002660| 66 6d 61 63 28 22 73 6d | 61 6c 6c 63 5c 74 31 22 |fmac("sm|allc\t1"|
|00002670| 29 3b 0a 7d 0a 0a 67 61 | 6c 69 67 6e 28 74 29 0a |);.}..ga|lign(t).|
|00002680| 69 6e 74 09 74 3b 0a 7b | 0a 09 72 65 74 75 72 6e |int.t;.{|..return|
|00002690| 28 74 29 3b 0a 7d 0a 0a | 2f 2a 0a 20 2a 09 72 65 |(t);.}..|/*. *.re|
|000026a0| 74 75 72 6e 20 73 69 7a | 65 20 6f 66 20 61 6e 20 |turn siz|e of an |
|000026b0| 69 6e 74 65 67 65 72 0a | 20 2a 2f 0a 69 6e 74 73 |integer.| */.ints|
|000026c0| 69 7a 65 28 29 20 7b 0a | 09 72 65 74 75 72 6e 28 |ize() {.|.return(|
|000026d0| 49 4e 54 53 49 5a 45 29 | 3b 0a 7d 0a 0a 2f 2a 0a |INTSIZE)|;.}../*.|
|000026e0| 20 2a 09 72 65 74 75 72 | 6e 20 6f 66 66 73 65 74 | *.retur|n offset|
|000026f0| 20 6f 66 20 6c 73 20 62 | 79 74 65 20 77 69 74 68 | of ls b|yte with|
|00002700| 69 6e 20 77 6f 72 64 0a | 20 2a 09 28 69 65 3a 20 |in word.| *.(ie: |
|00002710| 38 30 38 30 20 26 20 70 | 64 70 31 31 20 69 73 20 |8080 & p|dp11 is |
|00002720| 30 2c 20 36 38 30 39 20 | 69 73 20 31 2c 20 33 36 |0, 6809 |is 1, 36|
|00002730| 30 20 69 73 20 33 29 0a | 20 2a 2f 0a 62 79 74 65 |0 is 3).| */.byte|
|00002740| 6f 66 66 28 29 20 7b 0a | 09 72 65 74 75 72 6e 28 |off() {.|.return(|
|00002750| 42 59 54 45 4f 46 46 29 | 3b 0a 7d 0a 0a 2f 2a 0a |BYTEOFF)|;.}../*.|
|00002760| 20 2a 09 4f 75 74 70 75 | 74 20 69 6e 74 65 72 6e | *.Outpu|t intern|
|00002770| 61 6c 20 67 65 6e 65 72 | 61 74 65 64 20 6c 61 62 |al gener|ated lab|
|00002780| 65 6c 20 70 72 65 66 69 | 78 0a 20 2a 2f 0a 6f 6c |el prefi|x. */.ol|
|00002790| 70 72 66 69 78 28 29 20 | 7b 0a 09 6f 75 74 62 79 |prfix() |{..outby|
|000027a0| 74 65 28 27 3f 27 29 3b | 0a 7d 0a 0a 2f 2a 0a 20 |te('?');|.}../*. |
|000027b0| 2a 09 4f 75 74 70 75 74 | 20 61 20 6c 61 62 65 6c |*.Output| a label|
|000027c0| 20 64 65 66 69 6e 69 74 | 69 6f 6e 20 74 65 72 6d | definit|ion term|
|000027d0| 69 6e 61 74 6f 72 0a 20 | 2a 2f 0a 63 6f 6c 20 28 |inator. |*/.col (|
|000027e0| 29 0a 7b 0a 09 6f 75 74 | 62 79 74 65 20 28 35 38 |).{..out|byte (58|
|000027f0| 29 3b 0a 7d 0a 0a 2f 2a | 0a 20 2a 09 62 65 67 69 |);.}../*|. *.begi|
|00002800| 6e 20 61 20 63 6f 6d 6d | 65 6e 74 20 6c 69 6e 65 |n a comm|ent line|
|00002810| 20 66 6f 72 20 74 68 65 | 20 61 73 73 65 6d 62 6c | for the| assembl|
|00002820| 65 72 0a 20 2a 0a 20 2a | 2f 0a 63 6f 6d 6d 65 6e |er. *. *|/.commen|
|00002830| 74 20 28 29 0a 7b 0a 09 | 6f 75 74 62 79 74 65 20 |t ().{..|outbyte |
|00002840| 28 27 3b 27 29 3b 0a 7d | 0a 0a 2f 2a 0a 20 2a 09 |(';');.}|../*. *.|
|00002850| 45 6d 69 74 20 75 73 65 | 72 20 6c 61 62 65 6c 20 |Emit use|r label |
|00002860| 70 72 65 66 69 78 0a 20 | 2a 2f 0a 70 72 65 66 69 |prefix. |*/.prefi|
|00002870| 78 20 28 29 0a 7b 0a 7d | 0a 0a 0a 2f 2a 0a 20 2a |x ().{.}|.../*. *|
|00002880| 09 70 72 69 6e 74 20 61 | 6e 79 20 61 73 73 65 6d |.print a|ny assem|
|00002890| 62 6c 65 72 20 73 74 75 | 66 66 20 6e 65 65 64 65 |bler stu|ff neede|
|000028a0| 64 20 61 66 74 65 72 20 | 61 6c 6c 20 63 6f 64 65 |d after |all code|
|000028b0| 0a 20 2a 0a 20 2a 2f 0a | 74 72 61 69 6c 65 72 20 |. *. */.|trailer |
|000028c0| 28 29 0a 7b 0a 09 6f 6c | 20 28 22 65 6e 64 22 29 |().{..ol| ("end")|
|000028d0| 3b 0a 7d 0a 0a 2f 2a 0a | 20 2a 09 66 75 6e 63 74 |;.}../*.| *.funct|
|000028e0| 69 6f 6e 20 70 72 6f 6c | 6f 67 75 65 0a 20 2a 2f |ion prol|ogue. */|
|000028f0| 0a 70 72 6f 6c 6f 67 75 | 65 20 28 29 0a 7b 0a 7d |.prologu|e ().{.}|
|00002900| 0a 0a 2f 2a 0a 20 2a 09 | 74 65 78 74 20 28 63 6f |../*. *.|text (co|
|00002910| 64 65 29 20 73 65 67 6d | 65 6e 74 0a 20 2a 2f 0a |de) segm|ent. */.|
|00002920| 67 74 65 78 74 20 28 29 | 0a 7b 0a 09 6f 6c 20 28 |gtext ()|.{..ol (|
|00002930| 22 63 73 65 67 22 29 3b | 0a 7d 0a 0a 2f 2a 0a 20 |"cseg");|.}../*. |
|00002940| 2a 09 64 61 74 61 20 73 | 65 67 6d 65 6e 74 0a 20 |*.data s|egment. |
|00002950| 2a 2f 0a 67 64 61 74 61 | 20 28 29 0a 7b 0a 09 6f |*/.gdata| ().{..o|
|00002960| 6c 20 28 22 64 73 65 67 | 22 29 3b 0a 7d 0a 0a 2f |l ("dseg|");.}../|
|00002970| 2a 0a 20 2a 20 20 4f 75 | 74 70 75 74 20 74 68 65 |*. * Ou|tput the|
|00002980| 20 76 61 72 69 61 62 6c | 65 20 73 79 6d 62 6f 6c | variabl|e symbol|
|00002990| 20 61 74 20 73 63 70 74 | 72 20 61 73 20 61 6e 20 | at scpt|r as an |
|000029a0| 65 78 74 72 6e 20 6f 72 | 20 61 20 70 75 62 6c 69 |extrn or| a publi|
|000029b0| 63 0a 20 2a 2f 0a 70 70 | 75 62 65 78 74 28 73 63 |c. */.pp|ubext(sc|
|000029c0| 70 74 72 29 20 63 68 61 | 72 20 2a 73 63 70 74 72 |ptr) cha|r *scptr|
|000029d0| 3b 20 7b 0a 09 69 66 20 | 28 63 70 74 72 5b 53 54 |; {..if |(cptr[ST|
|000029e0| 4f 52 41 47 45 5d 20 3d | 3d 20 53 54 41 54 49 43 |ORAGE] =|= STATIC|
|000029f0| 29 20 72 65 74 75 72 6e | 3b 0a 09 6f 74 20 28 73 |) return|;..ot (s|
|00002a00| 63 70 74 72 5b 53 54 4f | 52 41 47 45 5d 20 3d 3d |cptr[STO|RAGE] ==|
|00002a10| 20 45 58 54 45 52 4e 20 | 3f 20 22 65 78 74 72 6e | EXTERN |? "extrn|
|00002a20| 5c 74 22 20 3a 20 22 70 | 75 62 6c 69 63 5c 74 22 |\t" : "p|ublic\t"|
|00002a30| 29 3b 0a 09 70 72 65 66 | 69 78 20 28 29 3b 0a 09 |);..pref|ix ();..|
|00002a40| 6f 75 74 73 74 72 20 28 | 73 63 70 74 72 29 3b 0a |outstr (|scptr);.|
|00002a50| 09 6e 6c 28 29 3b 0a 7d | 0a 0a 2f 2a 0a 20 2a 20 |.nl();.}|../*. * |
|00002a60| 4f 75 74 70 75 74 20 74 | 68 65 20 66 75 6e 63 74 |Output t|he funct|
|00002a70| 69 6f 6e 20 73 79 6d 62 | 6f 6c 20 61 74 20 73 63 |ion symb|ol at sc|
|00002a80| 70 74 72 20 61 73 20 61 | 6e 20 65 78 74 72 6e 20 |ptr as a|n extrn |
|00002a90| 6f 72 20 61 20 70 75 62 | 6c 69 63 0a 20 2a 2f 0a |or a pub|lic. */.|
|00002aa0| 66 70 75 62 65 78 74 28 | 73 63 70 74 72 29 20 63 |fpubext(|scptr) c|
|00002ab0| 68 61 72 20 2a 73 63 70 | 74 72 3b 20 7b 0a 09 69 |har *scp|tr; {..i|
|00002ac0| 66 20 28 73 63 70 74 72 | 5b 53 54 4f 52 41 47 45 |f (scptr|[STORAGE|
|00002ad0| 5d 20 3d 3d 20 53 54 41 | 54 49 43 29 20 72 65 74 |] == STA|TIC) ret|
|00002ae0| 75 72 6e 3b 0a 09 6f 74 | 20 28 73 63 70 74 72 5b |urn;..ot| (scptr[|
|00002af0| 4f 46 46 53 45 54 5d 20 | 3d 3d 20 46 55 4e 43 54 |OFFSET] |== FUNCT|
|00002b00| 49 4f 4e 20 3f 20 22 70 | 75 62 6c 69 63 5c 74 22 |ION ? "p|ublic\t"|
|00002b10| 20 3a 20 22 65 78 74 72 | 6e 5c 74 22 29 3b 0a 09 | : "extr|n\t");..|
|00002b20| 70 72 65 66 69 78 20 28 | 29 3b 0a 09 6f 75 74 73 |prefix (|);..outs|
|00002b30| 74 72 20 28 73 63 70 74 | 72 29 3b 0a 09 6e 6c 20 |tr (scpt|r);..nl |
|00002b40| 28 29 3b 0a 7d 0a 0a 2f | 2a 0a 20 2a 20 20 4f 75 |();.}../|*. * Ou|
|00002b50| 74 70 75 74 20 61 20 64 | 65 63 69 6d 61 6c 20 6e |tput a d|ecimal n|
|00002b60| 75 6d 62 65 72 20 74 6f | 20 74 68 65 20 61 73 73 |umber to| the ass|
|00002b70| 65 6d 62 6c 65 72 20 66 | 69 6c 65 0a 20 2a 2f 0a |embler f|ile. */.|
|00002b80| 6f 6e 75 6d 28 6e 75 6d | 29 20 69 6e 74 20 6e 75 |onum(num|) int nu|
|00002b90| 6d 3b 20 7b 0a 09 6f 75 | 74 64 65 63 28 6e 75 6d |m; {..ou|tdec(num|
|00002ba0| 29 3b 09 2f 2a 20 70 64 | 70 31 31 20 6e 65 65 64 |);./* pd|p11 need|
|00002bb0| 73 20 61 20 22 2e 22 20 | 68 65 72 65 20 2a 2f 0a |s a "." |here */.|
|00002bc0| 7d 0a 0a 0a 2f 2a 0a 20 | 2a 09 66 65 74 63 68 20 |}.../*. |*.fetch |
|00002bd0| 61 20 73 74 61 74 69 63 | 20 6d 65 6d 6f 72 79 20 |a static| memory |
|00002be0| 63 65 6c 6c 20 69 6e 74 | 6f 20 74 68 65 20 70 72 |cell int|o the pr|
|00002bf0| 69 6d 61 72 79 20 72 65 | 67 69 73 74 65 72 0a 20 |imary re|gister. |
|00002c00| 2a 2f 0a 67 65 74 6d 65 | 6d 20 28 73 79 6d 29 0a |*/.getme|m (sym).|
|00002c10| 63 68 61 72 09 2a 73 79 | 6d 3b 0a 7b 0a 09 69 66 |char.*sy|m;.{..if|
|00002c20| 20 28 28 73 79 6d 5b 49 | 44 45 4e 54 5d 20 21 3d | ((sym[I|DENT] !=|
|00002c30| 20 50 4f 49 4e 54 45 52 | 29 20 26 20 28 73 79 6d | POINTER|) & (sym|
|00002c40| 5b 54 59 50 45 5d 20 3d | 3d 20 43 43 48 41 52 29 |[TYPE] =|= CCHAR)|
|00002c50| 29 20 7b 0a 09 09 6f 74 | 20 28 22 6c 64 61 5c 74 |) {...ot| ("lda\t|
|00002c60| 22 29 3b 0a 09 09 6f 75 | 74 73 74 72 20 28 73 79 |");...ou|tstr (sy|
|00002c70| 6d 20 2b 20 4e 41 4d 45 | 29 3b 0a 09 09 6e 6c 20 |m + NAME|);...nl |
|00002c80| 28 29 3b 0a 09 09 67 63 | 61 6c 6c 20 28 22 3f 73 |();...gc|all ("?s|
|00002c90| 78 74 22 29 3b 0a 09 7d | 20 65 6c 73 65 20 7b 0a |xt");..}| else {.|
|00002ca0| 09 09 6f 74 20 28 22 6c | 68 6c 64 5c 74 22 29 3b |..ot ("l|hld\t");|
|00002cb0| 0a 09 09 6f 75 74 73 74 | 72 20 28 73 79 6d 20 2b |...outst|r (sym +|
|00002cc0| 20 4e 41 4d 45 29 3b 0a | 09 09 6e 6c 20 28 29 3b | NAME);.|..nl ();|
|00002cd0| 0a 09 7d 0a 7d 0a 0a 2f | 2a 0a 20 2a 09 66 65 74 |..}.}../|*. *.fet|
|00002ce0| 63 68 20 74 68 65 20 61 | 64 64 72 65 73 73 20 6f |ch the a|ddress o|
|00002cf0| 66 20 74 68 65 20 73 70 | 65 63 69 66 69 65 64 20 |f the sp|ecified |
|00002d00| 73 79 6d 62 6f 6c 20 69 | 6e 74 6f 20 74 68 65 20 |symbol i|nto the |
|00002d10| 70 72 69 6d 61 72 79 20 | 72 65 67 69 73 74 65 72 |primary |register|
|00002d20| 0a 20 2a 0a 20 2a 2f 0a | 67 65 74 6c 6f 63 20 28 |. *. */.|getloc (|
|00002d30| 73 79 6d 29 0a 63 68 61 | 72 09 2a 73 79 6d 3b 0a |sym).cha|r.*sym;.|
|00002d40| 7b 0a 09 69 6d 6d 65 64 | 20 28 29 3b 0a 09 69 66 |{..immed| ();..if|
|00002d50| 20 28 73 79 6d 5b 53 54 | 4f 52 41 47 45 5d 20 3d | (sym[ST|ORAGE] =|
|00002d60| 3d 20 4c 53 54 41 54 49 | 43 29 20 7b 0a 09 09 70 |= LSTATI|C) {...p|
|00002d70| 72 69 6e 74 6c 61 62 65 | 6c 28 67 6c 69 6e 74 28 |rintlabe|l(glint(|
|00002d80| 73 79 6d 29 29 3b 0a 09 | 09 6e 6c 28 29 3b 0a 09 |sym));..|.nl();..|
|00002d90| 7d 20 65 6c 73 65 20 7b | 0a 09 09 6f 75 74 64 65 |} else {|...outde|
|00002da0| 63 20 28 67 6c 69 6e 74 | 28 73 79 6d 29 20 2d 20 |c (glint|(sym) - |
|00002db0| 73 74 6b 70 29 3b 0a 09 | 09 6e 6c 20 28 29 3b 0a |stkp);..|.nl ();.|
|00002dc0| 09 09 6f 6c 20 28 22 64 | 61 64 5c 74 73 70 22 29 |..ol ("d|ad\tsp")|
|00002dd0| 3b 0a 09 7d 0a 7d 0a 0a | 2f 2a 0a 20 2a 09 73 74 |;..}.}..|/*. *.st|
|00002de0| 6f 72 65 20 74 68 65 20 | 70 72 69 6d 61 72 79 20 |ore the |primary |
|00002df0| 72 65 67 69 73 74 65 72 | 20 69 6e 74 6f 20 74 68 |register| into th|
|00002e00| 65 20 73 70 65 63 69 66 | 69 65 64 20 73 74 61 74 |e specif|ied stat|
|00002e10| 69 63 20 6d 65 6d 6f 72 | 79 20 63 65 6c 6c 0a 20 |ic memor|y cell. |
|00002e20| 2a 0a 20 2a 2f 0a 70 75 | 74 6d 65 6d 20 28 73 79 |*. */.pu|tmem (sy|
|00002e30| 6d 29 0a 63 68 61 72 09 | 2a 73 79 6d 3b 0a 7b 0a |m).char.|*sym;.{.|
|00002e40| 09 69 66 20 28 28 73 79 | 6d 5b 49 44 45 4e 54 5d |.if ((sy|m[IDENT]|
|00002e50| 20 21 3d 20 50 4f 49 4e | 54 45 52 29 20 26 20 28 | != POIN|TER) & (|
|00002e60| 73 79 6d 5b 54 59 50 45 | 5d 20 3d 3d 20 43 43 48 |sym[TYPE|] == CCH|
|00002e70| 41 52 29 29 20 7b 0a 09 | 09 6f 6c 20 28 22 6d 6f |AR)) {..|.ol ("mo|
|00002e80| 76 5c 74 61 2c 6c 22 29 | 3b 0a 09 09 6f 74 20 28 |v\ta,l")|;...ot (|
|00002e90| 22 73 74 61 5c 74 22 29 | 3b 0a 09 7d 20 65 6c 73 |"sta\t")|;..} els|
|00002ea0| 65 0a 09 09 6f 74 20 28 | 22 73 68 6c 64 5c 74 22 |e...ot (|"shld\t"|
|00002eb0| 29 3b 0a 09 6f 75 74 73 | 74 72 20 28 73 79 6d 20 |);..outs|tr (sym |
|00002ec0| 2b 20 4e 41 4d 45 29 3b | 0a 09 6e 6c 20 28 29 3b |+ NAME);|..nl ();|
|00002ed0| 0a 7d 0a 0a 2f 2a 0a 20 | 2a 09 73 74 6f 72 65 20 |.}../*. |*.store |
|00002ee0| 74 68 65 20 73 70 65 63 | 69 66 69 65 64 20 6f 62 |the spec|ified ob|
|00002ef0| 6a 65 63 74 20 74 79 70 | 65 20 69 6e 20 74 68 65 |ject typ|e in the|
|00002f00| 20 70 72 69 6d 61 72 79 | 20 72 65 67 69 73 74 65 | primary| registe|
|00002f10| 72 0a 20 2a 09 61 74 20 | 74 68 65 20 61 64 64 72 |r. *.at |the addr|
|00002f20| 65 73 73 20 6f 6e 20 74 | 68 65 20 74 6f 70 20 6f |ess on t|he top o|
|00002f30| 66 20 74 68 65 20 73 74 | 61 63 6b 0a 20 2a 0a 20 |f the st|ack. *. |
|00002f40| 2a 2f 0a 70 75 74 73 74 | 6b 20 28 74 79 70 65 6f |*/.putst|k (typeo|
|00002f50| 62 6a 29 0a 63 68 61 72 | 09 74 79 70 65 6f 62 6a |bj).char|.typeobj|
|00002f60| 3b 0a 7b 0a 09 67 70 6f | 70 20 28 29 3b 0a 09 69 |;.{..gpo|p ();..i|
|00002f70| 66 20 28 74 79 70 65 6f | 62 6a 20 3d 3d 20 43 43 |f (typeo|bj == CC|
|00002f80| 48 41 52 29 0a 09 09 67 | 63 61 6c 6c 20 28 22 3f |HAR)...g|call ("?|
|00002f90| 70 63 68 61 72 22 29 3b | 0a 09 65 6c 73 65 0a 09 |pchar");|..else..|
|00002fa0| 09 67 63 61 6c 6c 20 28 | 22 3f 70 69 6e 74 22 29 |.gcall (|"?pint")|
|00002fb0| 3b 0a 7d 0a 0a 2f 2a 0a | 20 2a 09 66 65 74 63 68 |;.}../*.| *.fetch|
|00002fc0| 20 74 68 65 20 73 70 65 | 63 69 66 69 65 64 20 6f | the spe|cified o|
|00002fd0| 62 6a 65 63 74 20 74 79 | 70 65 20 69 6e 64 69 72 |bject ty|pe indir|
|00002fe0| 65 63 74 20 74 68 72 6f | 75 67 68 20 74 68 65 20 |ect thro|ugh the |
|00002ff0| 70 72 69 6d 61 72 79 0a | 20 2a 09 72 65 67 69 73 |primary.| *.regis|
|00003000| 74 65 72 20 69 6e 74 6f | 20 74 68 65 20 70 72 69 |ter into| the pri|
|00003010| 6d 61 72 79 20 72 65 67 | 69 73 74 65 72 0a 20 2a |mary reg|ister. *|
|00003020| 0a 20 2a 2f 0a 69 6e 64 | 69 72 65 63 74 20 28 74 |. */.ind|irect (t|
|00003030| 79 70 65 6f 62 6a 29 0a | 63 68 61 72 09 74 79 70 |ypeobj).|char.typ|
|00003040| 65 6f 62 6a 3b 0a 7b 0a | 09 69 66 20 28 74 79 70 |eobj;.{.|.if (typ|
|00003050| 65 6f 62 6a 20 3d 3d 20 | 43 43 48 41 52 29 0a 09 |eobj == |CCHAR)..|
|00003060| 09 67 63 61 6c 6c 20 28 | 22 3f 67 63 68 61 72 22 |.gcall (|"?gchar"|
|00003070| 29 3b 0a 09 65 6c 73 65 | 0a 09 09 67 63 61 6c 6c |);..else|...gcall|
|00003080| 20 28 22 3f 67 69 6e 74 | 22 29 3b 0a 7d 0a 0a 2f | ("?gint|");.}../|
|00003090| 2a 0a 20 2a 09 73 77 61 | 70 20 74 68 65 20 70 72 |*. *.swa|p the pr|
|000030a0| 69 6d 61 72 79 20 61 6e | 64 20 73 65 63 6f 6e 64 |imary an|d second|
|000030b0| 61 72 79 20 72 65 67 69 | 73 74 65 72 73 0a 20 2a |ary regi|sters. *|
|000030c0| 0a 20 2a 2f 0a 73 77 61 | 70 20 28 29 0a 7b 0a 09 |. */.swa|p ().{..|
|000030d0| 6f 6c 20 28 22 78 63 68 | 67 22 29 3b 0a 7d 0a 0a |ol ("xch|g");.}..|
|000030e0| 2f 2a 0a 20 2a 09 70 72 | 69 6e 74 20 70 61 72 74 |/*. *.pr|int part|
|000030f0| 69 61 6c 20 69 6e 73 74 | 72 75 63 74 69 6f 6e 20 |ial inst|ruction |
|00003100| 74 6f 20 67 65 74 20 61 | 6e 20 69 6d 6d 65 64 69 |to get a|n immedi|
|00003110| 61 74 65 20 76 61 6c 75 | 65 20 69 6e 74 6f 0a 20 |ate valu|e into. |
|00003120| 2a 09 74 68 65 20 70 72 | 69 6d 61 72 79 20 72 65 |*.the pr|imary re|
|00003130| 67 69 73 74 65 72 0a 20 | 2a 0a 20 2a 2f 0a 69 6d |gister. |*. */.im|
|00003140| 6d 65 64 20 28 29 0a 7b | 0a 09 6f 74 20 28 22 6c |med ().{|..ot ("l|
|00003150| 78 69 5c 74 68 2c 22 29 | 3b 0a 7d 0a 0a 2f 2a 0a |xi\th,")|;.}../*.|
|00003160| 20 2a 09 70 75 73 68 20 | 74 68 65 20 70 72 69 6d | *.push |the prim|
|00003170| 61 72 79 20 72 65 67 69 | 73 74 65 72 20 6f 6e 74 |ary regi|ster ont|
|00003180| 6f 20 74 68 65 20 73 74 | 61 63 6b 0a 20 2a 0a 20 |o the st|ack. *. |
|00003190| 2a 2f 0a 67 70 75 73 68 | 20 28 29 0a 7b 0a 09 6f |*/.gpush| ().{..o|
|000031a0| 6c 20 28 22 70 75 73 68 | 5c 74 68 22 29 3b 0a 09 |l ("push|\th");..|
|000031b0| 73 74 6b 70 20 3d 20 73 | 74 6b 70 20 2d 20 49 4e |stkp = s|tkp - IN|
|000031c0| 54 53 49 5a 45 3b 0a 7d | 0a 0a 2f 2a 0a 20 2a 09 |TSIZE;.}|../*. *.|
|000031d0| 70 6f 70 20 74 68 65 20 | 74 6f 70 20 6f 66 20 74 |pop the |top of t|
|000031e0| 68 65 20 73 74 61 63 6b | 20 69 6e 74 6f 20 74 68 |he stack| into th|
|000031f0| 65 20 73 65 63 6f 6e 64 | 61 72 79 20 72 65 67 69 |e second|ary regi|
|00003200| 73 74 65 72 0a 20 2a 0a | 20 2a 2f 0a 67 70 6f 70 |ster. *.| */.gpop|
|00003210| 20 28 29 0a 7b 0a 09 6f | 6c 20 28 22 70 6f 70 5c | ().{..o|l ("pop\|
|00003220| 74 64 22 29 3b 0a 09 73 | 74 6b 70 20 3d 20 73 74 |td");..s|tkp = st|
|00003230| 6b 70 20 2b 20 49 4e 54 | 53 49 5a 45 3b 0a 7d 0a |kp + INT|SIZE;.}.|
|00003240| 0a 2f 2a 0a 20 2a 09 73 | 77 61 70 20 74 68 65 20 |./*. *.s|wap the |
|00003250| 70 72 69 6d 61 72 79 20 | 72 65 67 69 73 74 65 72 |primary |register|
|00003260| 20 61 6e 64 20 74 68 65 | 20 74 6f 70 20 6f 66 20 | and the| top of |
|00003270| 74 68 65 20 73 74 61 63 | 6b 0a 20 2a 0a 20 2a 2f |the stac|k. *. */|
|00003280| 0a 73 77 61 70 73 74 6b | 20 28 29 0a 7b 0a 09 6f |.swapstk| ().{..o|
|00003290| 6c 20 28 22 78 74 68 6c | 22 29 3b 0a 7d 0a 0a 2f |l ("xthl|");.}../|
|000032a0| 2a 0a 20 2a 09 63 61 6c | 6c 20 74 68 65 20 73 70 |*. *.cal|l the sp|
|000032b0| 65 63 69 66 69 65 64 20 | 73 75 62 72 6f 75 74 69 |ecified |subrouti|
|000032c0| 6e 65 20 6e 61 6d 65 0a | 20 2a 0a 20 2a 2f 0a 67 |ne name.| *. */.g|
|000032d0| 63 61 6c 6c 20 28 73 6e | 61 6d 65 29 0a 63 68 61 |call (sn|ame).cha|
|000032e0| 72 09 2a 73 6e 61 6d 65 | 3b 0a 7b 0a 09 6f 74 20 |r.*sname|;.{..ot |
|000032f0| 28 22 63 61 6c 6c 5c 74 | 22 29 3b 0a 09 6f 75 74 |("call\t|");..out|
|00003300| 73 74 72 20 28 73 6e 61 | 6d 65 29 3b 0a 09 6e 6c |str (sna|me);..nl|
|00003310| 20 28 29 3b 0a 7d 0a 0a | 2f 2a 0a 20 2a 09 72 65 | ();.}..|/*. *.re|
|00003320| 74 75 72 6e 20 66 72 6f | 6d 20 73 75 62 72 6f 75 |turn fro|m subrou|
|00003330| 74 69 6e 65 0a 20 2a 0a | 20 2a 2f 0a 67 72 65 74 |tine. *.| */.gret|
|00003340| 20 28 29 0a 7b 0a 09 6f | 6c 20 28 22 72 65 74 22 | ().{..o|l ("ret"|
|00003350| 29 3b 0a 7d 0a 0a 2f 2a | 0a 20 2a 09 70 65 72 66 |);.}../*|. *.perf|
|00003360| 6f 72 6d 20 73 75 62 72 | 6f 75 74 69 6e 65 20 63 |orm subr|outine c|
|00003370| 61 6c 6c 20 74 6f 20 76 | 61 6c 75 65 20 6f 6e 20 |all to v|alue on |
|00003380| 74 6f 70 20 6f 66 20 73 | 74 61 63 6b 0a 20 2a 0a |top of s|tack. *.|
|00003390| 20 2a 2f 0a 63 61 6c 6c | 73 74 6b 20 28 29 0a 7b | */.call|stk ().{|
|000033a0| 0a 09 69 6d 6d 65 64 20 | 28 29 3b 0a 09 6f 75 74 |..immed |();..out|
|000033b0| 73 74 72 20 28 22 24 2b | 35 22 29 3b 0a 09 6e 6c |str ("$+|5");..nl|
|000033c0| 20 28 29 3b 0a 09 73 77 | 61 70 73 74 6b 20 28 29 | ();..sw|apstk ()|
|000033d0| 3b 0a 09 6f 6c 20 28 22 | 70 63 68 6c 22 29 3b 0a |;..ol ("|pchl");.|
|000033e0| 09 73 74 6b 70 20 3d 20 | 73 74 6b 70 20 2b 20 49 |.stkp = |stkp + I|
|000033f0| 4e 54 53 49 5a 45 3b 0a | 7d 0a 0a 2f 2a 0a 20 2a |NTSIZE;.|}../*. *|
|00003400| 09 6a 75 6d 70 20 74 6f | 20 73 70 65 63 69 66 69 |.jump to| specifi|
|00003410| 65 64 20 69 6e 74 65 72 | 6e 61 6c 20 6c 61 62 65 |ed inter|nal labe|
|00003420| 6c 20 6e 75 6d 62 65 72 | 0a 20 2a 0a 20 2a 2f 0a |l number|. *. */.|
|00003430| 6a 75 6d 70 20 28 6c 61 | 62 65 6c 29 0a 69 6e 74 |jump (la|bel).int|
|00003440| 09 6c 61 62 65 6c 3b 0a | 7b 0a 09 6f 74 20 28 22 |.label;.|{..ot ("|
|00003450| 6a 6d 70 5c 74 22 29 3b | 0a 09 70 72 69 6e 74 6c |jmp\t");|..printl|
|00003460| 61 62 65 6c 20 28 6c 61 | 62 65 6c 29 3b 0a 09 6e |abel (la|bel);..n|
|00003470| 6c 20 28 29 3b 0a 7d 0a | 0a 2f 2a 0a 20 2a 09 74 |l ();.}.|./*. *.t|
|00003480| 65 73 74 20 74 68 65 20 | 70 72 69 6d 61 72 79 20 |est the |primary |
|00003490| 72 65 67 69 73 74 65 72 | 20 61 6e 64 20 6a 75 6d |register| and jum|
|000034a0| 70 20 69 66 20 66 61 6c | 73 65 20 74 6f 20 6c 61 |p if fal|se to la|
|000034b0| 62 65 6c 0a 20 2a 0a 20 | 2a 2f 0a 74 65 73 74 6a |bel. *. |*/.testj|
|000034c0| 75 6d 70 20 28 6c 61 62 | 65 6c 2c 20 66 74 29 0a |ump (lab|el, ft).|
|000034d0| 69 6e 74 09 6c 61 62 65 | 6c 2c 0a 09 66 74 3b 0a |int.labe|l,..ft;.|
|000034e0| 7b 0a 09 6f 6c 20 28 22 | 6d 6f 76 5c 74 61 2c 68 |{..ol ("|mov\ta,h|
|000034f0| 22 29 3b 0a 09 6f 6c 20 | 28 22 6f 72 61 5c 74 6c |");..ol |("ora\tl|
|00003500| 22 29 3b 0a 09 69 66 20 | 28 66 74 29 0a 09 09 6f |");..if |(ft)...o|
|00003510| 74 20 28 22 6a 6e 7a 5c | 74 22 29 3b 0a 09 65 6c |t ("jnz\|t");..el|
|00003520| 73 65 0a 09 09 6f 74 20 | 28 22 6a 7a 5c 74 22 29 |se...ot |("jz\t")|
|00003530| 3b 0a 09 70 72 69 6e 74 | 6c 61 62 65 6c 20 28 6c |;..print|label (l|
|00003540| 61 62 65 6c 29 3b 0a 09 | 6e 6c 20 28 29 3b 0a 7d |abel);..|nl ();.}|
|00003550| 0a 0a 2f 2a 0a 20 2a 09 | 70 72 69 6e 74 20 70 73 |../*. *.|print ps|
|00003560| 65 75 64 6f 2d 6f 70 20 | 20 74 6f 20 64 65 66 69 |eudo-op | to defi|
|00003570| 6e 65 20 61 20 62 79 74 | 65 0a 20 2a 0a 20 2a 2f |ne a byt|e. *. */|
|00003580| 0a 64 65 66 62 79 74 65 | 20 28 29 0a 7b 0a 09 6f |.defbyte| ().{..o|
|00003590| 74 20 28 22 64 62 5c 74 | 22 29 3b 0a 7d 0a 0a 2f |t ("db\t|");.}../|
|000035a0| 2a 0a 20 2a 09 70 72 69 | 6e 74 20 70 73 65 75 64 |*. *.pri|nt pseud|
|000035b0| 6f 2d 6f 70 20 74 6f 20 | 64 65 66 69 6e 65 20 73 |o-op to |define s|
|000035c0| 74 6f 72 61 67 65 0a 20 | 2a 0a 20 2a 2f 0a 64 65 |torage. |*. */.de|
|000035d0| 66 73 74 6f 72 61 67 65 | 20 28 29 0a 7b 0a 09 6f |fstorage| ().{..o|
|000035e0| 74 20 28 22 64 73 5c 74 | 22 29 3b 0a 7d 0a 0a 2f |t ("ds\t|");.}../|
|000035f0| 2a 0a 20 2a 09 70 72 69 | 6e 74 20 70 73 65 75 64 |*. *.pri|nt pseud|
|00003600| 6f 2d 6f 70 20 74 6f 20 | 64 65 66 69 6e 65 20 61 |o-op to |define a|
|00003610| 20 77 6f 72 64 0a 20 2a | 0a 20 2a 2f 0a 64 65 66 | word. *|. */.def|
|00003620| 77 6f 72 64 20 28 29 0a | 7b 0a 09 6f 74 20 28 22 |word ().|{..ot ("|
|00003630| 64 77 5c 74 22 29 3b 0a | 7d 0a 0a 2f 2a 0a 20 2a |dw\t");.|}../*. *|
|00003640| 09 6d 6f 64 69 66 79 20 | 74 68 65 20 73 74 61 63 |.modify |the stac|
|00003650| 6b 20 70 6f 69 6e 74 65 | 72 20 74 6f 20 74 68 65 |k pointe|r to the|
|00003660| 20 6e 65 77 20 76 61 6c | 75 65 20 69 6e 64 69 63 | new val|ue indic|
|00003670| 61 74 65 64 0a 20 2a 0a | 20 2a 2f 0a 6d 6f 64 73 |ated. *.| */.mods|
|00003680| 74 6b 20 28 6e 65 77 73 | 74 6b 70 29 0a 69 6e 74 |tk (news|tkp).int|
|00003690| 09 6e 65 77 73 74 6b 70 | 3b 0a 7b 0a 09 69 6e 74 |.newstkp|;.{..int|
|000036a0| 09 6b 3b 0a 0a 09 6b 20 | 3d 20 67 61 6c 69 67 6e |.k;...k |= galign|
|000036b0| 28 6e 65 77 73 74 6b 70 | 20 2d 20 73 74 6b 70 29 |(newstkp| - stkp)|
|000036c0| 3b 0a 09 69 66 20 28 6b | 20 3d 3d 20 30 29 0a 09 |;..if (k| == 0)..|
|000036d0| 09 72 65 74 75 72 6e 20 | 28 6e 65 77 73 74 6b 70 |.return |(newstkp|
|000036e0| 29 3b 0a 09 69 66 20 28 | 6b 20 3e 20 30 29 20 7b |);..if (|k > 0) {|
|000036f0| 0a 09 09 69 66 20 28 6b | 20 3c 20 37 29 20 7b 0a |...if (k| < 7) {.|
|00003700| 09 09 09 69 66 20 28 6b | 20 26 20 31 29 20 7b 0a |...if (k| & 1) {.|
|00003710| 09 09 09 09 6f 6c 20 28 | 22 69 6e 78 5c 74 73 70 |....ol (|"inx\tsp|
|00003720| 22 29 3b 0a 09 09 09 09 | 6b 2d 2d 3b 0a 09 09 09 |");.....|k--;....|
|00003730| 7d 0a 09 09 09 77 68 69 | 6c 65 20 28 6b 29 20 7b |}....whi|le (k) {|
|00003740| 0a 09 09 09 09 6f 6c 20 | 28 22 70 6f 70 5c 74 62 |.....ol |("pop\tb|
|00003750| 22 29 3b 0a 09 09 09 09 | 6b 20 3d 20 6b 20 2d 20 |");.....|k = k - |
|00003760| 49 4e 54 53 49 5a 45 3b | 0a 09 09 09 7d 0a 09 09 |INTSIZE;|....}...|
|00003770| 09 72 65 74 75 72 6e 20 | 28 6e 65 77 73 74 6b 70 |.return |(newstkp|
|00003780| 29 3b 0a 09 09 7d 0a 09 | 7d 20 65 6c 73 65 20 7b |);...}..|} else {|
|00003790| 0a 09 09 69 66 20 28 6b | 20 3e 20 2d 37 29 20 7b |...if (k| > -7) {|
|000037a0| 0a 09 09 09 69 66 20 28 | 6b 20 26 20 31 29 20 7b |....if (|k & 1) {|
|000037b0| 0a 09 09 09 09 6f 6c 20 | 28 22 64 63 78 5c 74 73 |.....ol |("dcx\ts|
|000037c0| 70 22 29 3b 0a 09 09 09 | 09 6b 2b 2b 3b 0a 09 09 |p");....|.k++;...|
|000037d0| 09 7d 0a 09 09 09 77 68 | 69 6c 65 20 28 6b 29 20 |.}....wh|ile (k) |
|000037e0| 7b 0a 09 09 09 09 6f 6c | 20 28 22 70 75 73 68 5c |{.....ol| ("push\|
|000037f0| 74 62 22 29 3b 0a 09 09 | 09 09 6b 20 3d 20 6b 20 |tb");...|..k = k |
|00003800| 2b 20 49 4e 54 53 49 5a | 45 3b 0a 09 09 09 7d 0a |+ INTSIZ|E;....}.|
|00003810| 09 09 09 72 65 74 75 72 | 6e 20 28 6e 65 77 73 74 |...retur|n (newst|
|00003820| 6b 70 29 3b 0a 09 09 7d | 0a 09 7d 0a 09 73 77 61 |kp);...}|..}..swa|
|00003830| 70 20 28 29 3b 0a 09 69 | 6d 6d 65 64 20 28 29 3b |p ();..i|mmed ();|
|00003840| 0a 09 6f 75 74 64 65 63 | 20 28 6b 29 3b 0a 09 6e |..outdec| (k);..n|
|00003850| 6c 20 28 29 3b 0a 09 6f | 6c 20 28 22 64 61 64 5c |l ();..o|l ("dad\|
|00003860| 74 73 70 22 29 3b 0a 09 | 6f 6c 20 28 22 73 70 68 |tsp");..|ol ("sph|
|00003870| 6c 22 29 3b 0a 09 73 77 | 61 70 20 28 29 3b 0a 09 |l");..sw|ap ();..|
|00003880| 72 65 74 75 72 6e 20 28 | 6e 65 77 73 74 6b 70 29 |return (|newstkp)|
|00003890| 3b 0a 7d 0a 0a 2f 2a 0a | 20 2a 09 6d 75 6c 74 69 |;.}../*.| *.multi|
|000038a0| 70 6c 79 20 74 68 65 20 | 70 72 69 6d 61 72 79 20 |ply the |primary |
|000038b0| 72 65 67 69 73 74 65 72 | 20 62 79 20 49 4e 54 53 |register| by INTS|
|000038c0| 49 5a 45 0a 20 2a 2f 0a | 67 61 73 6c 69 6e 74 20 |IZE. */.|gaslint |
|000038d0| 28 29 0a 7b 0a 09 6f 6c | 20 28 22 64 61 64 5c 74 |().{..ol| ("dad\t|
|000038e0| 68 22 29 3b 0a 7d 0a 0a | 2f 2a 0a 20 2a 09 64 69 |h");.}..|/*. *.di|
|000038f0| 76 69 64 65 20 74 68 65 | 20 70 72 69 6d 61 72 79 |vide the| primary|
|00003900| 20 72 65 67 69 73 74 65 | 72 20 62 79 20 49 4e 54 | registe|r by INT|
|00003910| 53 49 5a 45 0a 20 2a 2f | 0a 67 61 73 72 69 6e 74 |SIZE. */|.gasrint|
|00003920| 28 29 0a 7b 0a 09 67 70 | 75 73 68 28 29 3b 09 2f |().{..gp|ush();./|
|00003930| 2a 20 70 75 73 68 20 70 | 72 69 6d 61 72 79 20 69 |* push p|rimary i|
|00003940| 6e 20 70 72 65 70 20 66 | 6f 72 20 67 61 73 72 20 |n prep f|or gasr |
|00003950| 2a 2f 0a 09 69 6d 6d 65 | 64 20 28 29 3b 0a 09 6f |*/..imme|d ();..o|
|00003960| 6e 75 6d 20 28 31 29 3b | 0a 09 6e 6c 20 28 29 3b |num (1);|..nl ();|
|00003970| 0a 09 67 61 73 72 20 28 | 29 3b 20 20 2f 2a 20 64 |..gasr (|); /* d|
|00003980| 69 76 69 64 65 20 62 79 | 20 74 77 6f 20 2a 2f 0a |ivide by| two */.|
|00003990| 7d 0a 0a 2f 2a 0a 20 2a | 09 43 61 73 65 20 6a 75 |}../*. *|.Case ju|
|000039a0| 6d 70 20 69 6e 73 74 72 | 75 63 74 69 6f 6e 0a 20 |mp instr|uction. |
|000039b0| 2a 2f 0a 67 6a 63 61 73 | 65 28 29 20 7b 0a 09 6f |*/.gjcas|e() {..o|
|000039c0| 74 20 28 22 6a 6d 70 5c | 74 3f 63 61 73 65 22 29 |t ("jmp\|t?case")|
|000039d0| 3b 0a 09 6e 6c 20 28 29 | 3b 0a 7d 0a 0a 2f 2a 0a |;..nl ()|;.}../*.|
|000039e0| 20 2a 09 61 64 64 20 74 | 68 65 20 70 72 69 6d 61 | *.add t|he prima|
|000039f0| 72 79 20 61 6e 64 20 73 | 65 63 6f 6e 64 61 72 79 |ry and s|econdary|
|00003a00| 20 72 65 67 69 73 74 65 | 72 73 0a 20 2a 09 69 66 | registe|rs. *.if|
|00003a10| 20 6c 76 61 6c 32 20 69 | 73 20 69 6e 74 20 70 6f | lval2 i|s int po|
|00003a20| 69 6e 74 65 72 20 61 6e | 64 20 6c 76 61 6c 20 69 |inter an|d lval i|
|00003a30| 73 20 6e 6f 74 2c 20 73 | 63 61 6c 65 20 6c 76 61 |s not, s|cale lva|
|00003a40| 6c 0a 20 2a 2f 0a 67 61 | 64 64 20 28 6c 76 61 6c |l. */.ga|dd (lval|
|00003a50| 2c 6c 76 61 6c 32 29 20 | 69 6e 74 20 2a 6c 76 61 |,lval2) |int *lva|
|00003a60| 6c 2c 2a 6c 76 61 6c 32 | 3b 0a 7b 0a 09 67 70 6f |l,*lval2|;.{..gpo|
|00003a70| 70 20 28 29 3b 0a 09 69 | 66 20 28 64 62 6c 74 65 |p ();..i|f (dblte|
|00003a80| 73 74 20 28 6c 76 61 6c | 32 2c 20 6c 76 61 6c 29 |st (lval|2, lval)|
|00003a90| 29 20 7b 0a 09 09 73 77 | 61 70 20 28 29 3b 0a 09 |) {...sw|ap ();..|
|00003aa0| 09 67 61 73 6c 69 6e 74 | 20 28 29 3b 0a 09 09 73 |.gaslint| ();...s|
|00003ab0| 77 61 70 20 28 29 3b 0a | 09 7d 0a 09 6f 6c 20 28 |wap ();.|.}..ol (|
|00003ac0| 22 64 61 64 5c 74 64 22 | 29 3b 0a 7d 0a 0a 2f 2a |"dad\td"|);.}../*|
|00003ad0| 0a 20 2a 09 73 75 62 74 | 72 61 63 74 20 74 68 65 |. *.subt|ract the|
|00003ae0| 20 70 72 69 6d 61 72 79 | 20 72 65 67 69 73 74 65 | primary| registe|
|00003af0| 72 20 66 72 6f 6d 20 74 | 68 65 20 73 65 63 6f 6e |r from t|he secon|
|00003b00| 64 61 72 79 0a 20 2a 0a | 20 2a 2f 0a 67 73 75 62 |dary. *.| */.gsub|
|00003b10| 20 28 29 0a 7b 0a 09 67 | 70 6f 70 20 28 29 3b 0a | ().{..g|pop ();.|
|00003b20| 09 67 63 61 6c 6c 20 28 | 22 3f 73 75 62 22 29 3b |.gcall (|"?sub");|
|00003b30| 0a 7d 0a 0a 2f 2a 0a 20 | 2a 09 6d 75 6c 74 69 70 |.}../*. |*.multip|
|00003b40| 6c 79 20 74 68 65 20 70 | 72 69 6d 61 72 79 20 61 |ly the p|rimary a|
|00003b50| 6e 64 20 73 65 63 6f 6e | 64 61 72 79 20 72 65 67 |nd secon|dary reg|
|00003b60| 69 73 74 65 72 73 0a 20 | 2a 09 28 72 65 73 75 6c |isters. |*.(resul|
|00003b70| 74 20 69 6e 20 70 72 69 | 6d 61 72 79 29 0a 20 2a |t in pri|mary). *|
|00003b80| 0a 20 2a 2f 0a 67 6d 75 | 6c 74 20 28 29 0a 7b 0a |. */.gmu|lt ().{.|
|00003b90| 09 67 70 6f 70 28 29 3b | 0a 09 67 63 61 6c 6c 20 |.gpop();|..gcall |
|00003ba0| 28 22 3f 6d 75 6c 22 29 | 3b 0a 7d 0a 0a 2f 2a 0a |("?mul")|;.}../*.|
|00003bb0| 20 2a 09 64 69 76 69 64 | 65 20 74 68 65 20 73 65 | *.divid|e the se|
|00003bc0| 63 6f 6e 64 61 72 79 20 | 72 65 67 69 73 74 65 72 |condary |register|
|00003bd0| 20 62 79 20 74 68 65 20 | 70 72 69 6d 61 72 79 0a | by the |primary.|
|00003be0| 20 2a 09 28 71 75 6f 74 | 69 65 6e 74 20 69 6e 20 | *.(quot|ient in |
|00003bf0| 70 72 69 6d 61 72 79 2c | 20 72 65 6d 61 69 6e 64 |primary,| remaind|
|00003c00| 65 72 20 69 6e 20 73 65 | 63 6f 6e 64 61 72 79 29 |er in se|condary)|
|00003c10| 0a 20 2a 0a 20 2a 2f 0a | 67 64 69 76 20 28 29 0a |. *. */.|gdiv ().|
|00003c20| 7b 0a 09 67 70 6f 70 28 | 29 3b 0a 09 67 63 61 6c |{..gpop(|);..gcal|
|00003c30| 6c 20 28 22 3f 64 69 76 | 22 29 3b 0a 7d 0a 0a 2f |l ("?div|");.}../|
|00003c40| 2a 0a 20 2a 09 63 6f 6d | 70 75 74 65 20 74 68 65 |*. *.com|pute the|
|00003c50| 20 72 65 6d 61 69 6e 64 | 65 72 20 28 6d 6f 64 29 | remaind|er (mod)|
|00003c60| 20 6f 66 20 74 68 65 20 | 73 65 63 6f 6e 64 61 72 | of the |secondar|
|00003c70| 79 20 72 65 67 69 73 74 | 65 72 0a 20 2a 09 64 69 |y regist|er. *.di|
|00003c80| 76 69 64 65 64 20 62 79 | 20 74 68 65 20 70 72 69 |vided by| the pri|
|00003c90| 6d 61 72 79 20 72 65 67 | 69 73 74 65 72 0a 20 2a |mary reg|ister. *|
|00003ca0| 09 28 72 65 6d 61 69 6e | 64 65 72 20 69 6e 20 70 |.(remain|der in p|
|00003cb0| 72 69 6d 61 72 79 2c 20 | 71 75 6f 74 69 65 6e 74 |rimary, |quotient|
|00003cc0| 20 69 6e 20 73 65 63 6f | 6e 64 61 72 79 29 0a 20 | in seco|ndary). |
|00003cd0| 2a 0a 20 2a 2f 0a 67 6d | 6f 64 20 28 29 0a 7b 0a |*. */.gm|od ().{.|
|00003ce0| 09 67 64 69 76 20 28 29 | 3b 0a 09 73 77 61 70 20 |.gdiv ()|;..swap |
|00003cf0| 28 29 3b 0a 7d 0a 0a 2f | 2a 0a 20 2a 09 69 6e 63 |();.}../|*. *.inc|
|00003d00| 6c 75 73 69 76 65 20 27 | 6f 72 27 20 74 68 65 20 |lusive '|or' the |
|00003d10| 70 72 69 6d 61 72 79 20 | 61 6e 64 20 73 65 63 6f |primary |and seco|
|00003d20| 6e 64 61 72 79 20 72 65 | 67 69 73 74 65 72 73 0a |ndary re|gisters.|
|00003d30| 20 2a 0a 20 2a 2f 0a 67 | 6f 72 20 28 29 0a 7b 0a | *. */.g|or ().{.|
|00003d40| 09 67 70 6f 70 28 29 3b | 0a 09 67 63 61 6c 6c 20 |.gpop();|..gcall |
|00003d50| 28 22 3f 6f 72 22 29 3b | 0a 7d 0a 0a 2f 2a 0a 20 |("?or");|.}../*. |
|00003d60| 2a 09 65 78 63 6c 75 73 | 69 76 65 20 27 6f 72 27 |*.exclus|ive 'or'|
|00003d70| 20 74 68 65 20 70 72 69 | 6d 61 72 79 20 61 6e 64 | the pri|mary and|
|00003d80| 20 73 65 63 6f 6e 64 61 | 72 79 20 72 65 67 69 73 | seconda|ry regis|
|00003d90| 74 65 72 73 0a 20 2a 0a | 20 2a 2f 0a 67 78 6f 72 |ters. *.| */.gxor|
|00003da0| 20 28 29 0a 7b 0a 09 67 | 70 6f 70 28 29 3b 0a 09 | ().{..g|pop();..|
|00003db0| 67 63 61 6c 6c 20 28 22 | 3f 78 6f 72 22 29 3b 0a |gcall ("|?xor");.|
|00003dc0| 7d 0a 0a 2f 2a 0a 20 2a | 09 27 61 6e 64 27 20 74 |}../*. *|.'and' t|
|00003dd0| 68 65 20 70 72 69 6d 61 | 72 79 20 61 6e 64 20 73 |he prima|ry and s|
|00003de0| 65 63 6f 6e 64 61 72 79 | 20 72 65 67 69 73 74 65 |econdary| registe|
|00003df0| 72 73 0a 20 2a 0a 20 2a | 2f 0a 67 61 6e 64 20 28 |rs. *. *|/.gand (|
|00003e00| 29 0a 7b 0a 09 67 70 6f | 70 28 29 3b 0a 09 67 63 |).{..gpo|p();..gc|
|00003e10| 61 6c 6c 20 28 22 3f 61 | 6e 64 22 29 3b 0a 7d 0a |all ("?a|nd");.}.|
|00003e20| 0a 2f 2a 0a 20 2a 09 61 | 72 69 74 68 6d 65 74 69 |./*. *.a|rithmeti|
|00003e30| 63 20 73 68 69 66 74 20 | 72 69 67 68 74 20 74 68 |c shift |right th|
|00003e40| 65 20 73 65 63 6f 6e 64 | 61 72 79 20 72 65 67 69 |e second|ary regi|
|00003e50| 73 74 65 72 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |ster the| number |
|00003e60| 6f 66 0a 20 2a 09 74 69 | 6d 65 73 20 69 6e 20 74 |of. *.ti|mes in t|
|00003e70| 68 65 20 70 72 69 6d 61 | 72 79 20 72 65 67 69 73 |he prima|ry regis|
|00003e80| 74 65 72 0a 20 2a 09 28 | 72 65 73 75 6c 74 73 20 |ter. *.(|results |
|00003e90| 69 6e 20 70 72 69 6d 61 | 72 79 20 72 65 67 69 73 |in prima|ry regis|
|00003ea0| 74 65 72 29 0a 20 2a 0a | 20 2a 2f 0a 67 61 73 72 |ter). *.| */.gasr|
|00003eb0| 20 28 29 0a 7b 0a 09 67 | 70 6f 70 28 29 3b 0a 09 | ().{..g|pop();..|
|00003ec0| 67 63 61 6c 6c 20 28 22 | 3f 61 73 72 22 29 3b 0a |gcall ("|?asr");.|
|00003ed0| 7d 0a 0a 2f 2a 0a 20 2a | 09 61 72 69 74 68 6d 65 |}../*. *|.arithme|
|00003ee0| 74 69 63 20 73 68 69 66 | 74 20 6c 65 66 74 20 74 |tic shif|t left t|
|00003ef0| 68 65 20 73 65 63 6f 6e | 64 61 72 79 20 72 65 67 |he secon|dary reg|
|00003f00| 69 73 74 65 72 20 74 68 | 65 20 6e 75 6d 62 65 72 |ister th|e number|
|00003f10| 20 6f 66 0a 20 2a 09 74 | 69 6d 65 73 20 69 6e 20 | of. *.t|imes in |
|00003f20| 74 68 65 20 70 72 69 6d | 61 72 79 20 72 65 67 69 |the prim|ary regi|
|00003f30| 73 74 65 72 0a 20 2a 09 | 28 72 65 73 75 6c 74 73 |ster. *.|(results|
|00003f40| 20 69 6e 20 70 72 69 6d | 61 72 79 20 72 65 67 69 | in prim|ary regi|
|00003f50| 73 74 65 72 29 0a 20 2a | 0a 20 2a 2f 0a 67 61 73 |ster). *|. */.gas|
|00003f60| 6c 20 28 29 0a 7b 0a 09 | 67 70 6f 70 20 28 29 3b |l ().{..|gpop ();|
|00003f70| 0a 09 67 63 61 6c 6c 20 | 28 22 3f 61 73 6c 22 29 |..gcall |("?asl")|
|00003f80| 3b 0a 7d 0a 0a 2f 2a 0a | 20 2a 09 74 77 6f 27 73 |;.}../*.| *.two's|
|00003f90| 20 63 6f 6d 70 6c 65 6d | 65 6e 74 20 6f 66 20 70 | complem|ent of p|
|00003fa0| 72 69 6d 61 72 79 20 72 | 65 67 69 73 74 65 72 0a |rimary r|egister.|
|00003fb0| 20 2a 0a 20 2a 2f 0a 67 | 6e 65 67 20 28 29 0a 7b | *. */.g|neg ().{|
|00003fc0| 0a 09 67 63 61 6c 6c 20 | 28 22 3f 6e 65 67 22 29 |..gcall |("?neg")|
|00003fd0| 3b 0a 7d 0a 0a 2f 2a 0a | 20 2a 09 6c 6f 67 69 63 |;.}../*.| *.logic|
|00003fe0| 61 6c 20 63 6f 6d 70 6c | 65 6d 65 6e 74 20 6f 66 |al compl|ement of|
|00003ff0| 20 70 72 69 6d 61 72 79 | 20 72 65 67 69 73 74 65 | primary| registe|
|00004000| 72 0a 20 2a 0a 20 2a 2f | 0a 67 6c 6e 65 67 20 28 |r. *. */|.glneg (|
|00004010| 29 0a 7b 0a 09 67 63 61 | 6c 6c 20 28 22 3f 6c 6e |).{..gca|ll ("?ln|
|00004020| 65 67 22 29 3b 0a 7d 0a | 0a 2f 2a 0a 20 2a 09 6f |eg");.}.|./*. *.o|
|00004030| 6e 65 27 73 20 63 6f 6d | 70 6c 65 6d 65 6e 74 20 |ne's com|plement |
|00004040| 6f 66 20 70 72 69 6d 61 | 72 79 20 72 65 67 69 73 |of prima|ry regis|
|00004050| 74 65 72 0a 20 2a 0a 20 | 2a 2f 0a 67 63 6f 6d 20 |ter. *. |*/.gcom |
|00004060| 28 29 0a 7b 0a 09 67 63 | 61 6c 6c 20 28 22 3f 63 |().{..gc|all ("?c|
|00004070| 6f 6d 22 29 3b 0a 7d 0a | 0a 2f 2a 0a 20 2a 09 43 |om");.}.|./*. *.C|
|00004080| 6f 6e 76 65 72 74 20 70 | 72 69 6d 61 72 79 20 76 |onvert p|rimary v|
|00004090| 61 6c 75 65 20 69 6e 74 | 6f 20 6c 6f 67 69 63 61 |alue int|o logica|
|000040a0| 6c 20 76 61 6c 75 65 20 | 28 30 20 69 66 20 30 2c |l value |(0 if 0,|
|000040b0| 20 31 20 6f 74 68 65 72 | 77 69 73 65 29 0a 20 2a | 1 other|wise). *|
|000040c0| 0a 20 2a 2f 0a 67 62 6f | 6f 6c 20 28 29 0a 7b 0a |. */.gbo|ol ().{.|
|000040d0| 09 67 63 61 6c 6c 20 28 | 22 3f 62 6f 6f 6c 22 29 |.gcall (|"?bool")|
|000040e0| 3b 0a 7d 0a 0a 2f 2a 0a | 20 2a 09 69 6e 63 72 65 |;.}../*.| *.incre|
|000040f0| 6d 65 6e 74 20 74 68 65 | 20 70 72 69 6d 61 72 79 |ment the| primary|
|00004100| 20 72 65 67 69 73 74 65 | 72 20 62 79 20 31 20 69 | registe|r by 1 i|
|00004110| 66 20 63 68 61 72 2c 20 | 49 4e 54 53 49 5a 45 20 |f char, |INTSIZE |
|00004120| 69 66 0a 20 2a 20 20 20 | 20 20 20 69 6e 74 0a 20 |if. * | int. |
|00004130| 2a 2f 0a 67 69 6e 63 20 | 28 6c 76 61 6c 29 20 69 |*/.ginc |(lval) i|
|00004140| 6e 74 20 6c 76 61 6c 5b | 5d 3b 0a 7b 0a 09 6f 6c |nt lval[|];.{..ol|
|00004150| 20 28 22 69 6e 78 5c 74 | 68 22 29 3b 0a 09 69 66 | ("inx\t|h");..if|
|00004160| 20 28 6c 76 61 6c 5b 32 | 5d 20 3d 3d 20 43 49 4e | (lval[2|] == CIN|
|00004170| 54 29 0a 09 09 6f 6c 20 | 28 22 69 6e 78 5c 74 68 |T)...ol |("inx\th|
|00004180| 22 29 3b 0a 7d 0a 0a 2f | 2a 0a 20 2a 09 64 65 63 |");.}../|*. *.dec|
|00004190| 72 65 6d 65 6e 74 20 74 | 68 65 20 70 72 69 6d 61 |rement t|he prima|
|000041a0| 72 79 20 72 65 67 69 73 | 74 65 72 20 62 79 20 6f |ry regis|ter by o|
|000041b0| 6e 65 20 69 66 20 63 68 | 61 72 2c 20 49 4e 54 53 |ne if ch|ar, INTS|
|000041c0| 49 5a 45 20 69 66 0a 20 | 2a 09 69 6e 74 0a 20 2a |IZE if. |*.int. *|
|000041d0| 2f 0a 67 64 65 63 20 28 | 6c 76 61 6c 29 20 69 6e |/.gdec (|lval) in|
|000041e0| 74 20 6c 76 61 6c 5b 5d | 3b 0a 7b 0a 09 6f 6c 20 |t lval[]|;.{..ol |
|000041f0| 28 22 64 63 78 5c 74 68 | 22 29 3b 0a 09 69 66 20 |("dcx\th|");..if |
|00004200| 28 6c 76 61 6c 5b 32 5d | 20 3d 3d 20 43 49 4e 54 |(lval[2]| == CINT|
|00004210| 29 0a 09 09 6f 6c 28 22 | 64 63 78 5c 74 68 22 29 |)...ol("|dcx\th")|
|00004220| 3b 0a 7d 0a 0a 2f 2a 0a | 20 2a 09 66 6f 6c 6c 6f |;.}../*.| *.follo|
|00004230| 77 69 6e 67 20 61 72 65 | 20 74 68 65 20 63 6f 6e |wing are| the con|
|00004240| 64 69 74 69 6f 6e 61 6c | 20 6f 70 65 72 61 74 6f |ditional| operato|
|00004250| 72 73 2e 0a 20 2a 09 74 | 68 65 79 20 63 6f 6d 70 |rs.. *.t|hey comp|
|00004260| 61 72 65 20 74 68 65 20 | 73 65 63 6f 6e 64 61 72 |are the |secondar|
|00004270| 79 20 72 65 67 69 73 74 | 65 72 20 61 67 61 69 6e |y regist|er again|
|00004280| 73 74 20 74 68 65 20 70 | 72 69 6d 61 72 79 20 72 |st the p|rimary r|
|00004290| 65 67 69 73 74 65 72 0a | 20 2a 09 61 6e 64 20 70 |egister.| *.and p|
|000042a0| 75 74 20 61 20 6c 69 74 | 65 72 6c 20 31 20 69 6e |ut a lit|erl 1 in|
|000042b0| 20 74 68 65 20 70 72 69 | 6d 61 72 79 20 69 66 20 | the pri|mary if |
|000042c0| 74 68 65 20 63 6f 6e 64 | 69 74 69 6f 6e 20 69 73 |the cond|ition is|
|000042d0| 20 74 72 75 65 2c 0a 20 | 2a 09 6f 74 68 65 72 77 | true,. |*.otherw|
|000042e0| 69 73 65 20 74 68 65 79 | 20 63 6c 65 61 72 20 74 |ise they| clear t|
|000042f0| 68 65 20 70 72 69 6d 61 | 72 79 20 72 65 67 69 73 |he prima|ry regis|
|00004300| 74 65 72 0a 20 2a 0a 20 | 2a 2f 0a 0a 2f 2a 0a 20 |ter. *. |*/../*. |
|00004310| 2a 09 65 71 75 61 6c 0a | 20 2a 0a 20 2a 2f 0a 67 |*.equal.| *. */.g|
|00004320| 65 71 20 28 29 0a 7b 0a | 09 67 70 6f 70 28 29 3b |eq ().{.|.gpop();|
|00004330| 0a 09 67 63 61 6c 6c 20 | 28 22 3f 65 71 22 29 3b |..gcall |("?eq");|
|00004340| 0a 7d 0a 0a 2f 2a 0a 20 | 2a 09 6e 6f 74 20 65 71 |.}../*. |*.not eq|
|00004350| 75 61 6c 0a 20 2a 0a 20 | 2a 2f 0a 67 6e 65 20 28 |ual. *. |*/.gne (|
|00004360| 29 0a 7b 0a 09 67 70 6f | 70 28 29 3b 0a 09 67 63 |).{..gpo|p();..gc|
|00004370| 61 6c 6c 20 28 22 3f 6e | 65 22 29 3b 0a 7d 0a 0a |all ("?n|e");.}..|
|00004380| 2f 2a 0a 20 2a 09 6c 65 | 73 73 20 74 68 61 6e 20 |/*. *.le|ss than |
|00004390| 28 73 69 67 6e 65 64 29 | 0a 20 2a 0a 20 2a 2f 0a |(signed)|. *. */.|
|000043a0| 67 6c 74 20 28 29 0a 7b | 0a 09 67 70 6f 70 28 29 |glt ().{|..gpop()|
|000043b0| 3b 0a 09 67 63 61 6c 6c | 20 28 22 3f 6c 74 22 29 |;..gcall| ("?lt")|
|000043c0| 3b 0a 7d 0a 0a 2f 2a 0a | 20 2a 09 6c 65 73 73 20 |;.}../*.| *.less |
|000043d0| 74 68 61 6e 20 6f 72 20 | 65 71 75 61 6c 20 28 73 |than or |equal (s|
|000043e0| 69 67 6e 65 64 29 0a 20 | 2a 0a 20 2a 2f 0a 67 6c |igned). |*. */.gl|
|000043f0| 65 20 28 29 0a 7b 0a 09 | 67 70 6f 70 28 29 3b 0a |e ().{..|gpop();.|
|00004400| 09 67 63 61 6c 6c 20 28 | 22 3f 6c 65 22 29 3b 0a |.gcall (|"?le");.|
|00004410| 7d 0a 0a 2f 2a 0a 20 2a | 09 67 72 65 61 74 65 72 |}../*. *|.greater|
|00004420| 20 74 68 61 6e 20 28 73 | 69 67 6e 65 64 29 0a 20 | than (s|igned). |
|00004430| 2a 0a 20 2a 2f 0a 67 67 | 74 20 28 29 0a 7b 0a 09 |*. */.gg|t ().{..|
|00004440| 67 70 6f 70 28 29 3b 0a | 09 67 63 61 6c 6c 20 28 |gpop();.|.gcall (|
|00004450| 22 3f 67 74 22 29 3b 0a | 7d 0a 0a 2f 2a 0a 20 2a |"?gt");.|}../*. *|
|00004460| 09 67 72 65 61 74 65 72 | 20 74 68 61 6e 20 6f 72 |.greater| than or|
|00004470| 20 65 71 75 61 6c 20 28 | 73 69 67 6e 65 64 29 0a | equal (|signed).|
|00004480| 20 2a 0a 20 2a 2f 0a 67 | 67 65 20 28 29 0a 7b 0a | *. */.g|ge ().{.|
|00004490| 09 67 70 6f 70 28 29 3b | 0a 09 67 63 61 6c 6c 20 |.gpop();|..gcall |
|000044a0| 28 22 3f 67 65 22 29 3b | 0a 7d 0a 0a 2f 2a 0a 20 |("?ge");|.}../*. |
|000044b0| 2a 09 6c 65 73 73 20 74 | 68 61 6e 20 28 75 6e 73 |*.less t|han (uns|
|000044c0| 69 67 6e 65 64 29 0a 20 | 2a 0a 20 2a 2f 0a 67 75 |igned). |*. */.gu|
|000044d0| 6c 74 20 28 29 0a 7b 0a | 09 67 70 6f 70 28 29 3b |lt ().{.|.gpop();|
|000044e0| 0a 09 67 63 61 6c 6c 20 | 28 22 3f 75 6c 74 22 29 |..gcall |("?ult")|
|000044f0| 3b 0a 7d 0a 0a 2f 2a 0a | 20 2a 09 6c 65 73 73 20 |;.}../*.| *.less |
|00004500| 74 68 61 6e 20 6f 72 20 | 65 71 75 61 6c 20 28 75 |than or |equal (u|
|00004510| 6e 73 69 67 6e 65 64 29 | 0a 20 2a 0a 20 2a 2f 0a |nsigned)|. *. */.|
|00004520| 67 75 6c 65 20 28 29 0a | 7b 0a 09 67 70 6f 70 28 |gule ().|{..gpop(|
|00004530| 29 3b 0a 09 67 63 61 6c | 6c 20 28 22 3f 75 6c 65 |);..gcal|l ("?ule|
|00004540| 22 29 3b 0a 7d 0a 0a 2f | 2a 0a 20 2a 09 67 72 65 |");.}../|*. *.gre|
|00004550| 61 74 65 72 20 74 68 61 | 6e 20 28 75 6e 73 69 67 |ater tha|n (unsig|
|00004560| 6e 65 64 29 0a 20 2a 0a | 20 2a 2f 0a 67 75 67 74 |ned). *.| */.gugt|
|00004570| 20 28 29 0a 7b 0a 09 67 | 70 6f 70 28 29 3b 0a 09 | ().{..g|pop();..|
|00004580| 67 63 61 6c 6c 20 28 22 | 3f 75 67 74 22 29 3b 0a |gcall ("|?ugt");.|
|00004590| 7d 0a 0a 2f 2a 0a 20 2a | 09 67 72 65 61 74 65 72 |}../*. *|.greater|
|000045a0| 20 74 68 61 6e 20 6f 72 | 20 65 71 75 61 6c 20 28 | than or| equal (|
|000045b0| 75 6e 73 69 67 6e 65 64 | 29 0a 20 2a 0a 20 2a 2f |unsigned|). *. */|
|000045c0| 0a 67 75 67 65 20 28 29 | 0a 7b 0a 09 67 70 6f 70 |.guge ()|.{..gpop|
|000045d0| 28 29 3b 0a 09 67 63 61 | 6c 6c 20 28 22 3f 75 67 |();..gca|ll ("?ug|
|000045e0| 65 22 29 3b 0a 7d 0a 0a | 69 6e 63 6c 69 62 28 29 |e");.}..|inclib()|
|000045f0| 20 7b 0a 23 69 66 64 65 | 66 09 63 70 6d 0a 09 72 | {.#ifde|f.cpm..r|
|00004600| 65 74 75 72 6e 28 22 42 | 3a 22 29 3b 0a 23 65 6e |eturn("B|:");.#en|
|00004610| 64 69 66 0a 23 69 66 64 | 65 66 09 75 6e 69 78 0a |dif.#ifd|ef.unix.|
|00004620| 09 72 65 74 75 72 6e 28 | 49 4e 43 44 49 52 29 3b |.return(|INCDIR);|
|00004630| 0a 23 65 6e 64 69 66 0a | 7d 0a 0a 2f 2a 09 53 71 |.#endif.|}../*.Sq|
|00004640| 75 69 72 72 65 6c 20 61 | 77 61 79 20 61 72 67 75 |uirrel a|way argu|
|00004650| 6d 65 6e 74 20 63 6f 75 | 6e 74 20 69 6e 20 61 20 |ment cou|nt in a |
|00004660| 72 65 67 69 73 74 65 72 | 20 74 68 61 74 20 6d 6f |register| that mo|
|00004670| 64 73 74 6b 0a 09 64 6f | 65 73 6e 27 74 20 74 6f |dstk..do|esn't to|
|00004680| 75 63 68 2e 0a 2a 2f 0a | 0a 67 6e 61 72 67 73 28 |uch..*/.|.gnargs(|
|00004690| 64 29 0a 69 6e 74 09 64 | 3b 20 7b 0a 09 6f 74 20 |d).int.d|; {..ot |
|000046a0| 28 22 6d 76 69 5c 74 61 | 2c 22 29 3b 0a 09 6f 6e |("mvi\ta|,");..on|
|000046b0| 75 6d 28 64 29 3b 0a 09 | 6e 6c 20 28 29 3b 0a 7d |um(d);..|nl ();.}|
|000046c0| 0a 0a 61 73 73 65 6d 62 | 6c 65 28 73 29 0a 63 68 |..assemb|le(s).ch|
|000046d0| 61 72 09 2a 73 3b 20 7b | 0a 23 69 66 64 65 66 09 |ar.*s; {|.#ifdef.|
|000046e0| 41 53 4e 4d 0a 09 63 68 | 61 72 20 62 75 66 5b 31 |ASNM..ch|ar buf[1|
|000046f0| 30 30 5d 3b 0a 09 73 74 | 72 63 70 79 28 62 75 66 |00];..st|rcpy(buf|
|00004700| 2c 20 41 53 4e 4d 29 3b | 0a 09 73 74 72 63 61 74 |, ASNM);|..strcat|
|00004710| 28 62 75 66 2c 20 22 20 | 22 29 3b 0a 09 73 74 72 |(buf, " |");..str|
|00004720| 63 61 74 28 62 75 66 2c | 20 73 29 3b 0a 09 62 75 |cat(buf,| s);..bu|
|00004730| 66 5b 73 74 72 6c 65 6e | 28 62 75 66 29 2d 31 5d |f[strlen|(buf)-1]|
|00004740| 20 3d 20 27 73 27 3b 0a | 09 72 65 74 75 72 6e 28 | = 's';.|.return(|
|00004750| 73 79 73 74 65 6d 28 62 | 75 66 29 29 3b 0a 23 65 |system(b|uf));.#e|
|00004760| 6c 73 65 0a 09 72 65 74 | 75 72 6e 28 30 29 3b 0a |lse..ret|urn(0);.|
|00004770| 23 65 6e 64 69 66 0a 7d | 0a 0a 6c 69 6e 6b 28 29 |#endif.}|..link()|
|00004780| 20 7b 0a 23 69 66 64 65 | 66 09 4c 44 4e 4d 0a 09 | {.#ifde|f.LDNM..|
|00004790| 66 70 75 74 73 28 22 49 | 20 64 6f 6e 27 74 20 6b |fputs("I| don't k|
|000047a0| 6e 6f 77 20 68 6f 77 20 | 74 6f 20 6c 69 6e 6b 20 |now how |to link |
|000047b0| 66 69 6c 65 73 20 79 65 | 74 5c 6e 22 2c 20 73 74 |files ye|t\n", st|
|000047c0| 64 65 72 72 29 3b 0a 23 | 65 6c 73 65 0a 09 72 65 |derr);.#|else..re|
|000047d0| 74 75 72 6e 28 30 29 3b | 0a 23 65 6e 64 69 66 0a |turn(0);|.#endif.|
|000047e0| 7d 0a 53 48 41 52 5f 45 | 4f 46 0a 69 66 20 74 65 |}.SHAR_E|OF.if te|
|000047f0| 73 74 20 39 36 37 31 20 | 2d 6e 65 20 22 60 77 63 |st 9671 |-ne "`wc|
|00004800| 20 2d 63 20 3c 20 27 63 | 6f 64 65 38 30 38 30 2e | -c < 'c|ode8080.|
|00004810| 63 27 60 22 0a 74 68 65 | 6e 0a 09 65 63 68 6f 20 |c'`".the|n..echo |
|00004820| 73 68 61 72 3a 20 65 72 | 72 6f 72 20 74 72 61 6e |shar: er|ror tran|
|00004830| 73 6d 69 74 74 69 6e 67 | 20 22 27 63 6f 64 65 38 |smitting| "'code8|
|00004840| 30 38 30 2e 63 27 22 20 | 27 28 73 68 6f 75 6c 64 |080.c'" |'(should|
|00004850| 20 68 61 76 65 20 62 65 | 65 6e 20 39 36 37 31 20 | have be|en 9671 |
|00004860| 63 68 61 72 61 63 74 65 | 72 73 29 27 0a 66 69 0a |characte|rs)'.fi.|
|00004870| 66 69 0a 65 63 68 6f 20 | 73 68 61 72 3a 20 65 78 |fi.echo |shar: ex|
|00004880| 74 72 61 63 74 69 6e 67 | 20 22 27 63 6f 64 65 61 |tracting| "'codea|
|00004890| 73 30 39 2e 63 27 22 20 | 27 28 39 35 33 34 20 63 |s09.c'" |'(9534 c|
|000048a0| 68 61 72 61 63 74 65 72 | 73 29 27 0a 69 66 20 74 |haracter|s)'.if t|
|000048b0| 65 73 74 20 2d 66 20 27 | 63 6f 64 65 61 73 30 39 |est -f '|codeas09|
|000048c0| 2e 63 27 0a 74 68 65 6e | 0a 09 65 63 68 6f 20 73 |.c'.then|..echo s|
|000048d0| 68 61 72 3a 20 77 69 6c | 6c 20 6e 6f 74 20 6f 76 |har: wil|l not ov|
|000048e0| 65 72 2d 77 72 69 74 65 | 20 65 78 69 73 74 69 6e |er-write| existin|
|000048f0| 67 20 66 69 6c 65 20 22 | 27 63 6f 64 65 61 73 30 |g file "|'codeas0|
|00004900| 39 2e 63 27 22 0a 65 6c | 73 65 0a 63 61 74 20 3c |9.c'".el|se.cat <|
|00004910| 3c 20 5c 53 48 41 52 5f | 45 4f 46 20 3e 20 27 63 |< \SHAR_|EOF > 'c|
|00004920| 6f 64 65 61 73 30 39 2e | 63 27 0a 2f 2a 09 46 69 |odeas09.|c'./*.Fi|
|00004930| 6c 65 20 63 6f 64 65 61 | 73 30 39 2e 63 3a 20 32 |le codea|s09.c: 2|
|00004940| 2e 32 20 28 38 34 2f 30 | 38 2f 33 31 2c 31 30 3a |.2 (84/0|8/31,10:|
|00004950| 30 35 3a 31 33 29 20 2a | 2f 0a 2f 2a 25 20 63 63 |05:13) *|/./*% cc|
|00004960| 20 2d 4f 20 2d 63 20 25 | 0a 20 2a 0a 20 2a 2f 0a | -O -c %|. *. */.|
|00004970| 0a 23 69 6e 63 6c 75 64 | 65 20 3c 73 74 64 69 6f |.#includ|e <stdio|
|00004980| 2e 68 3e 0a 23 69 6e 63 | 6c 75 64 65 20 22 64 65 |.h>.#inc|lude "de|
|00004990| 66 73 2e 68 22 0a 23 69 | 6e 63 6c 75 64 65 20 22 |fs.h".#i|nclude "|
|000049a0| 64 61 74 61 2e 68 22 0a | 0a 2f 2a 09 44 65 66 69 |data.h".|./*.Defi|
|000049b0| 6e 65 20 41 53 4e 4d 20 | 61 6e 64 20 4c 44 4e 4d |ne ASNM |and LDNM|
|000049c0| 20 74 6f 20 74 68 65 20 | 6e 61 6d 65 73 20 6f 66 | to the |names of|
|000049d0| 20 74 68 65 20 61 73 73 | 65 6d 62 6c 65 72 20 61 | the ass|embler a|
|000049e0| 6e 64 20 6c 69 6e 6b 65 | 72 0a 09 72 65 73 70 65 |nd linke|r..respe|
|000049f0| 63 74 69 76 65 6c 79 20 | 2a 2f 0a 0a 2f 2a 0a 20 |ctively |*/../*. |
|00004a00| 2a 09 53 6f 6d 65 20 70 | 72 65 64 65 66 69 6e 69 |*.Some p|redefini|
|00004a10| 74 69 6f 6e 73 3a 0a 20 | 2a 0a 20 2a 09 49 4e 54 |tions:. |*. *.INT|
|00004a20| 53 49 5a 45 20 69 73 20 | 74 68 65 20 73 69 7a 65 |SIZE is |the size|
|00004a30| 20 6f 66 20 61 6e 20 69 | 6e 74 65 67 65 72 20 69 | of an i|nteger i|
|00004a40| 6e 20 74 68 65 20 74 61 | 72 67 65 74 20 6d 61 63 |n the ta|rget mac|
|00004a50| 68 69 6e 65 0a 20 2a 09 | 42 59 54 45 4f 46 46 20 |hine. *.|BYTEOFF |
|00004a60| 69 73 20 74 68 65 20 6f | 66 66 73 65 74 20 6f 66 |is the o|ffset of|
|00004a70| 20 61 6e 20 62 79 74 65 | 20 77 69 74 68 69 6e 20 | an byte| within |
|00004a80| 61 6e 20 69 6e 74 65 67 | 65 72 20 6f 6e 20 74 68 |an integ|er on th|
|00004a90| 65 0a 20 2a 09 09 74 61 | 72 67 65 74 20 6d 61 63 |e. *..ta|rget mac|
|00004aa0| 68 69 6e 65 2e 20 28 69 | 65 3a 20 38 30 38 30 2c |hine. (i|e: 8080,|
|00004ab0| 70 64 70 31 31 20 3d 20 | 30 2c 20 36 38 30 39 20 |pdp11 = |0, 6809 |
|00004ac0| 3d 20 31 2c 0a 20 2a 09 | 09 33 36 30 20 3d 20 33 |= 1,. *.|.360 = 3|
|00004ad0| 29 0a 20 2a 09 54 68 69 | 73 20 63 6f 6d 70 69 6c |). *.Thi|s compil|
|00004ae0| 65 72 20 61 73 73 75 6d | 65 73 20 74 68 61 74 20 |er assum|es that |
|00004af0| 61 6e 20 69 6e 74 65 67 | 65 72 20 69 73 20 74 68 |an integ|er is th|
|00004b00| 65 20 53 41 4d 45 20 6c | 65 6e 67 74 68 20 61 73 |e SAME l|ength as|
|00004b10| 0a 20 2a 09 61 20 70 6f | 69 6e 74 65 72 20 2d 20 |. *.a po|inter - |
|00004b20| 69 6e 20 66 61 63 74 2c | 20 74 68 65 20 63 6f 6d |in fact,| the com|
|00004b30| 70 69 6c 65 72 20 75 73 | 65 73 20 49 4e 54 53 49 |piler us|es INTSI|
|00004b40| 5a 45 20 66 6f 72 20 62 | 6f 74 68 2e 0a 20 2a 2f |ZE for b|oth.. */|
|00004b50| 0a 23 64 65 66 69 6e 65 | 09 49 4e 54 53 49 5a 45 |.#define|.INTSIZE|
|00004b60| 09 32 0a 23 64 65 66 69 | 6e 65 09 42 59 54 45 4f |.2.#defi|ne.BYTEO|
|00004b70| 46 46 09 31 0a 0a 2f 2a | 0a 20 2a 09 70 72 69 6e |FF.1../*|. *.prin|
|00004b80| 74 20 61 6c 6c 20 61 73 | 73 65 6d 62 6c 65 72 20 |t all as|sembler |
|00004b90| 69 6e 66 6f 20 62 65 66 | 6f 72 65 20 61 6e 79 20 |info bef|ore any |
|00004ba0| 63 6f 64 65 20 69 73 20 | 67 65 6e 65 72 61 74 65 |code is |generate|
|00004bb0| 64 0a 20 2a 0a 20 2a 2f | 0a 68 65 61 64 65 72 20 |d. *. */|.header |
|00004bc0| 28 29 0a 7b 0a 09 6f 75 | 74 73 74 72 28 22 7c 5c |().{..ou|tstr("|\|
|00004bd0| 74 53 6d 61 6c 6c 20 43 | 20 4d 43 36 38 30 39 5c |tSmall C| MC6809\|
|00004be0| 6e 7c 5c 74 43 6f 64 65 | 72 20 28 32 2e 34 2c 38 |n|\tCode|r (2.4,8|
|00004bf0| 34 2f 31 31 2f 32 37 29 | 5c 6e 7c 22 29 3b 0a 09 |4/11/27)|\n|");..|
|00004c00| 46 45 76 65 72 73 28 29 | 3b 0a 09 6e 6c 20 28 29 |FEvers()|;..nl ()|
|00004c10| 3b 0a 09 6f 6c 20 28 22 | 2e 67 6c 6f 62 6c 5c 74 |;..ol ("|.globl\t|
|00004c20| 73 6d 75 6c 2c 73 64 69 | 76 2c 73 6d 6f 64 2c 61 |smul,sdi|v,smod,a|
|00004c30| 73 72 2c 61 73 6c 2c 6e | 65 67 2c 6c 6e 65 67 2c |sr,asl,n|eg,lneg,|
|00004c40| 63 61 73 65 22 29 3b 0a | 09 6f 6c 20 28 22 2e 67 |case");.|.ol (".g|
|00004c50| 6c 6f 62 6c 5c 74 65 71 | 2c 6e 65 2c 6c 74 2c 6c |lobl\teq|,ne,lt,l|
|00004c60| 65 2c 67 74 2c 67 65 2c | 75 6c 74 2c 75 6c 65 2c |e,gt,ge,|ult,ule,|
|00004c70| 75 67 74 2c 75 67 65 2c | 62 6f 6f 6c 22 29 3b 0a |ugt,uge,|bool");.|
|00004c80| 7d 0a 6e 6c 20 28 29 0a | 7b 0a 09 6f 75 74 62 79 |}.nl ().|{..outby|
|00004c90| 74 65 20 28 45 4f 4c 29 | 3b 0a 7d 0a 0a 69 6e 69 |te (EOL)|;.}..ini|
|00004ca0| 74 6d 61 63 28 29 20 7b | 0a 09 64 65 66 6d 61 63 |tmac() {|..defmac|
|00004cb0| 28 22 6d 63 36 38 30 39 | 5c 74 31 22 29 3b 0a 09 |("mc6809|\t1");..|
|00004cc0| 64 65 66 6d 61 63 28 22 | 6d 69 74 61 73 30 39 5c |defmac("|mitas09\|
|00004cd0| 74 31 22 29 3b 0a 09 64 | 65 66 6d 61 63 28 22 73 |t1");..d|efmac("s|
|00004ce0| 6d 61 6c 6c 63 5c 74 31 | 22 29 3b 0a 7d 0a 0a 67 |mallc\t1|");.}..g|
|00004cf0| 61 6c 69 67 6e 28 74 29 | 0a 69 6e 74 20 74 3b 0a |align(t)|.int t;.|
|00004d00| 7b 0a 09 72 65 74 75 72 | 6e 20 28 74 29 3b 0a 7d |{..retur|n (t);.}|
|00004d10| 0a 0a 0a 2f 2a 0a 20 2a | 09 72 65 74 75 72 6e 20 |.../*. *|.return |
|00004d20| 73 69 7a 65 20 6f 66 20 | 61 6e 20 69 6e 74 65 67 |size of |an integ|
|00004d30| 65 72 0a 20 2a 2f 0a 69 | 6e 74 73 69 7a 65 28 29 |er. */.i|ntsize()|
|00004d40| 20 7b 0a 09 72 65 74 75 | 72 6e 28 49 4e 54 53 49 | {..retu|rn(INTSI|
|00004d50| 5a 45 29 3b 0a 7d 0a 0a | 2f 2a 0a 20 2a 09 72 65 |ZE);.}..|/*. *.re|
|00004d60| 74 75 72 6e 20 6f 66 66 | 73 65 74 20 6f 66 20 6c |turn off|set of l|
|00004d70| 73 20 62 79 74 65 20 77 | 69 74 68 69 6e 20 77 6f |s byte w|ithin wo|
|00004d80| 72 64 0a 20 2a 09 28 69 | 65 3a 20 38 30 38 30 20 |rd. *.(i|e: 8080 |
|00004d90| 26 20 70 64 70 31 31 20 | 69 73 20 30 2c 20 36 38 |& pdp11 |is 0, 68|
|00004da0| 30 39 20 69 73 20 31 2c | 20 33 36 30 20 69 73 20 |09 is 1,| 360 is |
|00004db0| 33 29 0a 20 2a 2f 0a 62 | 79 74 65 6f 66 66 28 29 |3). */.b|yteoff()|
|00004dc0| 20 7b 0a 09 72 65 74 75 | 72 6e 28 42 59 54 45 4f | {..retu|rn(BYTEO|
|00004dd0| 46 46 29 3b 0a 7d 0a 0a | 2f 2a 0a 20 2a 09 4f 75 |FF);.}..|/*. *.Ou|
|00004de0| 74 70 75 74 20 69 6e 74 | 65 72 6e 61 6c 20 67 65 |tput int|ernal ge|
|00004df0| 6e 65 72 61 74 65 64 20 | 6c 61 62 65 6c 20 70 72 |nerated |label pr|
|00004e00| 65 66 69 78 0a 20 2a 2f | 0a 6f 6c 70 72 66 69 78 |efix. */|.olprfix|
|00004e10| 28 29 20 7b 0a 09 6f 75 | 74 73 74 72 28 22 4c 4c |() {..ou|tstr("LL|
|00004e20| 22 29 3b 0a 7d 0a 0a 2f | 2a 0a 20 2a 09 4f 75 74 |");.}../|*. *.Out|
|00004e30| 70 75 74 20 61 20 6c 61 | 62 65 6c 20 64 65 66 69 |put a la|bel defi|
|00004e40| 6e 69 74 69 6f 6e 20 74 | 65 72 6d 69 6e 61 74 6f |nition t|erminato|
|00004e50| 72 0a 20 2a 2f 0a 63 6f | 6c 20 28 29 0a 7b 0a 09 |r. */.co|l ().{..|
|00004e60| 6f 75 74 73 74 72 20 28 | 22 3d 2e 5c 6e 22 29 3b |outstr (|"=.\n");|
|00004e70| 0a 7d 0a 0a 2f 2a 0a 20 | 2a 09 62 65 67 69 6e 20 |.}../*. |*.begin |
|00004e80| 61 20 63 6f 6d 6d 65 6e | 74 20 6c 69 6e 65 20 66 |a commen|t line f|
|00004e90| 6f 72 20 74 68 65 20 61 | 73 73 65 6d 62 6c 65 72 |or the a|ssembler|
|00004ea0| 0a 20 2a 0a 20 2a 2f 0a | 63 6f 6d 6d 65 6e 74 20 |. *. */.|comment |
|00004eb0| 28 29 0a 7b 0a 09 6f 75 | 74 62 79 74 65 20 28 27 |().{..ou|tbyte ('|
|00004ec0| 7c 27 29 3b 0a 7d 0a 0a | 2f 2a 0a 20 2a 09 4f 75 ||');.}..|/*. *.Ou|
|00004ed0| 74 70 75 74 20 61 20 70 | 72 65 66 69 78 20 69 6e |tput a p|refix in|
|00004ee0| 20 66 72 6f 6e 74 20 6f | 66 20 75 73 65 72 20 6c | front o|f user l|
|00004ef0| 61 62 65 6c 73 0a 20 2a | 2f 0a 70 72 65 66 69 78 |abels. *|/.prefix|
|00004f00| 20 28 29 20 7b 0a 09 6f | 75 74 62 79 74 65 20 28 | () {..o|utbyte (|
|00004f10| 27 5f 27 29 3b 0a 7d 0a | 0a 0a 2f 2a 0a 20 2a 09 |'_');.}.|../*. *.|
|00004f20| 70 72 69 6e 74 20 61 6e | 79 20 61 73 73 65 6d 62 |print an|y assemb|
|00004f30| 6c 65 72 20 73 74 75 66 | 66 20 6e 65 65 64 65 64 |ler stuf|f needed|
|00004f40| 20 61 66 74 65 72 20 61 | 6c 6c 20 63 6f 64 65 0a | after a|ll code.|
|00004f50| 20 2a 0a 20 2a 2f 0a 74 | 72 61 69 6c 65 72 20 28 | *. */.t|railer (|
|00004f60| 29 0a 7b 0a 09 6f 6c 20 | 28 22 2e 65 6e 64 22 29 |).{..ol |(".end")|
|00004f70| 3b 0a 7d 0a 0a 2f 2a 0a | 20 2a 09 66 75 6e 63 74 |;.}../*.| *.funct|
|00004f80| 69 6f 6e 20 70 72 6f 6c | 6f 67 75 65 0a 20 2a 2f |ion prol|ogue. */|
|00004f90| 0a 70 72 6f 6c 6f 67 75 | 65 20 28 29 0a 7b 0a 7d |.prologu|e ().{.}|
|00004fa0| 0a 0a 2f 2a 0a 20 2a 09 | 74 65 78 74 20 28 63 6f |../*. *.|text (co|
|00004fb0| 64 65 29 20 73 65 67 6d | 65 6e 74 0a 20 2a 2f 0a |de) segm|ent. */.|
|00004fc0| 67 74 65 78 74 20 28 29 | 0a 7b 0a 09 6f 6c 20 28 |gtext ()|.{..ol (|
|00004fd0| 22 2e 74 65 78 74 22 29 | 3b 0a 7d 0a 0a 2f 2a 0a |".text")|;.}../*.|
|00004fe0| 20 2a 09 64 61 74 61 20 | 73 65 67 6d 65 6e 74 0a | *.data |segment.|
|00004ff0| 20 2a 2f 0a 67 64 61 74 | 61 20 28 29 0a 7b 0a 09 | */.gdat|a ().{..|
|00005000| 6f 6c 20 28 22 2e 64 61 | 74 61 22 29 3b 0a 7d 0a |ol (".da|ta");.}.|
|00005010| 0a 2f 2a 0a 20 2a 20 20 | 4f 75 74 70 75 74 20 74 |./*. * |Output t|
|00005020| 68 65 20 76 61 72 69 61 | 62 6c 65 20 73 79 6d 62 |he varia|ble symb|
|00005030| 6f 6c 20 61 74 20 73 63 | 70 74 72 20 61 73 20 61 |ol at sc|ptr as a|
|00005040| 6e 20 65 78 74 72 6e 20 | 6f 72 20 61 20 70 75 62 |n extrn |or a pub|
|00005050| 6c 69 63 0a 20 2a 2f 0a | 70 70 75 62 65 78 74 28 |lic. */.|ppubext(|
|00005060| 73 63 70 74 72 29 20 63 | 68 61 72 20 2a 73 63 70 |scptr) c|har *scp|
|00005070| 74 72 3b 20 7b 0a 09 69 | 66 20 28 73 63 70 74 72 |tr; {..i|f (scptr|
|00005080| 5b 53 54 4f 52 41 47 45 | 5d 20 3d 3d 20 53 54 41 |[STORAGE|] == STA|
|00005090| 54 49 43 29 20 72 65 74 | 75 72 6e 3b 0a 09 6f 74 |TIC) ret|urn;..ot|
|000050a0| 20 28 22 2e 67 6c 6f 62 | 6c 5c 74 22 29 3b 0a 09 | (".glob|l\t");..|
|000050b0| 70 72 65 66 69 78 20 28 | 29 3b 0a 09 6f 75 74 73 |prefix (|);..outs|
|000050c0| 74 72 20 28 73 63 70 74 | 72 29 3b 0a 09 6e 6c 28 |tr (scpt|r);..nl(|
|000050d0| 29 3b 0a 7d 0a 0a 2f 2a | 0a 20 2a 20 4f 75 74 70 |);.}../*|. * Outp|
|000050e0| 75 74 20 74 68 65 20 66 | 75 6e 63 74 69 6f 6e 20 |ut the f|unction |
|000050f0| 73 79 6d 62 6f 6c 20 61 | 74 20 73 63 70 74 72 20 |symbol a|t scptr |
|00005100| 61 73 20 61 6e 20 65 78 | 74 72 6e 20 6f 72 20 61 |as an ex|trn or a|
|00005110| 20 70 75 62 6c 69 63 0a | 20 2a 2f 0a 66 70 75 62 | public.| */.fpub|
|00005120| 65 78 74 28 73 63 70 74 | 72 29 20 63 68 61 72 20 |ext(scpt|r) char |
|00005130| 2a 73 63 70 74 72 3b 20 | 7b 0a 09 70 70 75 62 65 |*scptr; |{..ppube|
|00005140| 78 74 28 73 63 70 74 72 | 29 3b 0a 7d 0a 0a 2f 2a |xt(scptr|);.}../*|
|00005150| 0a 20 2a 20 20 4f 75 74 | 70 75 74 20 61 20 64 65 |. * Out|put a de|
|00005160| 63 69 6d 61 6c 20 6e 75 | 6d 62 65 72 20 74 6f 20 |cimal nu|mber to |
|00005170| 74 68 65 20 61 73 73 65 | 6d 62 6c 65 72 20 66 69 |the asse|mbler fi|
|00005180| 6c 65 0a 20 2a 2f 0a 6f | 6e 75 6d 28 6e 75 6d 29 |le. */.o|num(num)|
|00005190| 20 69 6e 74 20 6e 75 6d | 3b 20 7b 0a 09 6f 75 74 | int num|; {..out|
|000051a0| 64 65 63 28 6e 75 6d 29 | 3b 09 2f 2a 20 70 64 70 |dec(num)|;./* pdp|
|000051b0| 31 31 20 6e 65 65 64 73 | 20 61 20 22 2e 22 20 68 |11 needs| a "." h|
|000051c0| 65 72 65 20 2a 2f 0a 09 | 6f 75 74 62 79 74 65 28 |ere */..|outbyte(|
|000051d0| 27 2e 27 29 3b 0a 7d 0a | 0a 0a 2f 2a 0a 20 2a 09 |'.');.}.|../*. *.|
|000051e0| 66 65 74 63 68 20 61 20 | 73 74 61 74 69 63 20 6d |fetch a |static m|
|000051f0| 65 6d 6f 72 79 20 63 65 | 6c 6c 20 69 6e 74 6f 20 |emory ce|ll into |
|00005200| 74 68 65 20 70 72 69 6d | 61 72 79 20 72 65 67 69 |the prim|ary regi|
|00005210| 73 74 65 72 0a 20 2a 2f | 0a 67 65 74 6d 65 6d 20 |ster. */|.getmem |
|00005220| 28 73 79 6d 29 0a 63 68 | 61 72 09 2a 73 79 6d 3b |(sym).ch|ar.*sym;|
|00005230| 0a 7b 0a 09 69 66 20 28 | 28 73 79 6d 5b 49 44 45 |.{..if (|(sym[IDE|
|00005240| 4e 54 5d 20 21 3d 20 50 | 4f 49 4e 54 45 52 29 20 |NT] != P|OINTER) |
|00005250| 26 20 28 73 79 6d 5b 54 | 59 50 45 5d 20 3d 3d 20 |& (sym[T|YPE] == |
|00005260| 43 43 48 41 52 29 29 20 | 7b 0a 09 09 6f 74 20 28 |CCHAR)) |{...ot (|
|00005270| 22 6c 64 62 5c 74 22 29 | 3b 0a 09 09 70 72 65 66 |"ldb\t")|;...pref|
|00005280| 69 78 20 28 29 3b 0a 09 | 09 6f 75 74 73 74 72 20 |ix ();..|.outstr |
|00005290| 28 73 79 6d 20 2b 20 4e | 41 4d 45 29 3b 0a 09 09 |(sym + N|AME);...|
|000052a0| 6e 6c 20 28 29 3b 0a 09 | 09 6f 74 20 28 22 73 65 |nl ();..|.ot ("se|
|000052b0| 78 22 29 3b 0a 09 09 6e | 6c 20 28 29 3b 0a 09 7d |x");...n|l ();..}|
|000052c0| 20 65 6c 73 65 20 7b 0a | 09 09 6f 74 20 28 22 6c | else {.|..ot ("l|
|000052d0| 64 64 5c 74 22 29 3b 0a | 09 09 70 72 65 66 69 78 |dd\t");.|..prefix|
|000052e0| 20 28 29 3b 0a 09 09 6f | 75 74 73 74 72 20 28 73 | ();...o|utstr (s|
|000052f0| 79 6d 20 2b 20 4e 41 4d | 45 29 3b 0a 09 09 6e 6c |ym + NAM|E);...nl|
|00005300| 20 28 29 3b 0a 09 7d 0a | 7d 0a 0a 2f 2a 0a 20 2a | ();..}.|}../*. *|
|00005310| 09 66 65 74 63 68 20 74 | 68 65 20 61 64 64 72 65 |.fetch t|he addre|
|00005320| 73 73 20 6f 66 20 74 68 | 65 20 73 70 65 63 69 66 |ss of th|e specif|
|00005330| 69 65 64 20 73 79 6d 62 | 6f 6c 20 69 6e 74 6f 20 |ied symb|ol into |
|00005340| 74 68 65 20 70 72 69 6d | 61 72 79 20 72 65 67 69 |the prim|ary regi|
|00005350| 73 74 65 72 0a 20 2a 0a | 20 2a 2f 0a 67 65 74 6c |ster. *.| */.getl|
|00005360| 6f 63 20 28 73 79 6d 29 | 0a 63 68 61 72 09 2a 73 |oc (sym)|.char.*s|
|00005370| 79 6d 3b 0a 7b 0a 09 69 | 66 20 28 73 79 6d 5b 53 |ym;.{..i|f (sym[S|
|00005380| 54 4f 52 41 47 45 5d 20 | 3d 3d 20 4c 53 54 41 54 |TORAGE] |== LSTAT|
|00005390| 49 43 29 20 7b 0a 09 09 | 69 6d 6d 65 64 28 29 3b |IC) {...|immed();|
|000053a0| 0a 09 09 70 72 69 6e 74 | 6c 61 62 65 6c 28 67 6c |...print|label(gl|
|000053b0| 69 6e 74 28 73 79 6d 29 | 29 3b 0a 09 09 6e 6c 28 |int(sym)|);...nl(|
|000053c0| 29 3b 0a 09 7d 20 65 6c | 73 65 20 7b 0a 09 09 6f |);..} el|se {...o|
|000053d0| 74 20 28 22 6c 65 61 79 | 5c 74 22 29 3b 0a 09 09 |t ("leay|\t");...|
|000053e0| 6f 6e 75 6d 20 28 67 6c | 69 6e 74 28 73 79 6d 29 |onum (gl|int(sym)|
|000053f0| 20 2d 20 73 74 6b 70 29 | 3b 0a 09 09 6f 75 74 73 | - stkp)|;...outs|
|00005400| 74 72 20 28 22 28 73 29 | 5c 6e 5c 74 74 66 72 5c |tr ("(s)|\n\ttfr\|
|00005410| 74 79 2c 64 5c 6e 22 29 | 3b 0a 09 7d 0a 7d 0a 0a |ty,d\n")|;..}.}..|
|00005420| 2f 2a 0a 20 2a 09 73 74 | 6f 72 65 20 74 68 65 20 |/*. *.st|ore the |
|00005430| 70 72 69 6d 61 72 79 20 | 72 65 67 69 73 74 65 72 |primary |register|
|00005440| 20 69 6e 74 6f 20 74 68 | 65 20 73 70 65 63 69 66 | into th|e specif|
|00005450| 69 65 64 20 73 74 61 74 | 69 63 20 6d 65 6d 6f 72 |ied stat|ic memor|
|00005460| 79 20 63 65 6c 6c 0a 20 | 2a 0a 20 2a 2f 0a 70 75 |y cell. |*. */.pu|
|00005470| 74 6d 65 6d 20 28 73 79 | 6d 29 0a 63 68 61 72 09 |tmem (sy|m).char.|
|00005480| 2a 73 79 6d 3b 0a 7b 0a | 09 69 66 20 28 28 73 79 |*sym;.{.|.if ((sy|
|00005490| 6d 5b 49 44 45 4e 54 5d | 20 21 3d 20 50 4f 49 4e |m[IDENT]| != POIN|
|000054a0| 54 45 52 29 20 26 20 28 | 73 79 6d 5b 54 59 50 45 |TER) & (|sym[TYPE|
|000054b0| 5d 20 3d 3d 20 43 43 48 | 41 52 29 29 20 7b 0a 09 |] == CCH|AR)) {..|
|000054c0| 09 6f 74 20 28 22 73 74 | 62 5c 74 22 29 3b 0a 09 |.ot ("st|b\t");..|
|000054d0| 7d 20 65 6c 73 65 0a 09 | 09 6f 74 20 28 22 73 74 |} else..|.ot ("st|
|000054e0| 64 5c 74 22 29 3b 0a 09 | 70 72 65 66 69 78 20 28 |d\t");..|prefix (|
|000054f0| 29 3b 0a 09 6f 75 74 73 | 74 72 20 28 73 79 6d 20 |);..outs|tr (sym |
|00005500| 2b 20 4e 41 4d 45 29 3b | 0a 09 6e 6c 20 28 29 3b |+ NAME);|..nl ();|
|00005510| 0a 7d 0a 0a 2f 2a 0a 20 | 2a 09 73 74 6f 72 65 20 |.}../*. |*.store |
|00005520| 74 68 65 20 73 70 65 63 | 69 66 69 65 64 20 6f 62 |the spec|ified ob|
|00005530| 6a 65 63 74 20 74 79 70 | 65 20 69 6e 20 74 68 65 |ject typ|e in the|
|00005540| 20 70 72 69 6d 61 72 79 | 20 72 65 67 69 73 74 65 | primary| registe|
|00005550| 72 0a 20 2a 09 61 74 20 | 74 68 65 20 61 64 64 72 |r. *.at |the addr|
|00005560| 65 73 73 20 6f 6e 20 74 | 68 65 20 74 6f 70 20 6f |ess on t|he top o|
|00005570| 66 20 74 68 65 20 73 74 | 61 63 6b 0a 20 2a 0a 20 |f the st|ack. *. |
|00005580| 2a 2f 0a 70 75 74 73 74 | 6b 20 28 74 79 70 65 6f |*/.putst|k (typeo|
|00005590| 62 6a 29 0a 63 68 61 72 | 09 74 79 70 65 6f 62 6a |bj).char|.typeobj|
|000055a0| 3b 0a 7b 0a 09 69 66 20 | 28 74 79 70 65 6f 62 6a |;.{..if |(typeobj|
|000055b0| 20 3d 3d 20 43 43 48 41 | 52 29 0a 09 09 6f 6c 20 | == CCHA|R)...ol |
|000055c0| 28 22 73 74 62 5c 74 40 | 28 73 29 2b 2b 22 29 3b |("stb\t@|(s)++");|
|000055d0| 0a 09 65 6c 73 65 0a 09 | 09 6f 6c 20 28 22 73 74 |..else..|.ol ("st|
|000055e0| 64 5c 74 40 28 73 29 2b | 2b 22 29 3b 0a 09 73 74 |d\t@(s)+|+");..st|
|000055f0| 6b 70 20 3d 20 73 74 6b | 70 20 2b 20 49 4e 54 53 |kp = stk|p + INTS|
|00005600| 49 5a 45 3b 0a 7d 0a 0a | 2f 2a 0a 20 2a 09 66 65 |IZE;.}..|/*. *.fe|
|00005610| 74 63 68 20 74 68 65 20 | 73 70 65 63 69 66 69 65 |tch the |specifie|
|00005620| 64 20 6f 62 6a 65 63 74 | 20 74 79 70 65 20 69 6e |d object| type in|
|00005630| 64 69 72 65 63 74 20 74 | 68 72 6f 75 67 68 20 74 |direct t|hrough t|
|00005640| 68 65 20 70 72 69 6d 61 | 72 79 0a 20 2a 09 72 65 |he prima|ry. *.re|
|00005650| 67 69 73 74 65 72 20 69 | 6e 74 6f 20 74 68 65 20 |gister i|nto the |
|00005660| 70 72 69 6d 61 72 79 20 | 72 65 67 69 73 74 65 72 |primary |register|
|00005670| 0a 20 2a 0a 20 2a 2f 0a | 69 6e 64 69 72 65 63 74 |. *. */.|indirect|
|00005680| 20 28 74 79 70 65 6f 62 | 6a 29 0a 63 68 61 72 09 | (typeob|j).char.|
|00005690| 74 79 70 65 6f 62 6a 3b | 0a 7b 0a 09 6f 6c 28 22 |typeobj;|.{..ol("|
|000056a0| 74 66 72 5c 74 64 2c 79 | 22 29 3b 0a 09 69 66 20 |tfr\td,y|");..if |
|000056b0| 28 74 79 70 65 6f 62 6a | 20 3d 3d 20 43 43 48 41 |(typeobj| == CCHA|
|000056c0| 52 29 0a 09 09 6f 6c 20 | 28 22 6c 64 62 5c 74 28 |R)...ol |("ldb\t(|
|000056d0| 79 29 5c 6e 5c 74 73 65 | 78 22 29 3b 0a 09 65 6c |y)\n\tse|x");..el|
|000056e0| 73 65 0a 09 09 6f 6c 20 | 28 22 6c 64 64 5c 74 28 |se...ol |("ldd\t(|
|000056f0| 79 29 22 29 3b 0a 7d 0a | 0a 2f 2a 0a 20 2a 09 73 |y)");.}.|./*. *.s|
|00005700| 77 61 70 20 74 68 65 20 | 70 72 69 6d 61 72 79 20 |wap the |primary |
|00005710| 61 6e 64 20 73 65 63 6f | 6e 64 61 72 79 20 72 65 |and seco|ndary re|
|00005720| 67 69 73 74 65 72 73 0a | 20 2a 0a 20 2a 2f 0a 73 |gisters.| *. */.s|
|00005730| 77 61 70 20 28 29 0a 7b | 0a 09 6f 6c 20 28 22 65 |wap ().{|..ol ("e|
|00005740| 78 67 5c 74 64 2c 78 22 | 29 3b 0a 7d 0a 0a 2f 2a |xg\td,x"|);.}../*|
|00005750| 0a 20 2a 09 70 72 69 6e | 74 20 70 61 72 74 69 61 |. *.prin|t partia|
|00005760| 6c 20 69 6e 73 74 72 75 | 63 74 69 6f 6e 20 74 6f |l instru|ction to|
|00005770| 20 67 65 74 20 61 6e 20 | 69 6d 6d 65 64 69 61 74 | get an |immediat|
|00005780| 65 20 76 61 6c 75 65 20 | 69 6e 74 6f 0a 20 2a 09 |e value |into. *.|
|00005790| 74 68 65 20 70 72 69 6d | 61 72 79 20 72 65 67 69 |the prim|ary regi|
|000057a0| 73 74 65 72 0a 20 2a 0a | 20 2a 2f 0a 69 6d 6d 65 |ster. *.| */.imme|
|000057b0| 64 20 28 29 0a 7b 0a 09 | 6f 74 20 28 22 6c 64 64 |d ().{..|ot ("ldd|
|000057c0| 5c 74 23 22 29 3b 0a 7d | 0a 0a 2f 2a 0a 20 2a 09 |\t#");.}|../*. *.|
|000057d0| 70 75 73 68 20 74 68 65 | 20 70 72 69 6d 61 72 79 |push the| primary|
|000057e0| 20 72 65 67 69 73 74 65 | 72 20 6f 6e 74 6f 20 74 | registe|r onto t|
|000057f0| 68 65 20 73 74 61 63 6b | 0a 20 2a 0a 20 2a 2f 0a |he stack|. *. */.|
|00005800| 67 70 75 73 68 20 28 29 | 0a 7b 0a 09 6f 6c 20 28 |gpush ()|.{..ol (|
|00005810| 22 70 73 68 73 5c 74 64 | 22 29 3b 0a 09 73 74 6b |"pshs\td|");..stk|
|00005820| 70 20 3d 20 73 74 6b 70 | 20 2d 20 49 4e 54 53 49 |p = stkp| - INTSI|
|00005830| 5a 45 3b 0a 7d 0a 0a 2f | 2a 0a 20 2a 09 70 6f 70 |ZE;.}../|*. *.pop|
|00005840| 20 74 68 65 20 74 6f 70 | 20 6f 66 20 74 68 65 20 | the top| of the |
|00005850| 73 74 61 63 6b 20 69 6e | 74 6f 20 74 68 65 20 73 |stack in|to the s|
|00005860| 65 63 6f 6e 64 61 72 79 | 20 72 65 67 69 73 74 65 |econdary| registe|
|00005870| 72 0a 20 2a 0a 20 2a 2f | 0a 67 70 6f 70 20 28 29 |r. *. */|.gpop ()|
|00005880| 0a 7b 0a 09 6f 6c 20 28 | 22 70 75 6c 73 5c 74 64 |.{..ol (|"puls\td|
|00005890| 22 29 3b 0a 09 73 74 6b | 70 20 3d 20 73 74 6b 70 |");..stk|p = stkp|
|000058a0| 20 2b 20 49 4e 54 53 49 | 5a 45 3b 0a 7d 0a 0a 2f | + INTSI|ZE;.}../|
|000058b0| 2a 0a 20 2a 09 73 77 61 | 70 20 74 68 65 20 70 72 |*. *.swa|p the pr|
|000058c0| 69 6d 61 72 79 20 72 65 | 67 69 73 74 65 72 20 61 |imary re|gister a|
|000058d0| 6e 64 20 74 68 65 20 74 | 6f 70 20 6f 66 20 74 68 |nd the t|op of th|
|000058e0| 65 20 73 74 61 63 6b 0a | 20 2a 0a 20 2a 2f 0a 73 |e stack.| *. */.s|
|000058f0| 77 61 70 73 74 6b 20 28 | 29 0a 7b 0a 09 6f 6c 20 |wapstk (|).{..ol |
|00005900| 28 22 6c 64 79 5c 74 28 | 73 29 5c 6e 73 74 64 5c |("ldy\t(|s)\nstd\|
|00005910| 74 28 73 29 5c 6e 5c 74 | 74 66 72 5c 74 79 2c 64 |t(s)\n\t|tfr\ty,d|
|00005920| 22 29 3b 0a 7d 0a 0a 2f | 2a 0a 20 2a 09 63 61 6c |");.}../|*. *.cal|
|00005930| 6c 20 74 68 65 20 73 70 | 65 63 69 66 69 65 64 20 |l the sp|ecified |
|00005940| 73 75 62 72 6f 75 74 69 | 6e 65 20 6e 61 6d 65 0a |subrouti|ne name.|
|00005950| 20 2a 0a 20 2a 2f 0a 67 | 63 61 6c 6c 20 28 73 6e | *. */.g|call (sn|
|00005960| 61 6d 65 29 0a 63 68 61 | 72 09 2a 73 6e 61 6d 65 |ame).cha|r.*sname|
|00005970| 3b 0a 7b 0a 09 6f 74 20 | 28 22 6a 73 72 5c 74 22 |;.{..ot |("jsr\t"|
|00005980| 29 3b 0a 09 69 66 20 28 | 2a 73 6e 61 6d 65 20 3d |);..if (|*sname =|
|00005990| 3d 20 27 5e 27 29 0a 09 | 09 6f 75 74 73 74 72 20 |= '^')..|.outstr |
|000059a0| 28 2b 2b 73 6e 61 6d 65 | 29 3b 0a 09 65 6c 73 65 |(++sname|);..else|
|000059b0| 20 7b 0a 09 09 70 72 65 | 66 69 78 20 28 29 3b 0a | {...pre|fix ();.|
|000059c0| 09 09 6f 75 74 73 74 72 | 20 28 73 6e 61 6d 65 29 |..outstr| (sname)|
|000059d0| 3b 0a 09 7d 0a 09 6e 6c | 20 28 29 3b 0a 7d 0a 0a |;..}..nl| ();.}..|
|000059e0| 2f 2a 0a 20 2a 09 72 65 | 74 75 72 6e 20 66 72 6f |/*. *.re|turn fro|
|000059f0| 6d 20 73 75 62 72 6f 75 | 74 69 6e 65 0a 20 2a 0a |m subrou|tine. *.|
|00005a00| 20 2a 2f 0a 67 72 65 74 | 20 28 29 0a 7b 0a 09 6f | */.gret| ().{..o|
|00005a10| 6c 20 28 22 72 74 73 22 | 29 3b 0a 7d 0a 0a 2f 2a |l ("rts"|);.}../*|
|00005a20| 0a 20 2a 09 70 65 72 66 | 6f 72 6d 20 73 75 62 72 |. *.perf|orm subr|
|00005a30| 6f 75 74 69 6e 65 20 63 | 61 6c 6c 20 74 6f 20 76 |outine c|all to v|
|00005a40| 61 6c 75 65 20 6f 6e 20 | 74 6f 70 20 6f 66 20 73 |alue on |top of s|
|00005a50| 74 61 63 6b 0a 20 2a 0a | 20 2a 2f 0a 63 61 6c 6c |tack. *.| */.call|
|00005a60| 73 74 6b 20 28 29 0a 7b | 0a 09 67 70 6f 70 28 29 |stk ().{|..gpop()|
|00005a70| 3b 0a 09 6f 6c 20 28 22 | 6a 73 72 5c 74 28 78 29 |;..ol ("|jsr\t(x)|
|00005a80| 22 29 3b 0a 7d 0a 0a 2f | 2a 0a 20 2a 09 6a 75 6d |");.}../|*. *.jum|
|00005a90| 70 20 74 6f 20 73 70 65 | 63 69 66 69 65 64 20 69 |p to spe|cified i|
|00005aa0| 6e 74 65 72 6e 61 6c 20 | 6c 61 62 65 6c 20 6e 75 |nternal |label nu|
|00005ab0| 6d 62 65 72 0a 20 2a 0a | 20 2a 2f 0a 6a 75 6d 70 |mber. *.| */.jump|
|00005ac0| 20 28 6c 61 62 65 6c 29 | 0a 69 6e 74 09 6c 61 62 | (label)|.int.lab|
|00005ad0| 65 6c 3b 0a 7b 0a 09 6f | 74 20 28 22 6c 62 72 61 |el;.{..o|t ("lbra|
|00005ae0| 5c 74 22 29 3b 0a 09 70 | 72 69 6e 74 6c 61 62 65 |\t");..p|rintlabe|
|00005af0| 6c 20 28 6c 61 62 65 6c | 29 3b 0a 09 6e 6c 20 28 |l (label|);..nl (|
|00005b00| 29 3b 0a 7d 0a 0a 2f 2a | 0a 20 2a 09 74 65 73 74 |);.}../*|. *.test|
|00005b10| 20 74 68 65 20 70 72 69 | 6d 61 72 79 20 72 65 67 | the pri|mary reg|
|00005b20| 69 73 74 65 72 20 61 6e | 64 20 6a 75 6d 70 20 69 |ister an|d jump i|
|00005b30| 66 20 66 61 6c 73 65 20 | 74 6f 20 6c 61 62 65 6c |f false |to label|
|00005b40| 0a 20 2a 0a 20 2a 2f 0a | 74 65 73 74 6a 75 6d 70 |. *. */.|testjump|
|00005b50| 20 28 6c 61 62 65 6c 2c | 20 66 74 29 0a 69 6e 74 | (label,| ft).int|
|00005b60| 09 6c 61 62 65 6c 2c 0a | 09 66 74 3b 0a 7b 0a 09 |.label,.|.ft;.{..|
|00005b70| 6f 6c 20 28 22 63 6d 70 | 64 5c 74 23 30 22 29 3b |ol ("cmp|d\t#0");|
|00005b80| 0a 09 69 66 20 28 66 74 | 29 0a 09 09 6f 74 20 28 |..if (ft|)...ot (|
|00005b90| 22 6c 62 6e 65 5c 74 22 | 29 3b 0a 09 65 6c 73 65 |"lbne\t"|);..else|
|00005ba0| 0a 09 09 6f 74 20 28 22 | 6c 62 65 71 5c 74 22 29 |...ot ("|lbeq\t")|
|00005bb0| 3b 0a 09 70 72 69 6e 74 | 6c 61 62 65 6c 20 28 6c |;..print|label (l|
|00005bc0| 61 62 65 6c 29 3b 0a 09 | 6e 6c 20 28 29 3b 0a 7d |abel);..|nl ();.}|
|00005bd0| 0a 0a 2f 2a 0a 20 2a 09 | 70 72 69 6e 74 20 70 73 |../*. *.|print ps|
|00005be0| 65 75 64 6f 2d 6f 70 20 | 20 74 6f 20 64 65 66 69 |eudo-op | to defi|
|00005bf0| 6e 65 20 61 20 62 79 74 | 65 0a 20 2a 0a 20 2a 2f |ne a byt|e. *. */|
|00005c00| 0a 64 65 66 62 79 74 65 | 20 28 29 0a 7b 0a 09 6f |.defbyte| ().{..o|
|00005c10| 74 20 28 22 2e 62 79 74 | 65 5c 74 22 29 3b 0a 7d |t (".byt|e\t");.}|
|00005c20| 0a 0a 2f 2a 0a 20 2a 09 | 70 72 69 6e 74 20 70 73 |../*. *.|print ps|
|00005c30| 65 75 64 6f 2d 6f 70 20 | 74 6f 20 64 65 66 69 6e |eudo-op |to defin|
|00005c40| 65 20 73 74 6f 72 61 67 | 65 0a 20 2a 0a 20 2a 2f |e storag|e. *. */|
|00005c50| 0a 64 65 66 73 74 6f 72 | 61 67 65 20 28 29 0a 7b |.defstor|age ().{|
|00005c60| 0a 09 6f 74 20 28 22 2e | 62 6c 6b 62 5c 74 22 29 |..ot (".|blkb\t")|
|00005c70| 3b 0a 7d 0a 0a 2f 2a 0a | 20 2a 09 70 72 69 6e 74 |;.}../*.| *.print|
|00005c80| 20 70 73 65 75 64 6f 2d | 6f 70 20 74 6f 20 64 65 | pseudo-|op to de|
|00005c90| 66 69 6e 65 20 61 20 77 | 6f 72 64 0a 20 2a 0a 20 |fine a w|ord. *. |
|00005ca0| 2a 2f 0a 64 65 66 77 6f | 72 64 20 28 29 0a 7b 0a |*/.defwo|rd ().{.|
|00005cb0| 09 6f 74 20 28 22 2e 77 | 6f 72 64 5c 74 22 29 3b |.ot (".w|ord\t");|
|00005cc0| 0a 7d 0a 0a 2f 2a 0a 20 | 2a 09 6d 6f 64 69 66 79 |.}../*. |*.modify|
|00005cd0| 20 74 68 65 20 73 74 61 | 63 6b 20 70 6f 69 6e 74 | the sta|ck point|
|00005ce0| 65 72 20 74 6f 20 74 68 | 65 20 6e 65 77 20 76 61 |er to th|e new va|
|00005cf0| 6c 75 65 20 69 6e 64 69 | 63 61 74 65 64 0a 20 2a |lue indi|cated. *|
|00005d00| 0a 20 2a 2f 0a 6d 6f 64 | 73 74 6b 20 28 6e 65 77 |. */.mod|stk (new|
|00005d10| 73 74 6b 70 29 0a 69 6e | 74 09 6e 65 77 73 74 6b |stkp).in|t.newstk|
|00005d20| 70 3b 0a 7b 0a 09 69 6e | 74 09 6b 3b 0a 0a 09 6b |p;.{..in|t.k;...k|
|00005d30| 20 3d 20 67 61 6c 69 67 | 6e 28 6e 65 77 73 74 6b | = galig|n(newstk|
|00005d40| 70 20 2d 20 73 74 6b 70 | 29 3b 0a 09 69 66 20 28 |p - stkp|);..if (|
|00005d50| 6b 20 3d 3d 20 30 29 0a | 09 09 72 65 74 75 72 6e |k == 0).|..return|
|00005d60| 20 28 6e 65 77 73 74 6b | 70 29 3b 0a 09 6f 74 20 | (newstk|p);..ot |
|00005d70| 28 22 6c 65 61 73 5c 74 | 22 29 3b 0a 09 6f 6e 75 |("leas\t|");..onu|
|00005d80| 6d 20 28 6b 29 3b 0a 09 | 6f 75 74 73 74 72 20 28 |m (k);..|outstr (|
|00005d90| 22 28 73 29 5c 6e 22 29 | 3b 0a 09 72 65 74 75 72 |"(s)\n")|;..retur|
|00005da0| 6e 20 28 6e 65 77 73 74 | 6b 70 29 3b 0a 7d 0a 0a |n (newst|kp);.}..|
|00005db0| 2f 2a 0a 20 2a 09 6d 75 | 6c 74 69 70 6c 79 20 74 |/*. *.mu|ltiply t|
|00005dc0| 68 65 20 70 72 69 6d 61 | 72 79 20 72 65 67 69 73 |he prima|ry regis|
|00005dd0| 74 65 72 20 62 79 20 49 | 4e 54 53 49 5a 45 0a 20 |ter by I|NTSIZE. |
|00005de0| 2a 2f 0a 67 61 73 6c 69 | 6e 74 20 28 29 0a 7b 0a |*/.gasli|nt ().{.|
|00005df0| 09 6f 6c 20 28 22 61 73 | 6c 62 5c 6e 5c 74 72 6f |.ol ("as|lb\n\tro|
|00005e00| 6c 61 22 29 3b 0a 7d 0a | 0a 2f 2a 0a 20 2a 09 64 |la");.}.|./*. *.d|
|00005e10| 69 76 69 64 65 20 74 68 | 65 20 70 72 69 6d 61 72 |ivide th|e primar|
|00005e20| 79 20 72 65 67 69 73 74 | 65 72 20 62 79 20 49 4e |y regist|er by IN|
|00005e30| 54 53 49 5a 45 0a 20 2a | 2f 0a 67 61 73 72 69 6e |TSIZE. *|/.gasrin|
|00005e40| 74 28 29 0a 7b 0a 09 6f | 6c 20 28 22 61 73 72 61 |t().{..o|l ("asra|
|00005e50| 5c 6e 5c 74 72 6f 72 62 | 22 29 3b 0a 7d 0a 0a 2f |\n\trorb|");.}../|
|00005e60| 2a 0a 20 2a 09 43 61 73 | 65 20 6a 75 6d 70 20 69 |*. *.Cas|e jump i|
|00005e70| 6e 73 74 72 75 63 74 69 | 6f 6e 0a 20 2a 2f 0a 67 |nstructi|on. */.g|
|00005e80| 6a 63 61 73 65 28 29 20 | 7b 0a 09 6f 74 20 28 22 |jcase() |{..ot ("|
|00005e90| 6a 6d 70 5c 74 63 61 73 | 65 22 29 3b 0a 09 6e 6c |jmp\tcas|e");..nl|
|00005ea0| 20 28 29 3b 0a 7d 0a 0a | 2f 2a 0a 20 2a 09 61 64 | ();.}..|/*. *.ad|
|00005eb0| 64 20 74 68 65 20 70 72 | 69 6d 61 72 79 20 61 6e |d the pr|imary an|
|00005ec0| 64 20 73 65 63 6f 6e 64 | 61 72 79 20 72 65 67 69 |d second|ary regi|
|00005ed0| 73 74 65 72 73 0a 20 2a | 09 69 66 20 6c 76 61 6c |sters. *|.if lval|
|00005ee0| 32 20 69 73 20 69 6e 74 | 20 70 6f 69 6e 74 65 72 |2 is int| pointer|
|00005ef0| 20 61 6e 64 20 6c 76 61 | 6c 20 69 73 20 69 6e 74 | and lva|l is int|
|00005f00| 2c 20 73 63 61 6c 65 20 | 6c 76 61 6c 0a 20 2a 2f |, scale |lval. */|
|00005f10| 0a 67 61 64 64 20 28 6c | 76 61 6c 2c 20 6c 76 61 |.gadd (l|val, lva|
|00005f20| 6c 32 29 20 69 6e 74 20 | 2a 6c 76 61 6c 2c 20 2a |l2) int |*lval, *|
|00005f30| 6c 76 61 6c 32 3b 0a 7b | 0a 09 69 66 20 28 64 62 |lval2;.{|..if (db|
|00005f40| 6c 74 65 73 74 20 28 6c | 76 61 6c 32 2c 20 6c 76 |ltest (l|val2, lv|
|00005f50| 61 6c 29 29 20 7b 0a 09 | 09 6f 6c 20 28 22 61 73 |al)) {..|.ol ("as|
|00005f60| 6c 5c 74 31 28 73 29 5c | 6e 5c 74 72 6f 6c 5c 74 |l\t1(s)\|n\trol\t|
|00005f70| 28 73 29 22 29 3b 0a 09 | 7d 0a 09 6f 6c 20 28 22 |(s)");..|}..ol ("|
|00005f80| 61 64 64 64 5c 74 28 73 | 29 2b 2b 22 29 3b 0a 09 |addd\t(s|)++");..|
|00005f90| 73 74 6b 70 20 3d 20 73 | 74 6b 70 20 2b 20 49 4e |stkp = s|tkp + IN|
|00005fa0| 54 53 49 5a 45 3b 0a 7d | 0a 0a 2f 2a 0a 20 2a 09 |TSIZE;.}|../*. *.|
|00005fb0| 73 75 62 74 72 61 63 74 | 20 74 68 65 20 70 72 69 |subtract| the pri|
|00005fc0| 6d 61 72 79 20 72 65 67 | 69 73 74 65 72 20 66 72 |mary reg|ister fr|
|00005fd0| 6f 6d 20 74 68 65 20 73 | 65 63 6f 6e 64 61 72 79 |om the s|econdary|
|00005fe0| 0a 20 2a 0a 20 2a 2f 0a | 67 73 75 62 20 28 29 0a |. *. */.|gsub ().|
|00005ff0| 7b 0a 09 6f 6c 20 28 22 | 73 75 62 64 5c 74 28 73 |{..ol ("|subd\t(s|
|00006000| 29 2b 2b 5c 6e 5c 74 63 | 6f 6d 61 5c 6e 5c 74 63 |)++\n\tc|oma\n\tc|
|00006010| 6f 6d 62 5c 6e 5c 74 61 | 64 64 64 5c 74 23 31 22 |omb\n\ta|ddd\t#1"|
|00006020| 29 3b 0a 09 73 74 6b 70 | 20 3d 20 73 74 6b 70 20 |);..stkp| = stkp |
|00006030| 2b 20 49 4e 54 53 49 5a | 45 3b 0a 7d 0a 0a 2f 2a |+ INTSIZ|E;.}../*|
|00006040| 0a 20 2a 09 6d 75 6c 74 | 69 70 6c 79 20 74 68 65 |. *.mult|iply the|
|00006050| 20 70 72 69 6d 61 72 79 | 20 61 6e 64 20 73 65 63 | primary| and sec|
|00006060| 6f 6e 64 61 72 79 20 72 | 65 67 69 73 74 65 72 73 |ondary r|egisters|
|00006070| 0a 20 2a 09 28 72 65 73 | 75 6c 74 20 69 6e 20 70 |. *.(res|ult in p|
|00006080| 72 69 6d 61 72 79 29 0a | 20 2a 0a 20 2a 2f 0a 67 |rimary).| *. */.g|
|00006090| 6d 75 6c 74 20 28 29 0a | 7b 0a 09 67 63 61 6c 6c |mult ().|{..gcall|
|000060a0| 20 28 22 5e 73 6d 75 6c | 22 29 3b 0a 09 73 74 6b | ("^smul|");..stk|
|000060b0| 70 20 3d 20 73 74 6b 70 | 20 2b 20 49 4e 54 53 49 |p = stkp| + INTSI|
|000060c0| 5a 45 3b 0a 7d 0a 0a 2f | 2a 0a 20 2a 09 64 69 76 |ZE;.}../|*. *.div|
|000060d0| 69 64 65 20 74 68 65 20 | 73 65 63 6f 6e 64 61 72 |ide the |secondar|
|000060e0| 79 20 72 65 67 69 73 74 | 65 72 20 62 79 20 74 68 |y regist|er by th|
|000060f0| 65 20 70 72 69 6d 61 72 | 79 0a 20 2a 09 28 71 75 |e primar|y. *.(qu|
|00006100| 6f 74 69 65 6e 74 20 69 | 6e 20 70 72 69 6d 61 72 |otient i|n primar|
|00006110| 79 2c 20 72 65 6d 61 69 | 6e 64 65 72 20 69 6e 20 |y, remai|nder in |
|00006120| 73 65 63 6f 6e 64 61 72 | 79 29 0a 20 2a 0a 20 2a |secondar|y). *. *|
|00006130| 2f 0a 67 64 69 76 20 28 | 29 0a 7b 0a 09 67 63 61 |/.gdiv (|).{..gca|
|00006140| 6c 6c 20 28 22 5e 73 64 | 69 76 22 29 3b 0a 09 73 |ll ("^sd|iv");..s|
|00006150| 74 6b 70 20 3d 20 73 74 | 6b 70 20 2b 20 49 4e 54 |tkp = st|kp + INT|
|00006160| 53 49 5a 45 3b 0a 7d 0a | 0a 2f 2a 0a 20 2a 09 63 |SIZE;.}.|./*. *.c|
|00006170| 6f 6d 70 75 74 65 20 74 | 68 65 20 72 65 6d 61 69 |ompute t|he remai|
|00006180| 6e 64 65 72 20 28 6d 6f | 64 29 20 6f 66 20 74 68 |nder (mo|d) of th|
|00006190| 65 20 73 65 63 6f 6e 64 | 61 72 79 20 72 65 67 69 |e second|ary regi|
|000061a0| 73 74 65 72 0a 20 2a 09 | 64 69 76 69 64 65 64 20 |ster. *.|divided |
|000061b0| 62 79 20 74 68 65 20 70 | 72 69 6d 61 72 79 20 72 |by the p|rimary r|
|000061c0| 65 67 69 73 74 65 72 0a | 20 2a 09 28 72 65 6d 61 |egister.| *.(rema|
|000061d0| 69 6e 64 65 72 20 69 6e | 20 70 72 69 6d 61 72 79 |inder in| primary|
|000061e0| 2c 20 71 75 6f 74 69 65 | 6e 74 20 69 6e 20 73 65 |, quotie|nt in se|
|000061f0| 63 6f 6e 64 61 72 79 29 | 0a 20 2a 0a 20 2a 2f 0a |condary)|. *. */.|
|00006200| 67 6d 6f 64 20 28 29 0a | 7b 0a 09 67 63 61 6c 6c |gmod ().|{..gcall|
|00006210| 20 28 22 5e 73 6d 6f 64 | 22 29 3b 0a 09 73 74 6b | ("^smod|");..stk|
|00006220| 70 20 3d 20 73 74 6b 70 | 20 2b 20 49 4e 54 53 49 |p = stkp| + INTSI|
|00006230| 5a 45 3b 0a 7d 0a 0a 2f | 2a 0a 20 2a 09 69 6e 63 |ZE;.}../|*. *.inc|
|00006240| 6c 75 73 69 76 65 20 27 | 6f 72 27 20 74 68 65 20 |lusive '|or' the |
|00006250| 70 72 69 6d 61 72 79 20 | 61 6e 64 20 73 65 63 6f |primary |and seco|
|00006260| 6e 64 61 72 79 20 72 65 | 67 69 73 74 65 72 73 0a |ndary re|gisters.|
|00006270| 20 2a 0a 20 2a 2f 0a 67 | 6f 72 20 28 29 0a 7b 0a | *. */.g|or ().{.|
|00006280| 09 6f 6c 20 28 22 6f 72 | 61 5c 74 28 73 29 2b 5c |.ol ("or|a\t(s)+\|
|00006290| 6e 5c 74 6f 72 62 5c 74 | 28 73 29 2b 22 29 3b 0a |n\torb\t|(s)+");.|
|000062a0| 09 73 74 6b 70 20 3d 20 | 73 74 6b 70 20 2b 20 49 |.stkp = |stkp + I|
|000062b0| 4e 54 53 49 5a 45 3b 0a | 7d 0a 0a 2f 2a 0a 20 2a |NTSIZE;.|}../*. *|
|000062c0| 09 65 78 63 6c 75 73 69 | 76 65 20 27 6f 72 27 20 |.exclusi|ve 'or' |
|000062d0| 74 68 65 20 70 72 69 6d | 61 72 79 20 61 6e 64 20 |the prim|ary and |
|000062e0| 73 65 63 6f 6e 64 61 72 | 79 20 72 65 67 69 73 74 |secondar|y regist|
|000062f0| 65 72 73 0a 20 2a 0a 20 | 2a 2f 0a 67 78 6f 72 20 |ers. *. |*/.gxor |
|00006300| 28 29 0a 7b 0a 09 6f 6c | 20 28 22 65 6f 72 61 5c |().{..ol| ("eora\|
|00006310| 74 28 73 29 2b 5c 6e 5c | 74 65 6f 72 62 5c 74 28 |t(s)+\n\|teorb\t(|
|00006320| 73 29 2b 22 29 3b 0a 09 | 73 74 6b 70 20 3d 20 73 |s)+");..|stkp = s|
|00006330| 74 6b 70 20 2b 20 49 4e | 54 53 49 5a 45 3b 0a 7d |tkp + IN|TSIZE;.}|
|00006340| 0a 0a 2f 2a 0a 20 2a 09 | 27 61 6e 64 27 20 74 68 |../*. *.|'and' th|
|00006350| 65 20 70 72 69 6d 61 72 | 79 20 61 6e 64 20 73 65 |e primar|y and se|
|00006360| 63 6f 6e 64 61 72 79 20 | 72 65 67 69 73 74 65 72 |condary |register|
|00006370| 73 0a 20 2a 0a 20 2a 2f | 0a 67 61 6e 64 20 28 29 |s. *. */|.gand ()|
|00006380| 0a 7b 0a 09 6f 6c 20 28 | 22 61 6e 64 61 5c 74 28 |.{..ol (|"anda\t(|
|00006390| 73 29 2b 5c 6e 5c 74 61 | 6e 64 62 5c 74 28 73 29 |s)+\n\ta|ndb\t(s)|
|000063a0| 2b 22 29 3b 0a 09 73 74 | 6b 70 20 3d 20 73 74 6b |+");..st|kp = stk|
|000063b0| 70 20 2b 20 49 4e 54 53 | 49 5a 45 3b 0a 7d 0a 0a |p + INTS|IZE;.}..|
|000063c0| 2f 2a 0a 20 2a 09 61 72 | 69 74 68 6d 65 74 69 63 |/*. *.ar|ithmetic|
|000063d0| 20 73 68 69 66 74 20 72 | 69 67 68 74 20 74 68 65 | shift r|ight the|
|000063e0| 20 73 65 63 6f 6e 64 61 | 72 79 20 72 65 67 69 73 | seconda|ry regis|
|000063f0| 74 65 72 20 74 68 65 20 | 6e 75 6d 62 65 72 20 6f |ter the |number o|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.