IMD 1.17: 27/06/2012 8:58:40 SOFTECH MICROSYSTEMS UCSD SYSTEM UTILITIES UX20FIB  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@  UX20FIB Gɞ 3DISASM.II.CODE{438 OPCODES.II.0{`48H SC.GEN.CODE{H`PATCH.DOC.TEXT{֞` PATCH.CODE{DSCREENTEST.CODEI FLIPCODE.CODE`{OPFILED`{ FLIPDIR.CODE`{b RELOC.CODE`{# FLIP.DOC.TEXT`{4RELOC.DOC.TEXT{4 LIBRARY.CODE`{vxÄ\Ü UX20FIA Gɞ 3DISASM.II.CODE{438 OPCODES.II.0{`48H SC.GEN.CODE{H`PATCH.DOC.TEXT{֞` PATCH.CODE{DSCREENTEST.CODEI FLIPCODE.CODE`{OPFILED`{ FLIPDIR.CODE`{ 1Q/*@/// teVK<-/ع٢ ٢ ٢  ٢8 w٢ j٢ ٢ U٢ ٢ ٢! 8٢R +٢  e\I2'u",ƁX0 ,צ OPCODES.II.0"ˡ4 *OPCODES.II.0 not on system diskb RELOC.CODE`{# FLIP.DOC.TEXT`{4RELOC.DOC.TEXT{4 LIBRARY.CODE`{v`d!^%  CODESTAT  INIT DISASSEMGATHER DATACOUN (ȡ.press spacebar to continue... áhƂlƃƁ/Ƃ[Յ    ׷ /ƂlƁ/ؒX^צCONSOLE:#1:ׯ//P/š///צ sorry but there were no accesses/צ3 to this data segment from dis-assembled procedures/! Z ع// / / //-s/b/ Ǘ.   צ(Is this code file designed for a machine ۢڡخ١خ)/ / /\/ //4ۂ(ڂ(() Ʉl(á= Jɡ %%  %% 4 /  ڢڢ ڢ ڢ ؕٮ)/ > š  +ɡF \+d\+d++/ /\/ //44á ۢ |š"ǀ>ۢÄÄÄńɄWۢۢ8/8؂44/ /\Jɡá*//áǀɡK##/aڡ(ǖǖ3/ / / /\/ ۢ ۢ @/44/ / /\//44šɡE"" f//44)/ / /\/ ٢,0̅ʅȡR,0š,0,0ٻ, -/ / /\/ɡD!!-/ / /\/6 UCSD P-CODE DISASSEMBLER צ II.0 [a.6]Input code file: Pl -/ / /\/"/ /\/ /6:  ̅ƅPƅ.CODEUƅ"ˡ llá̅ʅȡRˡ!  áءGd //4Ǘ.   צ(Is this code file designed for a machine 4ǭÍǡǹǀɡ@ 0/ / /\/צ9where byte zero is the most significant byte ?YyÍ צ*Dis-assembly output f`?c :/?c / /\/Ǯile ( for none): PP׷צCONSOLE:#1:ׯ /'#"! ١(ǖǖ)/ / /\/ / ڢڢ+\ רd0123456789ABCDEFר ,7d  ˡ!  /$ǥǧǫ/44 ۢ 44/ /\/آ(آ( //44HEX CODE/8*[ ] .x/ / / ٢٢ Í/צREAL/ /\//STR /(/d/d/d/צ): 0.2á/ /\//צBOOL/ /\//POWR/ /\/ +\ ר'', EA= 951 - )%! /צBYTE/ / /\/X/WORD/ / /\/ A3)/-?=KZ4ǖ́3ʁ3ȡƀǖ4ǖ́3ʁ3ȡ V# //44/ /צ '4ǖ́4ʁ4ȡ&ǖġǖǖǖǖƀǖƀǖƀ ڢڢ!ȡ/ȡ /'//*M /4ǖ́3ʁ3ȡ;ǖ2Ä G4ǖ́3ʁ3/44)/ / /\/ ۢۢ.2Äצ 7KD'zh5)ȡT+\ )/) / /\/\ $ %%&1)&)(& š & & 4ǖ 4ǖ$$?$cؕ?$cũ$cÍ?c$%ɡ%  4ǖġ4ǖ) ٥۩cĄá<c۩c٢//44  ۢۢ% $?c$ȡ!?$c?$c$$) 4ǖá+Procedure not in file ۢۢڕ ۢ!ۢ!ǀɡ ?c=&4ǖ ɡ!&4ǖ  š  % á/ / / / /\/ڕȡ`+\ ؕ)/áN Procedure   is written in Assembly./ /BLOCK #) / /\/h //448/V/( / OFFSET IN BLOCK=/ //צSEGMENT PROC OFFSET#/ #/צ ؂(؂l 24ǖ9Ȅ 0ōL"I didn't say you had THAT segment! 4ǖȡ%צ # LL SIZE4ǖȡHˡAQqÍÍ&4QqÍi 7have you changed your mind about data segment watching? :  4ǖȡ" YyÍéQȡFˡ dצ"Procedure guide: #(of procedure),&צL(isting),Q(uit)*צA(ll),L(isting),Q(uit)T  1 Do you wish to keep track of referencesצ2 to a parצ to segment: ȡ ?قצwhich procedure $ticular procedure's data segment?YyÍ צ&Do you wish control over dis-assembly?צdata segment to watch?צto dis-assemble?LlÍAaÍdis-assembling allYyÍ;*** WARNING - - STATISTICS ARE GATHERED ON DIS-ASSEMBLEDצ PROCEDURES4ǖ צ proceduresꓡ2( ) ONLY ***q /*** THIS INCLUDES DATA SEGMENT WATCHING ***Q09Ȅ009Ȅ 04ǖōG$I didn't say you had THAT procedure!| ȡU(( )Mצdis-assembling procedure  dˡe` 2 P l l f JD* n  L !: ol over dis-assembly?ȡ  4ǖȡcQqÍÍX6cXrצ$SegmeYyÍ;*** WARNING - - STATISTICS ARE GATHERED ON DIS-ASSEMBLEDצ PROCEDURESnt guide: #(of segment),Q(uit)צyou have these segments:ȡV عצ Parameter oneצ Bits used Total Percentageצ7 Parameter one  ȡ ?؂which segment to look at  Parameter two ٦7Bits used Total Percentage Total Percentageצ. Paraš۩á ؤؤ?ń4šکá ؤؤ6y  *(צto decide on DATA SEGMENT?&צfor possible DIS-ASSEMBLY?Qq˄09Ȅ00 إ/@ إ/@#d` :إ/` إ/`#d /٢ /٢d// \ // /' צSLDL OPCODE: 216..231 TOTAL:ة" ة"'dצ % ""ˡd/צ % /////ámȡ`/ /٢ /meter one Parameter twoצ Case table sizeצ7Bits used Total Percentage Total ȡ :إ/ إ/"d :إ/ إ/ Percentage٦ Total Percentageצ*Flavor Total Percentage Flavorצ Total"d :إ/ إ/"d  :إ/  إ Percentage٦2 # Total Pct # Total Pct # Total٦ Pct # Total Pct/ "d "JئSLDO OPCODE: 232..247 TOTAL:ة! c3C~ //Jump statistics on the/ /צ Total jumps/ة!'dئ % !!ˡ ȡ :إ/ إ/!dš//צ5 Positive jumps Negative jumps//ȡw/ / :إ/ إ/!d :إ/ إ/ /d/ /d/3//Sorry no ju!d  :إ/  إ/ !d צSIND OPCODmps today!/r6 z//Procedure call statistics/ȡˡǖE: 248..255 TOTAL:ة  ة 'dצ %   ˡ ȡ :إ/ȡǖšz/ Segment:/ / Procedure:/ / Calls:/ إ/ d :إ/ إ/ d :ǖ / 􊉇ȡ/*2ئSLD/ إ/ d :إ/ إ/ d C OPCODE: 0..127 TOTAL:ة# ة#'dئ % ##ˡ ȡ : (\ // / / /'d/ % /إ/ إ/#d  :إ/  إ/ #d@ :L / / /'d/צ % ˡ/////ȡI/  /٢ d/ȡI/ /٢ $ /٢ d/צCONSOLE:ׯצ#1://Pǀ **ȡ//44/ \ Z/ / /'d/צ % ˡ/////צ Opcode:/ / Total: : 6 2 .*&" ("(" ,/ȡ/ /٢ /٢d/٢ /٢d/. 8 ////' / Total operators/٢! /٢!d//  4// /'d' צ Total operators TT "ɍ -   $/צ % ///áȡ/V؂44/٢( //  $ ݞ$' ݑ$ $݂ō $݂ġ ݂$/٢  //ȡw/ /٢ /٢d/ /j؂44/٢( ///~44,/٢((   /٢ d/á䥁//áȡ/8؂44/٢//ȡ/V؂44/٢( /٢(d/j؂44  // /8؂44/٢ ///٢( /٢(d//~44,/٢(( /٢((ȡ襁/8؂44/٢ /٢d/צ /8؂44d/RGP/ / /'d/צ % ////٢ /٢d/z / / ȡˡ]/3؂44/٢ /٢󊉇d/ N/3؂44/'d/צ % ˡ/////ȡI/ /٢ //٢ // á// 6 ǀ ȡ/d// \ / / /'d/צ % Tš dš Xš Lš @š 4š (š / \FT>4fh.$/////ȡw/ /٢ /٢d/٢  V   3Output file for opcode statistics ( for none): P Í&4QqÍi 7have you changed your mind about data segment watching?t  إ/#d  :إ/  إ/ #d@ :ɡ=ˡ/آ;ˡ/آإ/@ إ/@#d` :إ/` إ/`#dةؕؤ ؤšؤؤةġ= d צSLDL OPCODE: 216..231 TOTAL:ة" ة"'dצ % ""ˡئData Segment size:ة צ Data references:ة ئ Lex levelإ۩c  ȡ :إ/ إ/"d :إ/ إ/צ For segment ȡإ?قצ Procedure #ة ئOREAL STRING BOOLEAN POWER BYTE WORD EXEC-ERRINIT RESET OPEN CLOSE GET PUT SEEK EOF EOLN ffset(word) Total %u8ˡ3/ / /d /ˡREADINT WRITEINTREADREALWRITREALREADCHARWRITCHARREADSTR WRITESTRWRITBYTSREADLNN WRITELN CONCAT INSERT COPY DELETE POS X  8Output file for data segment statistics( for none): PBLOCKIO GOTOXY IOCHECK NEW MOVELEFTMOVERGHTEXIT UREAD UWRITE IDSEARCHTREESRCHTIME FILLCHARSCAN DRAWLINEDRAWBLOC׷צCONSOLE:#1:ׯ//P/š///צ s TRUNC ROUND SIN COS LOG ATAN LN  $ $ȡ%  0 ފ$čV   .ˡ:  Eɡ orry but there were no accesses/צ3 to this data segment from dis-assembled procedures/! Z  -ݑ š 0 0 ߿`ġ(   ݂. ݕ ؂݂3  ݕ 0 . ݑ0 pɍ -   $ $ ݞ$' ݑݕ݂ ؂ ɡ  |,  j  ,. o look at (צto deci$ $݂ō $݂ġ ݂$ $ $ȡ%  0de on DATA SEGMENT?&צfor possible DIS-ASSEMBLY?Qq˄09Ȅ009Ȅ 0 ފ$čV   .ˡ:  Eɡ  -ݑ š 0 0 ߿`ġ(  ōL"I didn't say you had THAT segment! ˡAQq ݂. ݕ ؂݂3  ݕ 0 . ݑ0 ݕ݂ ؂ ɡ  |, p  SRS SBI SBR SGS SQI SQR STO IXS UNI LDE CSP LDCN ADJ FJP INC IND IXA LAO LSA LAE MOV LDO SAS SRO XJP RNP CIP EQU GEQ GTR LDA LDC EDITORUNSCONTROL LEQ LES LOD NEQ STR UJP LDP STP LDM STM LDB STB IXP RBP CBP EQUI  GEQI GTRI LLA LDCI LEQI LESI LDL NEQI STL CXP CLP CGP LPA STE BYT EFJ NFJ BPT XIT NOP SLDL SLDL SLDL SLDL SLDL SLDL SLDL SLDL SLDL SLDL SLDL SLDL SLDL SLDL SLDL SLDL SLDO SLDO SLDO SLDO SLDO SLDO SLDO SLDO SLDO SLDO SLDO SLDO    TYPE $   TYPE $   TYPE $   TYSLDO SLDO SLDO SLDO SIND SIND SIND SIND SIND SIND SIND SIND PE $   TYPE $   TYPE $   TYPE $    TYPE $   TYPE $   TYPE $    TYPE $   TYPE $   TYPE $        TYPE $   TYPE $   TYPE $    TYPE $   TYPE $   TYPE $   TYEXP SQRT MARK RELEASE IORESULTUBUSY PWROFTENUWAIT UCLEAR HALT MEMAVAL SLDC ABI ABR ADI ADR LAND DIF DVI DVR CHK FLO FLT INN INT LOR MODI MPI MPR NGI NGR LNOT   7;  SCMAXSW = 84; {Maximum allowable screenwidth} "  VAR "TRANSLATE : PACKED ARRAY[CHAR] OF SCKEYCOMMAND; "SCFILLIT : ST"F áزC Cبب"٢ ٢ؾ6PE $   TYPE $   TYPE $   TYPE $ RING[11]; (*For writing in front of controls*) "SCSCREEN : PACKED RECORD (* For sending to screen *) 0PREFIX: CHAR; 0HEIGHT,   TYPE $   TYPE $   TYPE $ WIDTH: 0..255; 0CANUPSCROLL,CANDOWNSCROLL,SLOW: BOOLEAN; 0HASPREFIX: PACKED ARRAY[SCSCRNCOMMAND] OF BOOLEAN; 0CH: PACK$SCDATETYPE = PACKED RECORD 6MONTH: 0..12; 6DAY: 0..31; 6YEAR: 0..100 4END; $ $SCCHSET = SET OF CHAR; $ $SCED ARRAY[SCSCRNCOMMAND] OF CHAR .END; {screen} ) "SCKEYBRD : PACKED RECORD (*For recieving from keyboard *) 1PREFIX: CHAR;LONGSTRING = STRING[255]; $ $SCSCRNCOMMAND = (SCWHOME,SCERASS,SCERASEEOL,SCCLEARLNE,SCCLEARSCN, 5SCUPCURSOR,SCDOWNCURSOR,SCL 1CANBREAK: BOOLEAN; { Valid break key } 1HASPREFIX: PACKED ARRAY[SCKEYCOMMAND] OF BOOLEAN; 1CH: PACKED ARRAY[SCKEYCOMEFTCURSOR,SCRIGHTCURSOR); 5 $SCKEYCOMMAND = (SCBACKSPACEKEY,SCDC1KEY,SCEOFKEY,SCETXKEY,SCESCAPEKEY, 4SCDELKEY,SCUPKEY,SCDOWNMAND] OF CHAR /END; { Keyboard } !  SCBLANKAREA : PACKED ARRAY[0..SCMAXSW] OF CHAR; " "PROCEDURE SCINIT; "CONST KEY,SCLEFTKEY,SCRIGHTKEY,SCNOTLEGAL); 0  SCCHOICE = (SCGET,SCGIVE); $  VAR "SCVERSION : STRING; "SCDATE : SCDAȡ ٢ڢ٣%٣&ڢ ڢ ٢-٢٢$TETYPE;   PROCEDURE SCUSEDATE(DOWHAT:SCCHOICE; VAR TDATE: SCDATETYPE);  PROCEDURE SCERASETOEOL(X,LINE: INTEGER);  PROCEDURE٢ ٢$٢ ٢$٢#٢$٢#٢$٢ SCINIT;  PROCEDURE SCLEFT;  PROCEDURE SCRIGHT;  PROCEDURE SCUP;  PROCEDURE SCDOWN;  PROCEDURE SCGETCCH(VAR CH: CHAR; RETUR!٢$ ٢"٢$٢!٢$٣.٣.NONMATCH: SCCHSET);  PROCEDURE SCCLRSCREEN;  PROCEDURE SCCLRLINE(Y: INTEGER);  PROCEDURE SCHOME;  PROCEDURE SCERASEOS(X,LINE٢/ ٣.٢)٢)٢/ ٢-٢-٢: INTEGER);  FUNCTION SCSCRNHAS(WHAT: SCSCRNCOMMAND): BOOLEAN;  FUNCTION SCHASKEY(WHAT: SCKEYCOMMAND): BOOLEAN; / ٢,٢,٢/ ٢,٢,٢/ ٢'٢' FUNCTION SCMAPCRTCOMMAND(VAR KCH: CHAR): SCKEYCOMMAND;  FUNCTION SCPROMPT( 3LINE:SCLONGSTRING; XCURSOR,YCURSOR,XPOS,WHERE:٢/٢'٢'٢/٢(٢(٢/٢(  ٢(INTEGER; 3RETURNONMATCH:SCCHSET; NOCHARBACK: BOOLEAN 2): CHAR;   IMPLEMENTATION  CONST "SCEOL = 13; SCLF = 10; SCDC1 = 1 ٢/á#For use with SYSTEM.MISCINFO [S.5b]תPV " š "   .Rp(:NתPצ[ˡAƀƁ[צ[ƁPƀƀצ:ˡ-ƀSCERASET JFpSCERASEO SCERASEO )SCPROMPT SCPROMPTSCUSEDAT Ɓצ:ƁPצ:ƀ̀ʀƀ̀ƶƀʀ¾ áʀ̀ʀʀ•SCUSEDAT TRANSLAT @i5bCONTROL CONTROL  JZjz!?aʀƕ̀ʀ•ʀƕšʀđ ʀʀĂ ̀ʀʀẦƀʀĿʀƀʀĞƀړ ?  צ IMIN  SCCLRSCR SCCLRLIN SCCLRLIN SCONTROLSCDATE SCHASKEY SCHASKEYSCMAPCRT SCMAPCRTSCSCRNHA SCDOWN SCDOWN SCHOME SCHOME %SCUP SCUP SCERASET 7إáٕٕP   SCSCRNHA:\SCSCREEN#^k} +8JW*LzSCGETCCH  ھ ھ˄  ˡܓݢݢSCGETCCH |FSCKEYBRDRt~#CPp}!SCLEFT  \    SCLEFT SCVERSIO)SCFILLIT\ySCRIGHT SCRIGHT SCBLANKA+-ȡH    ?T&SCINIT SCINIT SCCLRSCR SCCLRSCR SCCLRLIN SCCLRLIN L" Tɡ ڡ̀ȡ/ġړƀʀSCDOWN SCDOWN SCHOME SCHOME %SCUP SCUP SCERASET ?ˡ̀̀ƀתPƀȦתPצ[ˡAƀƁ[צ[ƁPƀƀצ:ˡ-ƀSCERASET JFpSCERASEO SCERASEO )SCPROMPT SCPROMPTSCUSEDAT Ɓצ:ƁPצ:ƀ̀ʀƀ̀ƶƀʀ¾ áʀ̀ʀʀ•SCUSEDAT TRANSLAT @i5bCONTROL CONTROL  JZjz!?aʀƕ̀ʀ•ʀƕšʀđ ʀʀĂ ̀ʀʀẦƀʀĿʀƀʀĞƀړ ?  צ MIN MIN  SCCLRSCR SCCLRLIN SCCLRLIN  ƀʀʀẰʀġ̀ġړ ƀʀ?ʀʀ/<0<BdSCDOWN SCDOWN SCHOME SCHOME %SCUP SCUP SCERASET   gives the user two ,very useful capabilities that are not available ,elsewhere in the system. $ ,One capability is the ability to edit files on a byte ,basis. What this means is that instead of treating ,files as text files they are treated as files of ,bytes. This allows the user to edit not only text ,files, but also to do quick fixes to code files and ,to create specialized test data. This is the EDIT ,mode of PATCH. $ ,The other capability is the "dumping" of files out to ,a text file i PRELIMINARY *** PRELIMINARY *** PRELIMINARY ***PRELIMINARY *** PRELIMINARY , ,The PATCH program that this document describesn various numeric data types, so that ,user can see his non-text files in formats that are ,more meaningful to him. This part ,contains most of the features of previous releases of ,the PATCH program. Several new features have been ,added and the use of PATCH also has ,the ability to read from core memory. ( This is ,primarily so that Interpreter and BIOS can be seen at ,r interface of the program has been ,given a complete overhaul. $ ,The program itself is reasonably self-documenting and ,run time. ) This is the DUMP mode of PATCH. $ $GLOBAL CHARATERISTICS $ ,All prompt lines expect single characters SCERASET JFpSCERASEO SCERASEO )SCPROMPT SCPROMPTSCUSEDAT contains a generous helping of very explict error ,messages to explain what is wrong. This document is ,intended to be on hanSCUSEDAT TRANSLAT @i5bCONTROL CONTROL  JZjz!?ad and read along with the user's ,first few uses of PATCH. It will not necessarily ,describe exactly what will appear on the  C ^screen partly ,because such description is tedious and partly ,because a picture is worth a thousand words. $ ,PATCH uses a SCREEN CONTROL MODULE ( section ???.? ) ,to do most of the displaying on the screen. It is ,thus terminal ( those that have 80 character lines ,and 24 lines per screen ) independent. ( If compiled ,with the proper Module. ) The program has also been ,written to be machine independant. $ ,PATCH is a utility program that  tinue until the user types a . This is ,to signify that the error message has been read. ,Occasionally an error will *M(ixed - a toggle that changes the mode that current block 8will be displayed in. There are two modes : ; ;Mixed - whigenerate several error ,messages that will come out one after the other. $ ,All numbers wanted by the program are first read ch displays the printable ASCII Ccharacters, or the corresponding CHexadecimal if they are not printable. C ;Hex - displas ,strings and then converted to integers. Only the ,first five characters of the string are considered. ,If there are anyays the block in Hexadecimal. < 7 *I(nformation - displays the known information about the current :file that the EDIT mod non-numeric characters in the string ,the integer is defaulted to zero. If integer overflow ,occurs the integer will be defae is using. This :includes the File name, the length of the file, the :current block being accessed, if it is open, are :ulted to MAXINT. ( ,Since integer overflow can only be dectected by the unitreads being done, the unitnumber ( -1 if UNITIO :is FALSE ), and the byte sex of the machine. :The byte sex makes no diff,precesence of a negative number, integers in the range ,65536 .. 98303 will come out modulous 32768. ) $ $ $ $ & $ $Terence to the user or :the program. ( see section 3.6, BYTE - SWAPPING, :in the document ) : *F(orward - gets the next HE EDIT MODE $ ,EDIT allows the looking at and the editing of files or ,Units one block at a time. & & ,The prompt linesblock in the file, if already at 8the end does nothing but puts out message to that 8effect. 7 *B(ackward - gets the pre for EDIT are : $ $  EDIT : D(ump, G(et, R(ead, S(ave, M(ix, T(ype, I(nfo, F(or, B(ack, ? II.0   EDIT : V(iew, W(ipe, Q(uceeding block in the file, if 8already at the beginning does nothing, but does 8put out message to that effect. 8 it, ? * ,( theses prompt lines only appear one at a time. The ,question mark allows one to toggle back and forth ,between t*V(iew - displays the current block according to MIXED * *W(ipedisplay - cleans the display of the block off the screehem. All commands are valid regardless of ,which prompt is being displayed. ) , * * *D(ump - calls DUMP * *G(et n. :( no need to ever use this ) : *Q(uit - quits the PATCH program 9 *T(ype - goes into the "typing" mode, t,corresponding to the first character of the option. ,All characters not explicitly shown on the prompt ,line are ignored.  - gets the file that one wishes to edit * does an initial read of block zero if the file 8was opened. * *RThroughout the program Upper and ,Lower case characters are considered the same. $ ,All error messages appear on the bottom l(ead - reads the specified block number of the gotten file * *S(ave - writes the contents of the buffer out to theine of the ,screen. The symbol that appears after each ,message is to remind the user that the program will ,not con 8current block, if any block has been read in 8successfully. 8  his is the mode 8through which the block can be changed. : : -The prompt line for TYPE is : : "TYPE : C(har, H(ex, F(illr arrows designated Hby SETUP. They will do the same Hrespective action as U,D,L,R. H , U(p, D(own, L(eft, R(ight, , Q(uit 2 2C(haracter - Exchanges the next characters that are ?typed for the byt2Q(uit - Quits the TYPE mode and returns to the >EDIT mode. ? ? 2 2 (THE DUMP MODE ( ,The DUMP mode is used to cree at which the cursor ?is pointing to. The cursor is auto- ?matically moved to the right one byte. ?Only printable characterate "dumps" of files out ,to a text file. It does so in the following formats : ,Decimal, Hexadecimal, Octal words, Characters are accepted. ?This mode is terminated by typing . ? 3H(ex - Puts the next hexadeciaml digits typed in the ?buffs ( if ,printable ), Decimal bytes, Octal Bytes. In addition ,to the variety of formats, DUMP is also capable of ,flipping ther at the position the cursor is pointing ?to. The cursor is advanced one to the right. ?This mode is terminated by typing a e bytes in a word before displaying it and ,displaying both flipped and non-flipped lines ,simultaneously. ( ,DUMP has two d'Q'. ?( lowercase letters are accepted ) ? 3F(ill - This mode allows the user to fill large parts ifferent ways to read input. One is ,from a diskfile or Unit specified by the user. The ,other is to read directly from core?of the block with the same byte pattern. ?It will accept either characters or hexadecimal ?digits for the pattern. When fin ( this is ,primarily to see the Interpreter and/or the BIOS ). ( ,DUMP also has a specification for the width of the ,outpuished the ?cursor will be positioned after the last ?byte filled. There is a particular syntax ?required for telling Fill t. This is specified by the number of words the ,user wants across one line. 15 fills an 132 character ,line. 9 fills an 80 what to do. The ?syntax is displayed in the prompt and the ?errors messages tell the user exactly what ?part of the syntaxcharacter line. ( (The Specifications ( *A) : This is the input disk file or Unit.   failed when the error ?was generated. ? 2The following commands move the cursor around within the 2block of data being di*B) : This is the starting block number of the file or Unit. 0If it is a Unit, there is no range checking on the block 0numbsplayed. The cursor will never point 2to an undefined point on the screen. There is complete 2wraparound ( side to side, toer. 0 *C) : The number of blocks to print out, can be over specified. * *D) : When specifications are set, this says Do itp to bottom ) on cursor movement 2 6U(p - moves the cursor up one row 6 6D(own - moves the cursor down one row 6 6L(ef. * *E) : If true then reads from core, if false reads from File 0specified in A). * *F) : Offset from byte 0 to start att - moves the cursor left one column 6 6R(ight - moves the cursor right one column 6 6 - these are the vecto. Limit is MAXINT. * *G) : Number of bytes to print, limit is MAXINT * *H) : Output file, opened as a text file * *I) f one type of output ) * *T) : Put a blank line between each different type of line printed 0out. 0 *    ,Both the EDIT and DUMP modes remember all their ,pertinent information when the other mode is ,operating.    ڪPء š ˡ  צ -- áT vتP(( note - Some users might notice that although DUMP 1can read from core EDIT cannot. This is done to 1encourge better progrRتPR)ܹUDLR 8 : Width in words of output line. 1 <= Width <= 15 * * *The following have three booleans that have to be specified. *Theamming habits. ( i.e. To prevent 1the user from modifing his system at run time. ) 1Should the user wish to change his run tim USE variable ( the untitled first column ) tells DUMP *whether or not to even consider printing out in that format. * *The Fe system all 1he has to do is change the system disk files. )        LIP column tells DUMP whether or not to flip the bytes *before displaying the word in that format. * *The BOTH column is for simultaneously displaying both Flipped *and non-Flipped versions of the line. If BOTH is true, it does *not matter what FLIP is. * -J) : Display each word as a decimal integer - -K) : Display each word in hexadecimal digits in byte order - -L) : Display the word as an Octal integer. This is the octal 3equivalent of J. 3 -M) : Display each word in characters in byte order. If the 3characters are not printable the hexadecimal digits will 3be displayed. 3 -N) : Display each word as two bytes in decimal format. In byte 3order. - -O) : Display each word as two bytes in octal format. I@ PATCH n byte 3order. 0 * *Q) : Goes back to the EDIT mode. DUMP will remember the current 0specifications. 0 *S) : Put a bla nk line after the non-Flipped version of the line. 0( Used to put a blank line between the non-flipped 2and flipped versions o ...š.&"ˡ5צ"Error clearing unit. Ioresult is "ۢ E/؂E/؂Pš"ˡ4צ!Error opening file. Ioresult is "ۢB////PG Gצ| GEGGꩁ鍡E ȡE/؂///צ File opened. Unitnumber : 2 ..   ( 0 quits ) PE/؂E/؂E E/؂/؂E/؂`E/؂ȡ/GCORE DUMP Startbyte : G G Number of valid bytes : E/؂G G| GEGG G*)š/ڞ/ڕ GCORE DUMP Startbyte : G G B~D&ᩁ!E ȡi/؂EG Number of valid bytes : G G*)9`+٩Ʉ򥃢fGצ Block numbǀ"/؂Eǀ"G G| GEGGᩁer [ G Gצ ] of the file GG*)zError occurred reading block ש!Do !E ȡi/؂Eǀ"/؂Eyou want to continue ? ( y/n )س@@YyÍ7 ,٨ܡצTrue"G G| GEGGE'ީ!ݍE צFalse'ۡTrueFalse8ڡצTrueצFalse. DUMȡ/؂EEEEEP : D(o, Q(uit  A) Input File צ B) Starting Block  EG G| GEGGީ!ݍE C) Number of Blocks צ E) Read from Memory  F) Starting Byte  ȡ/؂EE EE צ G) Number of Bytes  H) Output File צ I) ȡ/؂E/؂`E/؂E/؂EEG G| GEGGBR/؂E/؂`E/؂*(E#$%&'ߡ(: ȡة󏩁 šE/؂G Gצ| GEGG䩁㍡ 8 N)G ȡ7ȡ&G Gצ: eȡ&G E ȡ/؂E/؂`E/؂G: ȡ%G Gצ: G4k *š Decimal צ K) Hexadecimal  L) Characters //8//'/8/n/'/8/ݹI/<//צ M) Octal  N) Decimal bytes צ O) Octal bytes AT(z\b "$E:Qá /Z18"$UPeVLצ: 0: 2:  S) Space between Lines צ T) Space between Groups 4: 6: 8: 10: 12: 14: 16: 18: 20:צ 22: 24: 26: 28:ȡ$ |  צTrue False   y+00ȡȡق 0/ /   ......צTrueצFalseTrueV/؂/؂0/ /False-ڳ @@ڳTrueצFalse V/؂/؂0f n/-ٳٹá𩃦wP/"/ V//ةȄث5,Value out of range. Maximum block number is ש 'צ Input file must be opened fir0/"/ V//st.Pšث(!Number must be greater than zero. x+),-.8C 1צBlocknumber : P***ō@/B צInput file is not opened.yCONSOLE:ׯ񍄡H#Type < space > to redisplay prompts locknumber is out of range. Highest value is ש**ѥХצRead was successful.OT2ѩ-!צOutput file is not opened./P Pɡ1ѥХRead was successful.1 צHave reached end of file.d3š1ѥХRea  tG  y PȄث+צ Value out range. Defad was successful.1צAlready at block # 0.\4ӡSХ/"ˡ+צ!Error saving block. Ioresult is "Width in words @ Flip Both  J) ults to 15.   /' /8 //'/8//' #O~A *3~a * 0*~printable char> or H תP0/3#~~A **6~a ** 0***+>1.+.@צ6Invalid format. Hexdigits ::= 0 ..  d' ȡ0؂ȡ A؂ Block saved.S/ˡ,צ"Error saving buffer. Ioresult is "צ Block saved.59 , A .. F, a .. f +TChLk \ "$&(*,.02468:<>@DFHJAצ7Invalid forFile : צ Length :  צ Current :  ֡+צ Byte 0 : HIGH mat. Must have prefix character, 'C' or 'H' +-.,+.,.ȡ <<,,57z~\"=Byte) Byte 0 : LOW Byteԡ Open : True  Open : Falseӡ%צ2CHARACTERS : , quits -é-Í -I--.ˡz٥M/צ Unit I/O : True # Unit I/O : Falseצ Unitnumber :  צ .--ٿ -.<<.é-Ä;#Invalid character-.á-. á/Z1* 6ȡ $7.š ..j-š1 ?צ6HEXADECIMAL : 0 .. 9 , A .. F , a .. f , Quits-.ˡإ#Ä..-I--.-á -I-3-š-.-I--.-á -I- 9.ɩ-ɩ.Ä<-- ֡إ3/0Bس~/A  ..3-Iɡ-.-I--.-á -I-\:-š -I--á -I- .šII-/a aA-.<צ Invalid input-.á-.: h@..-.N;-Iɩ.Ʉ.é-Ʉ%-I--é.Ʉ -I- -IáI-..-.-.س $XLع?E@A==99:5;1<-CU&#! )!)"$;Qá/Zb<.--šەȡ/ڂٿP>צNumber of bytes : P1~8G$A Zצ!EDIT : D(ump, G(et, R(ead, S(ave,!צ. M(ix, T(yp+++ō,+צ Number of bytes is out of range.What pattern : Pɡצe, I(nfo, F(or, B(ack, ? II.0 OP1!EDIT : V(iew, W(ipe, Q(uit, ? !. Invalid format.++>1.+.ɡצInvalid format.+# OPLTYPE : C(har, H(ex, F(ill, U(p, D(own, L(eft, R(ight, , Q(uitתPHValid format : C< ٢$ ٢"٢$٢!٢$C٣.٣.٢D̀ʀ•ʀƕšʀđ ʀʀĂ ̀ʀʀẦƀʀĿʀƀʀĞƀړ ?  צ / C٣.C٢)٢)٢/ C٢-٢-٢/ ƀʀʀẰʀġ̀ġړ ƀ ʀ?ʀʀ/<0<B z xC٢,٢,٢/ C٢,٢,٢/ C٢'٢'٢/4 $N0T"$'z"'(8*++-/2.57 9$9l+B9::;r====>?@6@X@h(B"pfxb@DM} C٢'٢'٢/C٢(٢(٢/C٢(  ٢(-˫  áٮ%M- &?ö;}R ˡ(á!9á "  ٢/á#For use with SYSTEM.MISCINFO [S.5b]תPV " š " "Fá ˄ۮ%&؟ˡ#š á$ á% &ˡ ˡ  á ١I-.٫弄צ áزC Cب,ب"٢ ٢ؾ6CC7إPХתPyצPxwvutT BƂGƃsƁƃ#ƂáٕٕPC C C C KՉHBZOճ aAթճ"չХԡ Хھھ˄ C ˡܓݢݢ 0006צ/The display will be in characters if printable./צ*The display will be in hexadecimal digits.67\C  C  C C-/1Z//ԡPչ2E5A8=394511BV*  ?=;(3צError. File notȡ H    ? open. 9?W2 ;=, "$&.QáAƂGƁƂ"$_ #L" T ɡ Dڡ̀ȡ/ġړƀ ʀ?ˡȡC ٢ڢ٣%٣&ڢ ڢ ٢-٢٢$٢ ̀ƀתPƀȦתPצ[ˡAƀƁ[צ[ƁPƀƀצ:ˡ-ƀƁצ٢$٢ ٢$٢#٢$٢#٢$٢!:ƁPצ:ƀ̀ʀƀ̀ƶƀʀ¾ áʀ̀ʀʀ•ʀʀ **ؾT0ػڿٻ$ڶ/خخȡȡ  B    F" N ڂ ۢ-ۢ)Cۢ:ۣ%ۣ&ݢݢݢݢݢݢ۶ġ !:̀̀צ:̀ʀʀ[ʀ ̀]ƀʀʀƀ̀*ۢ-ۢ ۢܢܢܢܢܢܢܢ ۢ%ܢ̀ʀ̀ʀʀ̀ˡʀʀ̀ʀȡ̀ʀʀ̀ʀ ʀ ̀ʀʀ̀ ܢܢ ܢ ܢ ܢܢܢܢ áצ ܢʀ̀ʀʀ̀ʀʀʀʀʀ ̀ʀȡ1ʀʀʀʀ !̀ʀʀá̀̀ʀġʀ ܢܢá&צ  ** 0 ۢ" šˡ ʀʀʀʀʀɡ ? ʀʀʀʀ!̀ġۓƀ ʀ?ˡʀ ء ۢܢܢܢ:ܢ:ܢܢۢOe zɡٚ šؚ\-2 á`;צ for none)  Po "å Íȡ ȡ >צ:*|0 0|Is there a '>' immed. followed by a '*' in the lower| ˫t| צ$Done with Screen Control Diagnosticsoo***** End Diagnostic; 0 1|right corner?צ6test_gotoxy: gotoxy(screenwidth-1,screenheight) not ok ȡ -------->|9 9|o o errors encountered.ooצ Error File " " closed with   errors.  ȡ   ȡ  ȡ  ȡ צ@|5 0|Does the box have 10 starsت$ o o oo4تP++@@+@@ per side and start at the arrow?$test_gotoxy: box not correctly drawn \  3|0 10|Is the screen=TJܳm ܂0šU%integer overflow in message procedureצ .  blank (except for this sentence3|0 11|and (maybe) the lower-right hand character) ?#test_clr_screen: screen not clearedindex= MˡH,illegal character in message procedure. ch=á צ1Does this message start at the upper-left corner?צ4test_clr_screen: cursor not left at (0,0) afterwardstت̀̀ʀʀȡʀʀ|ʀ ʀ̀ʀʀšʀʀʀʀ̀NʀʀʀʀتP 3 צ*|0 0|Is this the only thing on the screen?--צ%test_clr_line: didn't clear enough |á)ʀ̀ƀ ̀ƀ|̀ʀʀʀ̀g  9* Is this sentence surrounded by two asterisks (s- %-u-- צ(45,12) צ(0,10)(0,Screenwidth) ȡ3tars). *0test_basic: not all characters being written out Õġ!A   >|0 0|Are there two blocks of "%"s (no gaps or missing chars) ?צ1test_clr_line: Clearing one line affected anotherˡ ʀʀʀʀʀɡ ? ʀʀʀʀ!̀ġۓƀ ʀ?ˡʀa+ @  ȡAġ צ6|0 0|Are all of the below lines the same (e\-2 á`;צȡ$צ;|0 0|Is the line be//Í Ä./ öÄ..|0 5|Key typed is not correct.צ.|0 6|Do you wish to try typing this key alow a series of stars immed. followed byצ a right-arrow ('>')?צ+test_erase_eol: sc_erase_to_eol didn't work gain?h@@@@--@00test_keyboard: 0_0 key not correcto ȡ%3Õɡ   צ9|0 0|Are there five full lines of '%'s followed by a li0-._y  צup-arrow down-arrowצ left-arrow right-arrow editor accept (etx)lneצ:|0 1| with just five '%'s (and maybe a stray character in'|0 2| the extreme lower-right corner)?$test_etoeos: scine delצDC1צ backspaceצescapereturn צtab צ line feed تP"|4 7|Bad character._eras_eos didn't work ;|0 0|Is the cursor at the upper-left corner (over the 'I')? צ test_home: cursor You typed a '  chr( )++'+Q+-|4 9|Do you w didn't go homeot 4|15 15|*|0 0|Is the cursor to the right of the star?צ)test_single_vectors: sc_rigish to try this character again?o@@h@@9 P+++ht didn't workצ,|0 0|Is the cursor to the left of the star?(test_single_vectors: sc_left didn't work +  Rf 8Please type in the following characters|2 1'|0 0|Is the cursor just below the star?(test_single_vectors: sc_down didn't workצ'|0 0|Is the cursor just above|in the EXACTצ order shown:|4 4| á3צ.|2 2|Note: The first character is a space|4 4|ȡ the star?צ&test_single_vectors: sc_up didn't work 33|0 1|Is this the top (and only) l ˡ3צ,,|4 8|which is interpreted as a special key.áצšk  &צine of the screen? צ1test_scroll: sc_down at bottom line didn't scrollƀ- + ȡ O P`{~P~šC̀ƀצ%check_normal_keys: Can't type these: %ƀƀp:o  ȄGؕš ȡ<ڕš ƀ́ʁȡ   oaB\LV&b2 Z H|  ZZ8ters|2 14|0 0|Are all the lines below a '<' followed by '-'s?צ4test_DLE_expansion: expansion not happening properly_ CODEFLIP   ȡٕ to what file? Pá6"á2́ȩ2ʁȡ襁2́ɩ˩˄3ȡ^eV r "$&(*,.02468:<>@BDFHJLNPRTơ' (Segment 2 )%צ 2˥2255b & ء ǹٶɡپڂKUN JERROR: GOT BAD P-CODE:  /šצINTERFACE TOO LARGE^525æREADING INTERFACE6525צWRITING INTERFACE  RMHFڂ ءǭÍÍ ٸ  1.2́ʩ.ʁȡ *..0ˡ000/š(#NOT ENOUGH MEMORY SPACE FOR SEGMENT ȡ1ُˡčצCRAZY PROCEDURE POINTERھˡھˡINCORRECT PROCEDURE NUMBERɡצ CRAZY ENTERICɡ צEXITIC IS LESS THAN ENTERIC ɡ צ????ġ تPצERROR: RF3332á צ 3 .,!14 ڪP^--P-OPFILEV-"ڪ8\646?ڳ@@ YyÍ;FتPٓ>צERROR IN DISK I/O: צWRITING LINKER INFO8šBɡ^4æREADING LINKER INFO44RRPǡ ؾةK.ơھZe؏BAD LINKER INFO؏ ȡُ>`3ȡ$ȡھ:ٚ( ^צREADING BLOCK 0́́́́ʁʁȡ0ʁ؏ُáɕ5*`Ɓ6ƂbƁ^ƂՁSצP-CODE FLIPPER [́ʁˡʁɡ́́ʁ́ʁʁʁL;Are the byte sexes of this code and this machine the same? B2]ǥ/(ɞ(ō/?Ʉ//`צ#4:Tצ#5:Hצ#9:<צ#10:/#Ʃơaq ́́ʁʁȡ<ʁ́ʁ ʁ aʁ qʁ ƀʁ ʁ́Ɠaq11:"צ#12:NO FILE "OPFILE"^æREADING OPFILE^"ˡצFlip what cod 6צWRITING BLOCK 0>  zš K& e file? Pá^"ˡ(^́ƁȥPƁצ.CODEUƁ"á"ˡWrite  á9צ% Insert system disk and press return RELOC  DIRFLIPP   تPRצ initializeצAssembly Language Relocation צ[A3]0123456789ABCDEFר>Dirflipper [A1]x٪P print_hex,ɡ),,,,,š ,,,^00æREADING SEGMENT1 600צWRITING SEGMENT042>/צ5 Flip directory of disk in what unit? (0,4,5,9..12)  1ˡ, Insert disk t22ꥁ^6Ɓ6Ɓ^`,W$@>j Z$ H  ^ "255o be flipped and press returnM̃ʃȡeM ̃̃á/šצINTERFACE TOO LARGE^525æREADING INTERFACE6525צWRITING INTERFACE á9צ% Insert system disk and press return.2́ʩ.ʁȡ *..0ˡ000/š(#NOT ENOUGH MEMORY SPACE FOR SEGMENT >Dirflipper [A1]צ5 Flip directory of disk in what unit? (0,4,5,9..12)  1ˡ, Insert disk to be flipped and press returnM̃ʃȡeM ̃̃á Ʉ@ צadd_wordP؂p,PP*PƁ2.ƁZՁSrelocצ/What is the base address of relocation (hex) ? PׯP  צ get_blockPˡ?צ+Unexpected end of file, program terminated 쓡Cצ)There is a bad hex digit in your answer: צWhat is the file to relocate ? l צ write_block. ˡB.No more room left in file, program terminated WPWׯW"VVˡ*צCan't find file: WVáצ!What should the output filep צ put_bytesȡb  PP á   ġ   be ? PׯWP."ˡ/צCan't open file: צThe last addrj צ resolve_proc   Pš?PP ȡ'P PP ess relocated was צH.צTotal number of bytes:  .?nvPšPP ȡhP P P۲       ^* L  ~  here is a bad hex digit in your answer: צWhat is the file to relocate ? P PP_.צbuild_proc_recڢ P PڢPK ^ PڢPڢPڢPPڢPڢPڢP44ڣˍHצ8WARNING -- procedure has extraneous relocate informationڢ ڣצ Procedure # : ڣ H - H ڣ   bytes.צrelocatę P ,)T ۪P././ȡ[..0-.~.A ̩r̩q̨̩sʨʩsȡ:ʩqʨPˍ̩qʩrʨPˍ̩rʨ̨ʩrʩq+ Bad segment dictionary..dVpPPPPJp$PPʩq̩pP̨PP̨ P̨ ʨ ʨ ɡ&ʨʨ P ʨ P̨ ʨ̨ʨ P ̨ P"PPPTPP Ą%Ą̨ʨ ̩sʨʩsȡƩ ʨ  ʨ̨ ̨ʨ ̩sʨʩsȡʨ ʨ ʨ̨ʨ ˡ .3hiR ties will %differ between machines of different byte sex. % *Pascal code files, directories, and most data files, contain 16- %bit quantities and therefore are different on machines of opposite %byte sex. Text files are not dependent on byte sex. The FLIPCODE %and FLIPDIR utilities are provided to allow Pascal code files and %directories to be used on machines with a byte sex which is different %from the machine on which the files were generated. Flipping the sex %of a data file can only b DBYTE SEX % *UCSD Pascal makes heavy use of the sixteen-bit capabilities of %the microprocessors on which it runs. Pascale accomplished with knowledge of the %internal configuration of the file. Therefore, no general utility to %flip them can b executes fastest if it %makes use of sixteen-bit quantities in the way most suited to the %host microprocessor. However, te provided. The explanation of how to flip data files %is beyond the scope of this document. % * :PRODUCING FLIPPED CODE Fhis causes some incompatibilities %between microprocessors which implement sixteen-bit quantities in %different ways. Two uILES % *In most cases, there are two ways of producing a code file of tilities which are explained below are used to %convert some kinds of files so that files may be transported between %incomp%opposite sex. One way is to make use of the code flipping abilities %built into the Pascal system programs. The other is tatible microprocessors. % *Sixteen-bit quantities can be thought of as being composed of a %most-significant byte and a leaso generate the %files in the normal manner and then reverse the sex of the code file %with the FLIPCODE utility. This secont-significant byte. The order of the %most- and least-significant bytes as they appear in memory %determines the byte sex od method cannot be used on %Pascal code which already has assembly language linked into it. The %FLIPCODE utility is providf the microprocessor. Microprocessors with %a byte sex of least-significant-byte-first include the LSI-11, Z-80, %8080, anded in the case that it is inconvenient or %impossible to recompile the file whose byte sex must change. % *The Pascal system 6502. The 6800, 9900, and 6809 have a byte sex of most- %significant-byte-first. Since the order of the most- and least-  programs which generate code files are the %Compiler, Assembler, and Linker. A description of how each program %deals with%significant bytes as they appear on a disk is dependent on the byte %sex of the microprocessor, any files with 16-bit quanti byte sex is given below. % *The Linker can link files together regardless of byte sex. All %files involved in the linking  %the machine on which the assembler is run. Any files which are %linked to assembly files must ALREADY have the same byte see position of the directory on the disk. It %assumes that the directory it is flipping has the same physical %position, intx as the %machine on which the assembly object code is to execute. % *The FLIPCODE utility reverses the byte sex of Pascal cerleaving, and skew as the present disk drivers being %used by FLIPDIR. For example, if your system uses disks with 2:1 %inode files. %Any assembly language in the file being reversed is ignored. During %execution of the program the user is promptterleaving, a skew of 9, and the Pascal disk starts on track 1, operation must be of the same byte sex. %The file produced will have the same sex as all the input files. % *The (*$F+*) opted "Flip what code file?". %The answer given should be the name of the code file whose byte sex %is to be reversed. This fiion can be used to direct the Compiler to %generate code files with byte sex opposite to that of the machine on le can be of either byte sex. The user is %then prompted "Write to what file?". The answer should be the name %of the file%which it is compiling. This option should be used ONLY at the %BEGINNING of the Pascal source file. The code of any UNIT u to which the reversed sex code file is to be written. %This file name given should end with ".CODE" so that the Operating sed by a %program must be the sex of the machine on which the Compiler is %executing regardless of whether the (*$F+*) optio%System will later allow execution of the code file. Note that %executing FLIPCODE on a code file twice will return the file n is being used in %the host program. So if the user desires to produce an opposite %sexed file which uses UNITs without thto its %original sex. [NOTE: If the following sentence makes no sense to e aid of FLIPCODE, the %following steps must be taken: the UNIT is first compiled without the %(*$F+*) option; the program w%you, please disregard it! You probably don't need to worry about the %problem it addresses. Thanks.] If the code file beihich uses the UNIT is compiled with %(*$F+*); the UNIT is then recompiled with the (*$F+*) option, and the %Linker is used tng flipped was %compiled (*$U-*) and has unresolved forward declarations in segment %0 (which happens on compilation with tho link the program which uses the UNIT to the flipped %version of the UNIT. % The assemblers generate code files ine globals), then segment 0 %must be linked out with the library programs before an attempt to %flip it is made. % *With FL the sex of the machine on %which the object code is to execute. The code file generated by an %assembler which produces obIPCODE, any errors given other than disk I/O errors mean %that the file being flipped is of an illegal format. % * :PRODUCIject code for a most-significant-byte- %first microprocessor will be identical regardless of the byte sex of NG FLIPPED DIRECTORIES % The FLIPDIR utility reverses the byte sex of a Pascal directory. %FLIPDIR does not find th  may not contain any .ORG, .ABSOLUTE, .PRIVATE, %.PUBLIC, .CONST, or .INTERP directives [.ABSOLUTE means a codefile is %nonreK ^locatable by definition]. The absence of these directives %ensures that the code will be assembled with a relative starting 44%address of 0000H. % *Multiple procedures may be assembled together. For linking of %separately assembled procedures, see below. % * BRUNNING RELOC % At the command level, X(ecute RELOC. It will respond with three %prompts: % *1) Base Address for Relocation. This is the address you wish to %use as the address of the first word in your code file. Enter it as %1...4 hexadecimal digits followed by a RETURN. % *2) Source File to be Relocated. This is the file you wish to %then the only directories that FLIPDIR can flip are on disks with %that same format. Flipping the directory on any other format of disk %requires that the disk first be translated to the proper format. %Running FLIPDIR twice on a disk will return it to its original %condition, barring a disk I/O error. During execution, the user will %be prompted "Flip directory of disk in what unit?". The answer %should be the unit number (a number in 4,5,9..12) of the drive in %whiich the disk to be fl ;RELOCATING ASSEMBLED FILES % *The utility program RELOC can be used to relocate assembled %procedures. Either one procedipped resides (or a 0, if you wish to exit %FLIPDIR immediately). The user is then prompted to insert the disk %to be flippure or a collection of procedures may %be relocated; in the case of a collection of procedures, the Linker %must also be useed and press RETURN. The directory of the disk will then %be flipped. If the disk which is being flipped is in th system disd. The output of RELOC is a file which contains no %relocation information, and must be loaded by the user or a user %progrk %drive (unit 4), then the user will be prompted to re-insert the %system disk before returning to the Operating System. am. % * 8PREPARING PROGRAMS FOR RELOCATION % *The procedures must be assembled with the UCSD Adaptable %Assembler. They  After receiving information from the prompts, RELOC reads the %entire source file, and outputs relocated procedures to the %As the Linker outputs to the output file, it will display each %procedure name on CONSOLE:. MAKE SURE that the names of all tdestination file one at a time. While running, it outputs to he %procedures you wish linked together appear on the CONSOLE: at this %stage. If a name does NOT appear, it is because the%CONSOLE: the starting and ending addresses (in hex), and the length %in bytes of each procedure. After completion, it outpu Linker skips %procedures that are not connected by a calling chain to the Host %procedure. The way to remedy this is to rets to CONSOLE: %the final address and the total number of bytes of the destination. % *The output of RELOC is a file of pureorder the list of %procedures, or put some sort of dummy (i.e., non-executed) call to %the missing procedure into the Host p code, which must be %loaded and executed directly by user software. % * 6PREPARING A COLLECTION OF PROCEDURES % rocedure, re-assemble the Host, %and redo the Linking process. %  Multiple procedures may be relocated if they have been assembled %together. If you wish to relocate a collection of procedur*When the file output by the Linker contains all the procedures %desired, it may be input to the RELOC utility. % * AIMPORes that %have been assembled separately, you must link them into a single file %with the system Linker. The Linker is calleTANT NOTE % *If you are relocating your file towards the high end of the 16- %bit address space, you must ensure that the reld by typing 'L' at the %command level. % *The Linker prompts for a Host procedure followed by a series of %Library proceduocated file will not %wrap around into low memory (i.e., + must be less than or eqres. Since you are merely trying to produce a single %file for the use of RELOC, the Host procedure may simply be the first ual to FFFFH). RELOC has no way of %checking this itself.  %relocate. You must enter the full file name (suffix included). This %file is usually a .CODE file generated by the Assemb%in the collection of procedures you wish to relocate. % *Enter the series of codefile names in response to the "LIB ler or Linker. %If the file cannot be found, RELOC will repeat the prompt. % *3) Destination File for the Relocated Code. %FILE?" prompt. When you are done, simply type RETURN (i.e., an empty %Library file name). The Linker then prompts for the This can be any %legal filename (it is NOT a .CODE file). If the file cannot be %opened, RELOC will tell you so, and then aname of a Map %file; this is purely optional. The Linker will then go to work, and %eventually prompt for an output file namebort. % *For any of these three prompts, typing RETURN only will cause %RELOC to abort (in case you change your mind). % *; any legal filename will do %(this need not be a .CODE file, since it is merely a temporary file %to be used by RELOC). % * G ˡ#-Code file overflowתP    - Bad link infoתPۓ3>`&š ۡ ōؕȡ!ۥ[ۂġ,pܥ[܂ꥁh LIBRARIA ݓÍ-צ Interface errPݡ^  ,pآ` آp [ˡ'-צError reading seg P ˡ(-צI/O error - no room on diskPj, آ ,,آ`آ`ōآ`,`آ`آ`ˡ ,  , 'Copyright (c) 1980 SofTech Microsystems-תPá  0 ˡڤšګ-צSegٚ$ȡܾۤˡ&  Bȡ(٤ to link into? P Y,ˡV-צá-٢D""P)Bš?[á $"- Read error # תPˡ#"- I/O error # תP 8-Link Code File -> תPP*צ*SYSTEM.LIBRARYP  :"-צIncompatible byte sexP -צ7Segment # to link and š P[Íx ȡ -ۢ ڤڤ  , N(ew file, Q(uit, A(bortP  c@@[5   -צ Pascal System Libra-ۢ   -ۢ    -ۢ  rian [II.0.a]P,-צOutput code file -> P  P * צ*SYSTEM.LIBRARYP á  -Code file length - תP  (  á[ ˡ#-Link info read errתP   ˡ', ,VWWȡV  ר سس-צNotice? P,O,,á !Code write error K Ɓ[ƂƁƂƁ[ƁT2 BX& d L < -צ Pascal System Librarian [II.0.a]P,-צOutput code file -> P  P * צ*SYSTEM.LIBRARYP á  ˡ', ,VWWȡV  ר سس-צNotice? P,O,,á !Code write error ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L