home *** CD-ROM | disk | FTP | other *** search
-
-
-
- -- THE ART OF THE PSEUDO RUN --
- Ron Winter 3/13/83
- I⌠á i≤á possiblσ t∩ singlσ ste≡ ßá z8░á s-10░ ì
- systeφá iεá softwarσ withou⌠ decodinτá thσá `nextº ì
- instruction. All that is required is a 74ls74.
- Thσá z8░ ª ╔ assumσ thσ 8080¼á 808╡ allo≈ onσ ì
- instructioεá afte≥á aεá E╔ t∩á occu≥á eveεá iµá aε ì
- interrup⌠á i≤ pending«á Thi≤ i≤ t∩ allo≈ aε RE╘ iε ì
- aεá interrup⌠á handle≥ so tha⌠ ßá stacδá runawa∙ ì
- doesn't occur under a barrage of interrupts.
- Le⌠á u≤ finΣ aε instructioε t∩ placσá betweeε ì
- thσ E╔ anΣ RE╘ tha⌠ wil∞ generatσ aε interrup⌠ tw∩ ì
- instruction≤á late≥ tha⌠ preserve≤á al∞á register≤ ì
- fo≥ ou≥ interrup⌠ handler«á Conside≥ thσ followinτ ì
- circuit.
-
- ________________________________________________
- | |
- | pu enable-p |
- | 10| | |
- | ___o___ | __ |
- | _________ 12| S |9|-| \ |
- | 4| | pu-|D Q|---+ |o- |
- | ___o___ | | 1/2 | |__/ | |
- | 2| S |5 | 11| ls74 _|8 o |
- | _|D Q|-----------|> (b) Q|o-nc / \ |
- | _ | | 1/2 | | | R | o o |
- | M1 |3| ls74 _|6 | |___o___| | | |
- | ==>--|> (a) Q|o_ | 13| VIn NMI|
- | 44 | | R | | |_________| |
- | | |___o___| | | |
- | | 1|pu | | |
- | |____________| ^ |
- | arm-n |
- | [OUT (XX),A] |
- |------------------------------------------------|
-
- WitΦá thσ aiΣ oµ an∙ por⌠ (XX⌐ tha⌠á onσá caε ì
- safel∙ writσ t∩ anΣ ge⌠ ß lo≈ goinτ pulsσá iε theì
- `write' window, we have the follwing sequence.
-
- 1«á witΦá n∩á interrup⌠ pendinτ iεá ou≥á interrup⌠ ì
- handler we do an EI.
-
- 2«á wσá nex⌠ d∩ OU╘ (XX),┴ anΣ Qß goe≤á high¼á QΓ ì
- goes low.
-
- 3«á wσ d∩ aε RE╘ anΣ oε thσ trailinτ edgσ oµá M1¼ ì
- Qa goes low, Qb no change.
-
- 4«á Nex⌠ pπ begin≤ anΣ oε it≤ M▒ enΣ Qß goe≤ higΦ ì
- clocking Qb to high causing an interrupt.
-
- Thi≤á leave≤ thσ wonderfu∞ dilemnß oµ wha⌠ t∩ ì
- do with it!è
-
- 1
-
-
-
-
-
-
-
-
-
-
- Le⌠á mσ describσ wha⌠ ╔ do«á ┴ smal∞á prograφ ì
- sets up the system as follows.
-
- 1«á LoaΣ ß jum≡ vecto≥ t∩ ß safσ placσ iε (high⌐ ì
- memor∙ a⌠ rst╢ (30hex⌐ anΣ wirσ outpu⌠ oµá circui⌠ ì
- t∩á VI╢á (S-10░ piε 10)«á Notσ circui⌠á shoulΣá bσ ì
- disabled at this time.
-
- 2«á A⌠ thσ vector¼ writσ aε interrup⌠ handle≥ t∩ ì
- do whatever you please!
-
- 3«á Displa∙á somethinτ oε thσ screeε t∩á signif∙ ì
- tha⌠ thσ circui⌠ i≤ availablσ anΣ exi⌠ bacδ t∩ thσ ì
- system.
-
- 4« Executσ tha⌠ whicΦ onσ wishe≤ t∩ stud∙ anΣ a⌠ ì
- an∙á convenien⌠á timσ enablσ ßá VI6«á ┴á momentar∙ ì
- switch will work.
-
- 5. Voila, I am in my interrupt handler.
-
-
- T∩á makσ lifσ easie≥ le⌠ u≤ sa∙ thσ interrup⌠ ì
- handle≥áá doe≤á thσá following«áá I⌠áá save≤áá al∞ ì
- registers¼á save≤á thσá curren⌠á curso≥á position¼ ì
- paint≤á ß prett∙ displa∙ oε somσ protecteΣ par⌠ oµ ì
- thσ screeε anΣ poll≤ thσ keyboarΣ fo≥ input« Iµ n∩ ì
- ke∙ theε restorσ cursor¼á restorσ register≤ anΣ d∩ ì
- EI, OUT (XX),A and RET.
- S∩á unti∞á ß ke∙ i≤ strucδá durinτá interrup⌠ ì
- handle≥ thσ processo≥ `pseud∩ runs'« Thσ effectivσ ì
- speeΣ i≤ thσ timσ i⌠ take≤ t∩ ruε one'≤á interrup⌠ ì
- handler¼á s∩á thσ quicke≥ anΣ dirtie≥ thσ codσ thσ ì
- better!
- Notσá oµ warning«á I⌠ i≤ generall∙á safe≥á t∩ ì
- surrounΣá one'≤á BIO╙ I╧ hardwarσá dependen⌠á codσ ì
- witΦá D╔ anΣ E╔ t∩ preven⌠ `termina∞ confusionº a⌠ ì
- one'≤ hardwareí Thu≤ onσ shoulΣ cop∙ one'≤ I╧ codσ ì
- inlinσ int∩ thσ interrup⌠ handler«á Thi≤ wil∞ als∩ ì
- save time (less system jumps etc.)
- T∩á makσá lifσ eveεá easier¼á structurσá you≥ ì
- interrup⌠ `monitorº t∩ enablσ futurσ addition≤ anΣ ì
- options. Currently mine does the following:
-
- Oεá firs⌠á entr∙ iµ n∩á ke∙á i≤á struck¼á usσ ì
- `lastºá ke∙á whicΦ i≤ prese⌠ t∩ <space╛ t∩á enablσ ì
- singlσ ste≡ witΦ pause«á Tha⌠ is¼á iµ n∩ ke∙á theε ì
- pol∞ again«á Iµ ke∙ theε test« ┴ <ret╛ switche≤ t∩ ì
- `pseud∩ runº b∙ storinτ <ret╛ a⌠ `las⌠ key'« ┴ <B╛ ì
- prompt≤ fo≥ aε addres≤ anΣ set≤ ß breakpoin⌠ (somσ ì
- othe≥ rs⌠ instruction¼ save≤ thσ bytσ overwritten¼ ì
- anΣá thσá vecto≥ a⌠ `otherº rs⌠ restore≤á origina∞ ì
- bytσá anΣá theε enter≤ codσ fo≥á `monitorºá havinτ ìè
-
- 2
-
-
-
-
-
-
-
-
- lef⌠ ß <space╛ a⌠ `lastº key«á Notσ thi≤ enable≤ ß ì
- full speed run.á
- Iµá yo⌡á havσ availablσ anothe≥ por⌠ yo⌡á caε ì
- writσ t∩ tha⌠ caε latcΦ ß leve∞ yo⌡ caε ì
- enable/disablσ thσ `stepperº unde≥ softwarσ ì
- controlí ╔ do¼ s∩ m∙ initia∞ codσ disable≤ i⌠ anΣ ì
- request≤ ß breakpoin⌠ theε jus⌠ exit≤ t∩ thσ ì
- system« N∩ switche≤ necessary¼ a≤ ß matte≥ oµ fac⌠ ì
- i⌠ jus⌠ sit≤ iε m∙ systeφ a≤ jus⌠ anothe≥ utility« ì
- Wheε ╔ wisΦ t∩ usσ i⌠ ╔ jus⌠ ruε i⌠ likσ an∙ othe≥ ì
- transien⌠ program.
- Somσ suggesteΣ option≤ &/o≥ addition≤ tha⌠ onσ ì
- caε implimen⌠ iε one'≤ onσ persona∞ `pseud∩ ì
- machineº o≥ emulato≥ iµ yo⌡ will.
- 1«á optioε t∩ modif∙ registe≥ a⌠ an∙ time (ver∙ ì
- easy).
- 2« displa∙ anΣ savσ onl∙ wha⌠ onσ need≤ t∩ speeΣ ì
- up the emulation (not so easy).
- 3«áá ruεá unti∞á certaiεá opcodes¼á RE╘á family¼ ì
- etc. (not to hard).
- 4«á ruεá unti∞ an∙ registe≥ equal≤á somσá valuσ ì
- (very easy).
- 5. set any number of breakpoints (easy).
-
- So far I have only implimented 3.
-
- Final warnings and notes:
- I⌠á i≤á ß ne≈ experiencσ t∩ contro∞ ß prograφá anΣ ì
- interac⌠á witΦ i⌠ simultaneousl∙ a⌠á onσá console¼ ì
- especiall∙á program≤ tha⌠ d∩ ß lo⌠ oµ consolσá IO« ì
- Thσá curso≥á wil∞ dancσ froφ targe⌠ t∩ contro∞á s∩ ì
- fas⌠á yo⌡á wil∞ havσ ß harΣá timσá decidinτá whicΦ ì
- prograφá yo⌡á arσ controllingíá ╔ usuall∙á se⌠á m∙ ì
- breakpoint≤á arounΣ ß sectioε oµ I╧ unles≤ tha⌠ i≤ ì
- wha⌠ ╔ wisΦ t∩ study« Iµ yo⌡ havσ aε extrß consolσ ì
- i⌠á coulΣ bσ thσ `emulatorº I╧ anΣ theε yo⌡á woulΣ ì
- reall∙ havσ ß nicσ setup«
- ╔ havσ drawε aε optioε fo≥ NM╔ interrup⌠ tha⌠ ì
- caε bσ implimenteΣ iµ desired« No≈ one'≤ vecto≥ i≤ ì
- a⌠á 66he° anΣ onσ caε blithel∙ singlσ ste≡ througΦ ì
- codσ tha⌠ i≤ `protectedº froφ interrupts« Onσ mus⌠ ì
- onl∙á observσ thσ statσ oµ thσ interrup⌠ flaτá anΣ ì
- restorσ i⌠ a⌠ thσ enΣ oµ thσ routine¼á tha⌠ i≤á oε ì
- thσ z8░ changσ E╔ OU╘ (XX),┴ anΣ RE╘ t∩ OU╘ (XX),┴ ì
- anΣ RET╬.
- S∩ tha⌠ i≤ wha⌠ ß 74ls7┤ caε d∩ witΦ ß littlσ ì
- softwarσá iεá you≥ system«á Wh∩á ha≤á thσá fastes⌠ ì
- disassemble≥á (opcodσá t∩á mnemoniπá algorithm⌐á ╔ ì
- wonder?
-
-
-
-
-
-
-
-
- 3
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 4
-
-
-
-
-