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2.2A >(!!:O2RK:"ȯ2Py2# >2R*"S:V<!R~*5:U< *S#"S2U>K>2Q:":#̪:"2!!:0)2*!P~6(! #ͪ:22*"":22:!>!Q~6:2*":2>_!'" !4>2* j2":= 2"ɯ2": 2~#O !N!V!^=!n=!^=!V=!f=:_^#fkv@IN7lT: :^!~( *~4 h'_!knf^VSR}2:` y :h/2h h:h*Z)>d8 :aȯ:adZ} }d !6w:b +w++N#S͎͎hhN:g > NI @II y2*:, O:*߱:ʭ:@OKh Qh}(2_Kh :ͣ(!~6: OKh Nh ?Kh : >*2)>2)>.2)>2)>2)>2)>2)>2 : >*2)>2)>.2)>2)>2)>2)> 2)>2 :)@(=:~ :)2~((2~:)/Ol(y/2)>"2)>2)>2>2  -FOG/UTL007RESOURCECOMORESOURCEDOCL DISASSEMBASzDISASSEMDOCREZ80 COM5 REZ80 DOC!TRANSLATCOM"#TRANSLATDOC$ZDT COM8%&'(ZDT DOC)DISASSEMLTR*DISK DOC +TYPER CO$-TYPER DO$<== 103H IS RESTART ADDR RESOURCE by Ward Christensen (AS OF 03/03/81) (C) Copyright 1981 Type H for help, -H to delete help $"Permission for non-commercial use and distribution of object code granted"1(# p x24262!1(ͬ!N~ ʸ=ʕ-.N;ʹ/ABCʕDʽEʻFʏ HI8KL MNO PʪQvRD S UXtZ ? S? :O ڋ2SC/R = L command 2O:2N:,S++Help has been deleted++ :OHd:H!6  I#")wG#w#<w#2*D}!&"/OxGwx># 1"##6S++Already deleted++ !N*"SY/N purge all symbols & CTL?:NYNt!O~ ʋT ,‹#>24Z ORG z%{>HT ‹*##~++~#~ *͖+###~29IgE #^#V*Q"D24SʔHBWS: INVALID CTL ENTRY ͵24[#{ʋ22~#,8 8 Ë:/o: /g#>24ZDS |%}>H"[>24ZDW **^#V*##"[[2:<24ZDB *+~#~d#F#~+Ap#~+p-pF>24#~.Z EQU ~%+~T%W>H24##~ #ͬd>26N !O~# ‡Congratulations, you found the patch area!**"!O~ Sʜ=,*"  ,‹#*:9H~ 6  r 6 %>H::2:; 0#*#":DS :E *͖::2:>,>'::<2:~~'#*#":D  :E *͖ ::<2:&  +~# ~  >'E >'[SSYMTBL=* * S"*"*" ‹*ͬ ~#}}}.~ TV>.#}hI"::##",  Ë!P~.´Dҷ*F÷*^#V#~ F#~#ͬ÷:727SNo Saddresses will priPC =* SOFFSET=* *|G SCOMNTS=* * SCTLTBL=* ~### >2;2<Q>24ZEND 24:5>Ͳp25S++ASM FILE CLOSED++ ͌:5/"e >2!.͇n .‘ *̈́ "##6:! +͇q1͇( *:5 \ :« S++TRUNCATED TO AVOID BDOS OVERLAY++  >2<2;2<2;24:22 !O~ [,O O=q" [ O,‹#" 2 ͬ: o:=}* :: :;**:NMž>A2Nê~#ž~#Ҫ+ *>Bͫ>Iͫ*|*##F>24͏#~\+ q1‹͉*̈́ "6#6 S++NO, THAT WOULD OVERLAY THE DISASSEMBLER BECAUSE OFFSET IS TOO SMALL:  ʇ ʇ ʇ s#r## ʺ ʺ w#ç pÇ  f: 0))))of ͌" .͇>2!.  r *O^#V#~#G6 V > Ͳ~Ͳ# > Ͳ> Ͳ >Ͳp:!:eD+͇/zͲzͲ{Ͳ{ò+/1%‹>2524OS++WRITING .ASM ENABLED Use Lfrom,to (or QLfrom,to for quiet) to list to disk Use Z command or E co #"6#6p*~#+<7#z+){##~ #<*ͬ^#V#z< >;F#~T#<~#<+T]##~ #~#O24*͖ښH~+ʙ-ʙ# d4>::7ʓ͊͊͏* Ú24* >24͊Q**" *#"~G!P~ʜO#~#~2=#~.*:=40 ^#V#~++ͫ~ ,‹#"> 2O !P~ ʋ">,‹#,‹#"B"@*B~#~,‹#*>ͽ*>">~#,j ‹*@*>}|ͬg͖+ڸ###Ѿ2=͖ :=ZK‹G !~#+<w#+++IW # #"_!* BENW`lþ%TZ`t͊͊͊͊ͅo͊* #" * ~ ڢ[Ң:=ڢҢ~>'͊͏~ ڳ%>H0͊* ~͔͖ͅ:<4:7͊͏z>0 zBSEH:=Kʋ‹*~###<###*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͢ڪÓO͢ʪڪÓ͢ڪ^#Uͬ:*N>2*~O++!OÓw# w#w# 0/)/ ???ASMCOMC#~ bG!e~# 7~7~~# G~ GGS Use ^S to stop/start help, C/R to quit A symbol is always preceeded by a ".": .BDOS A hex number has no "H": 5C All numbers default to hex. Use |}> ~09 +- , ~#+9-F+Tz/W{/_~#ʴ.ʸ$@~*0ڋ:ڇAڋGҋ0))))o#l~*0ڋ:ҋbk)))0_|W#Õ>22Dڋ^#V*#~!"H2|\ are typed by you. ---> RESOURCE ---> o2200 set the offset to 2200, which means the program will read into 2200 + 100 = 2300. ---> rtest.com reads the com file into memory. system says: 2500 read .com, .ctl, .sym, or .doc file - rfilename.com reads in at offset+100h rfilename.ctl loads the ctl table rfilename.sym loads the sym file rfilename.doc loads the comments table (note 'u' command must have been issued) ---------------- s0300 which is the actual hi load addr, (2500) and the original hi load addr (300) REMEMBER this address (300) because you might want to put a "E" (end of assembly) control entry there. <<<>>> that all 'L' (disassembly list) and 'D' (ave .asm, .ctl, .sym, or .doc file - sfilename.asm use 'l' command to write, z to end sfilename.CTL saves the CTL table stablename.sym saves the sym file sfilename.doc saves the comments table ---------------- use area of memory for comments tabdump) commands work with the offset added. Thus, you should learn to forget that the disassembler is in memory, and think of it as if your program were actually at 100. D100 will dump your program. also note: if the program being "RESOURCEd  " will have a fairly large symbol table, then you will have to set the offset higher: o2f00 or some such. (the ? command will show symbol table usage: if your symbol table is nearing the .com file, then just set a new offset (higher) and re-load s put in the control table by the a command, but then immediately put in the right address, such as via cnnnn,i if you wanted to scan the program for ascii db's yourself, use the 'c' (control) command to set the beginning and end of ascii areas. Fthe .com) if you want to dump r-e-a-l memory, you would have to reset the offset to 0: o0 (but don't forget to reset it to 1f00 before continuing with your program.) If you are disassembling something which is in memory at it's correct addressor example, a program which starts out: 0100 jmp start 0103 db 'copyright .....' 0117 start ..... would show up in the dump as: 0100 c3170144 4f50xxxx xxxxxxxx xxxxxxxx *...copyr ight....* 0110 xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx *xxxxx (such as looking at ccp) then don't set the offset. It defaults to 0 when dis is first loaded. ---> l100 list your program - lists "about" 10 lines. ---> d100 do a dump of your program. NOTE that typically here are the steps to disassembling xxx ........* thus you would want to instruct the disassembler to switch to db mode at 103, and back to instruction mode at 117, thus: c103,b c117,i Continue doing this, bracketing every ascii db which is in the middle of instructions, by a ba program which has just been read into memory: Use the dump command to find the ASCII DB areas. Note that the 'a' command may be used to automatically find the db's, but you must then check them to insure that they don't extend too far. All print control instruction and an i control instruction. Note that multiple db's in a row need not have separate cnnnn,b instructions, but that these do cause a 'line break', i.e. if you have a table of ascii commands, for example: 02e5 db 'load' 02e9 dable characters, 0dh, 0ah, and 00h are considered candidates for ascii db's. At least 8 characters in a row must be found to make sure that long sequences of mov instructions won't be taken as db's. Use the cnnnn,k command to kill erronious entrieb 'save' the disassembler would disassemble these as: 02e4 db 'loadsave' you could put in an additional control entry: c2e9,b, which would cause the disassembler to generate: 02e4 db 'load' 02e8 db 'save' which is much more readable and real  istic. Note that before generating each byte of a db, a symbol table lookup is done to determine if there is a label at that location, and if so, a new line is started. Thus if 'loadlit' and 'savelit' were in the symbol table, as the labels on thelist your program to determine how it looks. when you recognize a routine by it's function, insert a label. For example, if you saw that location 7ef was a character out routine (type) then enter a label into the symbol table: E7EF,.TYPE NOTE tha 'load' and 'save' above, no separate 'b' control instruction would be required as the label would cause the break. <<<>>> that at this time the automatic label checking is n-o-t done for ds instructions. Make sure that each ds instrucion reft all symbols start with a '.', so as to be dis- tinguished from hex data. NOTE that if you want the disassembler to make default labels for you, use b (for build labels) instead of l (for list program). The b commands causes lnnnn default labels toerences only up to the next label. This means that multiple ds's in a row must each be explicitly entered into the control table. Presence of a label is not sufficient. ---- steps, continued: After building the control entries with cnnnn,b and be inserted in the symbol table for every 2 byte operand encountered (LXI, SHLD, JMP, etc). It will undoubtedly make some you don't want, such as L0000. You will have to: K.L0000 kill label L0000 from the table. When you encounter data refere cnnnn,i put in a control entry cnnnn,e which defines the address of the end of your program. The l command will then automatically stop there, and in addition, if you are in 'save xxx.asm' mode, the output .asm file will be closed. If you do mot dence instructions, try to determine what type of area the instruction points to. Typically,, LXI instructions may point to a work area which should be defined as a DS, or to an ASCII string, in which case we will have already made it a 'b' control instfine a control 'e' entry, then you will have to use the break facility to stop the l command (don't use control-c as that will re-boot cp/m). If you were writing an .asm file, you would have to user the z command to close the file. Next, you would ruction. Operands of LHLD and SHLD instructions should be made DW instructions. For example if you encounter LHLD 0534H, then issue a control instruction: C534,W NOTE that whatever mode you are last in will remain in effect. Therefore if 534,w   is the last entry in the control table, all data from there on will be taken to be DW's. Suppose that you determine that address 7cf is a 128 byte buffer for disk I/O. You want it to disassemble to: DKBUF ;07CF DS 80H You do this as follow to save a .asm file out to disk, do the following: Make sure that there is a control entry defining the end of the program (such as c200,e) or else you will have to specify the ending address and manually type a z command to close the file. ss: C7CF,S to start the DS C84F,B to define it's end, and E7CF,.DKBUF to put the symbol in the table. Continue, iteratively using the 'l' command and the 'c' and 'e' commands until you have the listing in a nice format. You will then probablfilename.asm A message will indicate that the file is opened. Any subsequent a, b, or l command will have whatever is listed written to disk. Encountering a 'e' control, or typing a z command will then close the .asm file. The listing may be intey want to save the control symbol, and comments tables. Or, you could have been saving them at checkpoint times (so if you make a major mistake you could go back to a previous one). To save a control file: sfilename.CTL (any filename, may includrrupted, and continued. Since the l command types only 10 lines, use laddr,ffff to list thru the end of the assembly. If this is the 'final' save of the .asm file, you will probably want to put an 'org' at the beginning of the output file, as well e a: or b:) To save a symbol file: sfilename.sym To save a comments file: sfilename.doc (not ".com" of course) NOTE that the filetypes must be used as shown, but that any legal filename (or disk:filename such as b:xxxx.CTL) may be used. as generate equ instructions for any references outside of the program. For example, a typical cp/m program will have references to: bdos at 5 fcb at 5ch tbuff at 80h the 'p' (for prologue) command generates the org, then scans the symbol tabl You could now control-c to return to CP/M, and come back later to resume your disassembly: RESOURCE o2200 rtemp.com rtemp.sym rtemp.ctl uxxxx (such as u4000) rtemp.doc This will take you back exactly where you left off. If you wante and generates equates: BDOS EQU 05H FCB EQU 05CH (etc.) If you have a "e" control entry in your file, you can list as follows: laddr,ffff - the listing will continue until the "e" control entry is found additional commands: if you ent  ered a label in the symbol table but now want to get rid of it: k.symbol note to rename a symbol, such as when you had a system- assigned lnnnn label but now want to make it meaningful: k.l0334 e334,.type you could even: e.l0334,.type kH from xxxx on Daaaa,bbbb Dumps from aaaa thru bbbb D,bbbb Dump thru bbbb D Dump 80H more D=nn nn= Hex dump size default. Ds Dumps the symbol table. Ds.symbol Sym dump starting at .symbol Ennnn,.symbol Enter symbol into table Fnnnn,ssss .l0334 but that takes more typing. here are some more commands: ? prints statistics on symbol and control table usage, etc. c prints the entire control table cnnnn prints the control table starting at address nnnn ds dumps t Find address nnnn starting at ssss F Continue previous find command Fnnnn Find nnnn K.symbol Kill symbol from symbol table L Lists 10 lines from prev pc Lssss,eeee Lists from ssss to eeee L,eeee Lists from current pc to eeee Lssss Listshe symbol table. Interrupt it by typing any key. ds.symbol starts dumping at the specified symbol, or the nearest symbol. thus "ds.f" starts the dump at the first label starting with the letter 'f'. ....have fun, and let me know of any 10 lines at ssss L=nn nn is hex list default # of lines O Print current offset Onnnn Establish new offset Pstart addr,end addr Generate program prolog Q Before any command suppresses console output: QB100,200 Rfilename.COM Reads in at o problems or suggested improvements ------------------------ RESOURCE "Quick" command summary Any address may be replaced by .symbol i.e. D.START ;addr,comment Enter a comment ;addr Lists existing comment ; Lists entire comments tabffset+100h Rfilename.CTL Loads the ctl table Rfilename.SYM Loads the sym file Rfilename.DOC Loads the comments table (note Sfilename.ASM Save .ASM file. Write w/L, Z to end Sfilename.CTL Saves the CTL table Sfilename.SYM Saves the sym file Sfle ;addr, Deletes existing comment A(see "L" for operands) Attempt to find DB's B(see "L" for operands) Build default sym tbl (Lxxxx) C Dump ctl tbl Cnnnn Dump ctl starting at nnnn Cnnnn,x Define format from nnnn (B,E,I,S,W) Dxxxx Dumps 80ilename.DOS Saves the comments table Unnnn Use nnnn for comments table X Purge all symbols and control Z Write eof to .ASM file ( ? Prints statistics (sym, ctl, comments)   $(MID$(S$,I,1)): NEXT I 10260 N=INSTR(FILE$,".") 10270 IF N THEN FLNAME$=LEFT$(FILE$,N-1) ELSE FLNAME$=FILE$ 10280 IF N=0 THEN FILE$=FILE$+".COM" 10290 FILEERR=FALSE 10300 OPEN "I",#1,FILE$ 10310 IF FILEERR THEN 10230 10320 CLOSE#1 10330 OPEN "R",#1,FILE$,RECLN 10340 FIELD#1,128 AS INREC$ 10350 LINE INPUT "Address of start of file? ",S$ 10360 IF S$="" THEN ASTRT!=&H100 10370 IF S$<>"" THEN GOSUB 14450: ASTRT!=T!: IF BAD THEN 10350 10380 LINE INPUT "Start address? ",S$ 10390 IF S$="" THEN T!=AS10000 ' Z-80 Dissassembler 10010 ' Based on disassembler on page 42 10020 ' of Dr. Dobbs Journal number 26 10030 ' 10040 DEFINT A-Z 10050 ' 10060 ' Convert letter to upper case 10070 DEF FNUPPER$(CC$)=CHR$(ASC(CC$)+(CC$>="a" AND CC$<="z")*32) 10080TRT! 10400 IF S$<>"" THEN GOSUB 14450: IF BAD THEN 10380 10410 IF T!"Y" THEN 10710 10620 FILE$=FLNAME$+".C  TL" 10630 FILEERR=FALSE 10640 OPEN "I",#3,FILE$ 10650 IF NOT FILEERR THEN 10690 10660 INPUT "Continue without control file? ",C$ 10670 IF C$="" THEN 10210 10680 IF FNUPPER$(C$)<>"Y" THEN 10210 ELSE 10740 10690 DL!=-1: DH!=-1 10700 ' 10710 PRINT: P 11070 IF ENDFILE AND NOT NB THEN 11300 11080 IF NOT BADOP THEN 11140 11090 FOR NB=NB TO 1 STEP -1 11100 NBB=NBB+1: BB(NBB)=B(NB): PC!=PC!-1 11110 NEXT NB 11120 BADOP=FALSE: GOSUB 11410 11130 IF BADOP THEN 11300 11140 TB=32: GOSUB 14590: DLINE$=DRINT 10720 ' 10730 ' initialize input file 10740 N=INT((PC!-ASTRT!)/RECLN): RECPT=PC!-ASTRT!-RECLN*N 10750 GET#1,N+1 10760 IF EOF(1) THEN 11380 10770 ENDFILE=FALSE: NBB=0 10780 ' 10790 ' put org statement 10800 DLINE$=SPACE$(7)+"ORG"+SPACE$(5) 10LINE$+";" 11150 X!=HOLDPC!: GOSUB 12630: DLINE$=DLINE$+" " 11160 FOR I=1 TO NB 11170 X!=B(I) 11180 DLINE$=DLINE$+" " 11190 GOSUB 12480 11200 NEXT I 11210 TB=52: GOSUB 14590 11220 FOR I=1 TO NB 11230 C$=".": IF B(I)>=32 AND B(I)<127 THEN C$810 X!=PC! 10820 GOSUB 12600 10830 GOSUB 11340 10840 ' 10850 ' Main loop 10860 NB=0: BADOP=FALSE 10870 WHILE PC!>DH! 10880 IF EOF(3) THEN DL!=1E+10: DH!=1E+10: GOTO 11010 10890 LINE INPUT#3,DLINE$ 10900 C$=DLINE$: GOSUB 14820 10910 I=INST=CHR$(B(I)) 11240 IF B(I)>=160 AND B(I)<255 THEN C$=CHR$(B(I)) 11250 DLINE$=DLINE$+C$ 11260 NEXT I 11270 GOSUB 11340 11280 IF PC!=DL! THEN 11120 11040 DLINE$=SPACE$(7) 11050 GOSUB 12310: OP=X! 11060 GOSUB 114901440 ' 11450 ' Separate parts of op code 11460 L=OP\BIT(6): M=OP\BIT(3) AND 7: K=OP AND 7: RETURN 11470 ' 11480 ' Disassemble one op 11490 GOSUB 11460: ON L GOTO 11890,11950,11970 11500 ON K GOTO 11580,11660,11740,11800,11800,11840,11880 11510 IF M=  1 THEN S$="EX AF,AF'" 11520 IF M=0 THEN S$="NOP" 11530 IF M=1 OR M=0 THEN 12690 11540 S$=JR$(M): GOSUB 12690: GOSUB 12770 11550 GOSUB 12310: IF X!>127 THEN X!=X!-256 11560 X!=PC!+X!: GOSUB 12600: RETURN 11570 ' 11580 K=M\BIT(1) 11590 IF OP AND BIT(0 11960 GOSUB 12770: GOTO 11930 11970 ON K GOTO 12000,12010,12080,12020,12180,12260,12280 11980 S$="RET ": GOSUB 12690 11990 S$=CC$(M): GOTO 12690 12000 S$=C1$(M): GOTO 12690 12010 S$="JP ": GOTO 12030 12020 S$="CALL ": 12030 GOSUB 12690 12040 S$=3) THEN 11640 11600 S$="LD ": GOSUB 12690: 11610 S$=RP$(K): GOSUB 12690 11620 S$=",": GOSUB 12690 11630 GOSUB 12540: RETURN 11640 S$="ADD HL,": GOSUB 12690 11650 S$=RP$(K): GOTO 12690 11660 S$=O2$(M): GOSUB 12690 11670 IF M<4 THEN RETURN 11680 GOSCC$(M): GOSUB 12690 12050 S$=",": GOSUB 12690 12060 GOSUB 12540 12070 RETURN 12080 IF M=1 THEN 12790 12090 S$=C3$(M): IF S$="???" THEN BADOP=TRUE: RETURN 12100 GOSUB 12690 12110 IF M=0 THEN 12140 12120 IF M=2 OR M=3 THEN 12150 12130 RETURN 12140 UB 12770: GOSUB 12510: GOSUB 12570 11690 IF M=4 THEN S$=",HL": GOSUB 12690 11700 IF M=6 THEN S$=",A": GOSUB 12690 11710 RETURN 11720 GOSUB 12540: RETURN 11730 ' 11740 K=M\BIT(1) 11750 M=M AND BIT(0) 11760 IF M=0 THEN S$="INC " 11770 IF M=1 THEN S$GOSUB 12770:GOSUB 12540: RETURN 12150 GOSUB 12770: GOSUB 12310: GOSUB 12420 12160 IF M=2 THEN S$=",A": GOSUB 12690 12170 RETURN 12180 IF M=5 THEN 12900 12190 IF M=3 THEN I$="IX" 12200 IF M=7 THEN I$="IY" 12210 IF M=3 OR M=7 THEN 13320 12220 S$=C5$(="DEC " 11780 GOSUB 12690 11790 S$=RP$(K): GOTO 12690 11800 IF K=4 THEN S$="INC " 11810 IF K=5 THEN S$="DEC " 11820 GOSUB 12690 11830 S$=REG$(M): GOTO 12690 11840 S$="LD ": GOSUB 12690 11850 S$=REG$(M): GOSUB 12690 11860 S$=",": GOSUB 12690 11870M): IF S$="???" THEN BADOP=TRUE: RETURN 12230 GOSUB 12690 12240 IF M<>1 THEN RETURN 12250 GOSUB 12770: GOSUB 12540: RETURN 12260 S$=AI$(M): GOSUB 12690: GOSUB 12770 12270 GOSUB 12490: RETURN 12280 S$="RST ": GOSUB 12690 12290 X!=8*M: GOSUB 12450 12 GOSUB 12490: RETURN 11880 S$=O7$(M): GOTO 12690 11890 IF M=6 AND K=6 THEN 11940 11900 S$="LD ": GOSUB 12690 11910 S$=REG$(M): GOSUB 12690 11920 S$=",": GOSUB 12690 11930 S$=REG$(K): GOTO 12690 11940 S$="HLT": GOTO 12690 11950 S$=AI$(M): GOSUB 1269300 RETURN 12310 IF NBB THEN X!=BB(NBB): NBB=NBB-1: PC!=PC!+1: RETURN 12320 IF ENDFILE THEN BADOP=TRUE: X!=0: RETURN 12330 RECPT=RECPT+1: IF RECPT<=RECLN THEN 12370 12340 GET#1 12350 IF EOF(1) THEN X!=0: ENDFILE=TRUE: RETURN 12360 RECPT=1 12370 X!=A  SC(MID$(INREC$,RECPT,1)): PC!=PC!+1 12380 NB=NB+1: B(NB)=X! 12390 RETURN 12400 ' 12410 ' Insert (1 byte hex) 12420 DLINE$=DLINE$+"(": GOSUB 12450: DLINE$=DLINE$+")": RETURN 12430 ' 12440 ' Insert a 1 byte hex constant in assembly 12450 DLINE$=DLINE! 12800 L=OP\BIT(6) 12810 M=(OP\BIT(3)) AND 7 12820 K=OP AND 7 12830 IF L=0 THEN 12870 12840 S$=CB$(L): GOSUB 12690: GOSUB 12770 12850 S$=CHR$(48+M): GOSUB 12690: S$=",": GOSUB 12690 12860 S$=REG$(K): GOTO 12690 12870 S$=RT$(M): IF S$="???" THEN BA$+"0": GOSUB 12480: DLINE$=DLINE$+"H": RETURN 12460 ' 12470 ' Insert a one byte hex number 12480 DLINE$=DLINE$+RIGHT$("0"+HEX$(X!),2): RETURN 12490 GOSUB 12310: GOSUB 12450: RETURN 12500 ' 12510 GOSUB 12310: XL=X! 12520 GOSUB 12310: XH=X! 12530 X!=DOP=TRUE: RETURN 12880 GOSUB 12690 12890 S$=REG$(K): GOTO 12690 12900 GOSUB 12310: OP=X! 12910 L=OP\BIT(6): M=(OP\BIT(3)) AND 7: K=OP AND 7 12920 ON L GOTO 12940,13300,12930 12930 BADOP=TRUE: RETURN 12940 ON K GOTO 12970,12990,13040,13150,13180,1323XL+256*XH: RETURN 12540 GOSUB 12510: GOSUB 12600: RETURN 12550 ' 12560 ' Insert (hex) 12570 DLINE$=DLINE$+"(": GOSUB 12600: DLINE$=DLINE$+")": RETURN 12580 ' 12590 ' Insert a 2 byte hex constant in assembly 12600 DLINE$=DLINE$+"0": GOSUB 12630: DLIN0,13280 12950 S$="IN": GOSUB 12690 12960 S$=REG$(M): GOSUB 12690: S$=",(C)": GOTO 12690 12970 S$="OUT (C),": GOSUB 12690 12980 S$=REG$(M): GOTO 12690 12990 K=M\BIT(1): M=M AND BIT(0) 13000 IF M=1 THEN S$="ADC HL," 13010 IF M=0 THEN S$="SBC HL," 130E$=DLINE$+"H": RETURN 12610 ' 12620 ' Insert a 2 byte hex number 12630 DLINE$=DLINE$+RIGHT$("000"+HEX$(X!),4): RETURN 12640 ' 12650 ' Insert (alpha) 12660 DLINE$=DLINE$+"(": GOSUB 12690: DLINE$=DLINE$+")": RETURN 12670 ' 12680 ' Add code to line 120 GOSUB 12690 13030 S$=RP$(K): GOTO 12690 13040 K=M\BIT(1): M=M AND BIT(0) 13050 S$="LD ": GOSUB 12690 13060 IF M=1 THEN 13110 13070 GOSUB 12510: GOSUB 12570 13080 S$=",": GOSUB 12690 13090 S$=RP$(K): GOSUB 12690 13100 RETURN 13110 S$=RP$(K): GOS2690 FOR I=1 TO LEN(S$) 12700 C$=MID$(S$,I,1) 12710 IF C$=" " THEN GOSUB 12770: GOTO 12730 12720 DLINE$=DLINE$+C$ 12730 NEXT I 12740 RETURN 12750 ' 12760 ' Start operand field 12770 TB=16: GOSUB 14590: RETURN 12780 ' 12790 GOSUB 12310: OP=XUB 12690 13120 S$=",": GOSUB 12690 13130 GOSUB 12510: GOSUB 12570 13140 RETURN 13150 IF M=0 THEN 13170 13160 BADOP=TRUE: RETURN 13170 S$="NEG": GOTO 12690 13180 IF M<=1 THEN 13200 13190 GOTO 13160 13200 IF M=1 THEN S$="RETI" 13210 IF M=0 THEN S$=  "RETN" 13220 GOTO 12690 13230 IF M=1 OR M>3 THEN BADOP=TRUE: RETURN 13240 IF M=0 THEN S$="IM0" 13250 IF M=2 THEN S$="IM1" 13260 IF M=3 THEN S$="IM2" 13270 GOTO 12690 13280 S$=ED$(M): IF S$="???" THEN BADOP=TRUE: RETURN 13290 GOTO 12690 13300 S$=CP90 S$="(": GOSUB 12690: S$=I$: GOSUB 12690 13600 S$="+": GOSUB 12690: GOSUB 12310: GOSUB 12450 13610 S$=")": GOTO 12690 13620 IF M<>6 THEN 13380 13630 S$="LD ": GOSUB 13580: S$=",": GOSUB 12690 13640 GOSUB 12310: GOSUB 12450: RETURN 13650 S$="LD " 1$(K)+CP$(M): IF S$="OUTIR" THEN S$="OTIR 13310 GOTO 12690 13320 GOSUB 12310: OP=X! 13330 IF OP=203 THEN 13870 13340 L=OP\BIT(6): M=(OP\BIT(3)) AND 7 13350 K=OP AND 7 13360 ON L GOTO 13650,13710,13740 13370 ON K GOTO 13390,13480,13530,13560,13560,1363660 IF K=6 THEN 13690 13670 GOSUB 13580: S$=",": GOSUB 12690 13680 S$=REG$(K): GOTO 12690 13690 GOSUB 12690: S$=REG$(M): GOSUB 12690: S$="," 13700 GOSUB 13580:RETURN 13710 IF K<>6 THEN 13730 13720 S$=AI$(M): GOSUB 13580: RETURN 13730 BADOP=TRUE: RE20 13380 S$="==": GOTO 12690 13390 IF M=4 THEN 13460 13400 K=M\BIT(1): M=M AND BIT(0) 13410 S$="ADD ": GOSUB 12690: S$=I$: GOSUB 12690 13420 S$=",": GOSUB 12690 13430 IF K=2 THEN 13450 13440 S$=RP$(K): GOTO 12690 13450 S$=I$: GOTO 12690 13460 S$="TURN 13740 IF M<>4 THEN 13820 13750 ON K GOTO 13770,13760,13780,13760,13800,13760,13760 13760 BADOP=TRUE: RETURN 13770 S$="POP ": GOTO 13810 13780 S$="EX (SP),": GOTO 13810 13790 S$="LD SP,": GOTO 13810 13800 S$="PUSH " 13810 GOSUB 12690: S$=I$: GOLD ": GOSUB 12690: S$=I$: GOSUB 12690 13470 S$=",": GOSUB 12690: GOSUB 12510: GOSUB 12600: RETURN 13480 IF M=4 THEN 13510 13490 S$="LD ": GOSUB 12690: S$=I$: GOSUB 12690 13500 S$=",": GOSUB 12690: GOSUB 12510: GOSUB 12570: RETURN 13510 S$="LD ": GOSUBTO 12690 13820 IF M<>5 THEN 13860 13830 IF K<>1 THEN 13760 13840 S$="JP ": S$="(" GOSUB 12690: 13850 S$=D$: GOSUB 12690: S$=")": GOSUB 12690: RETURN 13860 IF M=7 AND K=1 THEN 13790 13870 GOSUB 12310: D=X! 13880 GOSUB 12310: OP=X! 13890 GOSUB 11460  12690: GOSUB 12510: GOSUB 12570: S$=",": GOSUB 12690 13520 S$=I$: GOTO 12690 13530 IF M=4 THEN S$="INC " 13540 IF M=5 THEN S$="DEC " 13550 GOSUB 12690: S$=I$: GOTO 12690 13560 IF K=4 THEN S$="INC " 13570 IF K=5 THEN S$="DEC " 13580 GOSUB 12690 135 13900 IF L>0 THEN 13960 13910 IF K<>6 THEN 13760 13920 S$=RT$(M): IF S$="???" THEN BADOP=TRUE: RETURN 13930 GOSUB 12760: GOSUB 12690: GOSUB 12770 13940 S$="("+I$+"+": GOSUB 12690 13950 X!=D: GOSUB 12450: S$=")": GOSUB 12690: RETURN 13960 S$=CB$(L):   GOSUB 12690 13970 S$=CHR$(48+M): GOSUB 12690 13980 S$=",": GOSUB 12690: GOTO 13940 13990 ' 14000 ' initialize tables 14010 FOR I=0 TO 7: READ BIT(I): NEXT I 14020 DATA 1,2,4,8,16,32,64,128 14030 FOR I=0 TO 7: READ REG$(I): NEXT I 14040 DATA B,C,D,ERA,???,SRL 14290 FOR I=0 TO 7: READ ED$(I): NEXT I 14300 DATA "LD I,A","LD R,A" 14310 DATA "LD A,I","LD A,R",RRD,RLD,???,??? 14320 FOR I=0 TO 7: READ CP$(I): NEXT I 14330 DATA LD,CP,IN,OUT,I,D,IR,DR 14340 TRUE=-1: FALSE=0: RETURN 14350 TS=2: TD=3: K,H,L,(HL),A 14050 FOR I=0 TO 3: READ RP$(I): NEXT I 14060 DATA BC,DE,HL,SP 14070 FOR I=0 TO 7: READ AI$(I): NEXT I 14080 DATA ADD,"ADC A,",SUB,"SBC A,",AND,XOR,OR,CP 14090 FOR I=2 TO 7: READ JR$(I): NEXT I 14100 DATA DJNZ,JR,"JR NZ,","JR Z,","JR NC,"B=2: SB=2 14360 BS$=CHR$(8) 14370 HT$=CHR$(9) 14380 ES$=CHR$(27) 14390 CS$=CHR$(26)+ES$+"S"+CHR$(0)+CHR$(32) 14400 EL$=ES$+"R" 14410 CR$=CHR$(13) 14420 RETURN 14430 ' 14440 ' Convert input hex 14450 IF LEN(S$)=0 OR LEN(S$)>4 THEN BAD = -1: RETURN,"JR C," 14110 FOR I=0 TO 7: READ CC$(I): NEXT I 14120 DATA NZ,Z,NC,C,PO,PE,P,M 14130 FOR I=0 TO 7: READ C1$(I): NEXT I 14140 DATA POP BC,RET,POP DE,EXX,POP HL,JP (HL),POP AF,"LD SP,HL" 14150 FOR I=0 TO 7: READ C3$(I): NEXT I 14160 DATA JP,???,OUT,"I 14460 T!=0 14470 FOR II=1 TO LEN(S$) 14480 CC$=MID$(S$,II,1) 14490 IF CC$>="0" AND CC$<="9" THEN D=ASC(CC$)-ASC("0"): GOTO 14530 14500 IF CC$>="A" AND CC$<="F" THEN D=10+ASC(CC$)-ASC("A"): GOTO 14530 14510 IF CC$>="a" AND CC$<="f" THEN D=10+N A,","EX (SP),HL","EX DE,HL",DI,EI 14170 FOR I=0 TO 7: READ C5$(I): NEXT I 14180 DATA PUSH BC,CALL,PUSH DE,???,PUSH HL,???,PUSH AF,??? 14190 FOR I=0 TO 7: READ O7$(I): NEXT I 14200 DATA RLCA,RRCA,RLA,RRA,DAA,CPL,SCF,CCF 14210 FOR I=0 TO 7: READ O2$(IASC(CC$)-ASC("a"): GOTO 14530 14520 BAD=-1: RETURN 14530 T!=D+16*T! 14540 NEXT II 14550 BAD=0 14560 RETURN 14570 ' 14580 ' Tab line to field 14590 IF LEN(DLINE$)80 THEN 14740 14730 IF BCNT THEN IF TS(POSN) T  HEN DLINE$=DLINE$+HT$: BCNT=0 14740 C$=MID$(S$,II,1) 14750 IF C$=" " THEN BCNT=BCNT+1: GOTO 14780 14760 DLINE$=DLINE$+SPACE$(BCNT)+C$ 14770 BCNT=0 14780 NEXT II 14790 RETURN 14800 ' 14810 ' Remove leading blanks 14820 FOR II=1 TO LEN(C$) 14830 IF MID$(C$,II,1)<>" " THEN C$=RIGHT$(C$,LEN(C$)-II+1): RETURN 14840 NEXT II 14850 C$="" 14860 RETURN 14870 ' 14880 ' Error on ctl file 14890 PRINT "Invalid ctl record:" 14900 PRINT DLINE$ 14910 PRINT 14920 RETURN 14930 ' 14940 ' error ha.po 0 .he DISASSEM - Z80 disassembler page # .op Description. DISASSE͠ i Z8 disassemble writte i BASIC Microsof versio 5. i required Th inpu t DISASSE i memor imag file usuall CO file Thndling 14950 IF ERR<>53 THEN 14990 14960 FILEERR=TRUE 14970 PRINT "File not found" 14980 RESUME NEXT 14990 IF ERR<>64 THEN 15030 15000 FILEERR=TRUE 15010 PRINT "Invalid file name" 15020 RESUME NEXT 15030 ON ERROR GOTO 0  outpu ma b directe t file th console o th printer DISASSE generate standar Zilo mnemonics. Using DISASSEM. On start up, DISASSEM will answer the following questions: File name? Ente th fil tha i t b disassembled Th defaul extensio i COM Ente retur t terminate. Address of start of file? Ente th addres o th firs byt i th file Th defaul valu o 0100 i use i retur i entered Th default is almost always used. Start address? Ente th firs addres t b disassembled Th defaul i th star o th file. End address? Ente th las addres t b disassembled Th defaul i the end o  f the file. Output file( *=LST, **=CON)? Ente th desire outpu fil name Th defaul i th sam nam a th fil bein disassemble wit a extensio o ASM I th defaul i used th fil wil b o th sam of the listing. Notes. Fil name ma hav driv specifiers I n driv i specified the cpm specified default drive is used. Th outpu fil i quit larg fo an bu ver smal programs Th siz depends o course o jus wha indriv a th input Ente "* t pu th listin o th printe o "** t pu i o th console. DEFB Control file (Y or N)? Ente "y i ther i contro fil t forc certai location t b disassemble a dstruction ar i th program, but 20-30k/program k is typical. Th堠 disassemble i ver slo whe ru usin th MBASI interpretter I ha no bee teste o th compiler bu ther should be little trouble getting it to compile propef pseud ops Thi fil mus b o th sam driv a th inpu an mus hav th sam nam wit a extensio o CTL Th contro fil consist o asci record eac containin tw hexadecima number (1- digierly. All input may be in either upper or lower case. End of document. MBASI interpretter I ha no bee teste o th compiler bu ther should be little trouble getting it to compile propts) Th number mus b separate b on o mor spaces Al addresse betwee thes number (inclusive) will be disassembled as defb pseudo ops. Output. Th disassemble listin contain tab i th outpu i t disk  Otherwise n tab ar generated Eac lin contain commen containin th address an th value o th byte disassemble i bot he an character Contro character ar printe a ".". An org statement is generated at the start   Q w!X~.#r͘&*K&!"^#V#~wF#~#6 Ϳ&* w!W~ H "w:F+ 2\2h!W:X :“:W@2\##]͡͡~ ʾ#.ʾ¡~ .#ó> ¾>2O2P>2P2P2O2E:32425!W~ *, =("# * ,#"%25Ϳ:5>:4=wL*%:#:$w:Oʆ*#*~چ#]~#i+|*#>B͞ >I͞ *)|*#͇ ##F>2Eʽ#~\¶ Û¨ *#Q +###~IEʉ#^#V*#ʹ"H2ESHBʩW{BRESOURCE by Ward Christensen (AS OF 01/08/80) $Copyright 1980 !9"1w Memory open to *+  ͌2E2G1E!V~ w;2 ABC{ D,EFK3LOTP+QRS, UwXZʉ?ʓ2E2Gw? wwY/N pw: INVALID CTL ENTRY w2E*#{23~#,  w:#/o:$/g#>2E~.BLKB |͐}ͼ>H "#*>2E~.WORD *#*^#Vn*###"#* *2J<2E~.BYTE *#*~  "͐>H:J2J0#*##"#:H:Iurge all symbols & CTL?E:VYtNw!W~  A,#>2E~ .LOC z͐{ͼ>H  !"##~w++~#~ڌ+~#~#F#~+A#~+-™F>2E#~°~ = ~Đ+~ͼ>H 2E##~͋#Ϳr>2GV!W~# ʍ*#ң:J2Jң>,û>':J<2J~~'#*##"#:HP:Iʈ*#҈:J<2J#Ҁu+~# ʈ~ ڀ/>'>' *wSYMTBL=!"*! wPC =*# wOFFSET=* *)|wCOMNTS=*)*+ wCTLTBLCongratulations, you found the patch area!**1"!W~ ʋS =,]*1" v l,#"*"*" *Ϳ|~ͼ#}}}~ >.#}ø "::Ҏw##"1,Q =!~###<+++ w!W~ S"/*"- S C,# *"-*/Ϳ*-~#"-W~W|+W:/_: /Wʹ>2E~.END 2E:Fw>ͧ2Fw++ASM FILE CLOSED++ wl:F+ !e?͵!" "!##6Ó!e9͵  G *|z \/  | w!e<͵X !eB͵ *) "+6#6Ów++NO, THAT WOULD OVERLAY THE DISASSEMBLER BECAUSE OFFSET IS TOO SMALL: H>  s#r##> w# w++COMMAND IGNORED++ ++Issue 'UNNNN' to tell RESOURCE to use address NNNN as the start of the comments table w!W~ .|ڝ")"+6#6ww++NO!! <2300H! w>2E*#H~+-# ͟>:*# 2Ep  b : 0))))o>b  l:F+ !e?͵š !"͆^#V#~#Gs ~ > ~#] > > J >ͧwzͬzͰ{ͬ{Ͱ!e<͵ʼ !eB͵ !e6͵>2F2E͆w++WRITING .ASM ENABLED USE Z COMMAND OR E CO*#>2Eʹ2*#*"'#"#F!~O#~0#~2Q#~S:U.E*#:Q?x x#u#"#_!*'͌-*##"#Zú<Tar~ÍÜ v l ? lNTROL TO CLOSE FILE++ w *+##6*)G w++NO FILE ACCESSES PERMITTED UNTIL .ASM CLOSED ww++UNEXPECTED EOF w!W~ s  m ʖ ,#~Ͱ wQ +ګ ###Ѿ2QQ :QIM WM BM SM EM K!~#+< w# +++:QK*'#:#"'*'~ A[A:QAA~+>'~ R͐>H 0 *'~?*'#^#V҄:Pʍ:Í͟z>0ʣzʩ͐{ͼ>H { ڵ͐á0ãgú *'~0 *'~l~M|g#"'F!ÆE B W I S!~###: >,~ #v ͆!^#V#z< ~ >,~> > # >ͧw!>>X>Y2#~(͌͌#~2#F"'!Æ"'͌#~2G!]Æ#~͌*#_On~<~0: :glv ~:>M#~:g>-|/1|. , g>0|0!ß>,> >;* , : 0))))o> s#r#>w# 6#6 !W~ ʫ # ʥ Q ,͇ c ~ w*+s#r##w n #"+6#6pw*)~#+<7#z+› {##~͋#Ê ͇ î *)Ϳ^#V#z;F#~ #î ~#<+T]##~͋#~#O2Q*'~!͋~#~.>''*'~z~dd>S>P~PSW*'~z*'~!͋~Mʣo$ڼ>0ü~#ŸNZZ.NCC.POPEP.M.BCDEHLMA ..... ...............ACI..ADC..ADD..ADI.  .ANA..ANI..C....CALL./CMA..?CMC..CMP..CPI..DAA.. DAD..DCR.. DCX..DI...DJNZ.EI...@EXAF.@EXX..vHLT..IN...INR..INX..J....JMP..JMPR. JR...:LDA.. LDAX.*LHLD.LXI..@ MOV..MVI..NOP.$#~#G7!W~ ,#~.rMw!W~.r͘DM##~o|g#*!{_zfU`i"!##6w#~#+v-v0ڗ:vAڗ[v+ͬw#Ͱw# ڹ0ͬͰ|ͼ}ͼ> ~.~0:AG0))))o#.ORA..ORI..OUT..PCHL.POP..PUSH. R....RAL..RAR..RET..RRC..RLC.. RST..SBB..SBI.."SHLD.SPHL.2STA..STAX.7STC..SUB..SUI..XCHG.XRA..XRI..XTHL.@BIT..RES..SET..RLCR.RRCR.RALr͘^#V~!"M2|\w[\\<2|!"M\\ > >*_:G:F!E{{ A:5A!45T>N !U^#6 !U#~ a`{`_w`2E2G~#~#ɯ2"!""!> 2W!">I2*)|"+6#6# µ  ww ABORT Y/N _Yw DR.OUTI.OUTIROUTD.OUTDRBDSBC.JDADC.gRRD..oRLD..@INP..AOUTP.BDSBC.JDADC.)DAD. DAD.POP..PUSH."SID.*LID.#INX..+DCX..F MOV..ADD..ADC..SUB..SBB..ANA..XRA..ORA..CMP..pMOV..4INR..5D ȷ ? *()" ASMCOMCTLSYMDOC#~#ɯ2"!""!> 2W!">I2*)|"+6#6# µ  ww ABORT Y/N _Yw CR..6MVI..!LXI..SPI.XTI.PCI.NNMMDDYY?????!T6L#z͟{͟!T͘Ws#r*!T]xo|g"!##6++DM*K{€zʇ vs#r#p#w!"##~#O͵~#oҝ$Ý++ѷO͵ҹH͵ҹ++"K7!"~#~#~7#o lxi h,512 ; set 1/2k counter lp dad h ; multiply * 2=1024 dcr a ; less block size code count jnz lp ; loop till = 0 call bndec2 ; print siz  e in K ; dpbend call inlprt ; finish message db ' bytes per block',0dh,0ah,'$' lhld tbtr ; total bits to read push h ; save it in the stack lda drive ; aga ; decrement bit count push psw ; save the bit pattern mov a,d ; check to see if... ora e ; ...DE = 0 jz bmapend ; if so, we're finished pop psw in to be safe mov e,a ; into E for bdos mvi c,sdsk ; reselect disk call bdos ; let bdos do it mvi c,gtaloc ; get the allocation address call bdos  ; restore bit pattern dcr c ; decrement line count jz bmap ; new line if zero dcr b ; decrment bit count jz bmap1 ; new byte if zero  ; ...from bdos pop d ; tbtr from stack dcx h ; back allocation up one ; ; ;We now have the total number of bits to read in DE, and ; the address to start reading them at in HL for the ; proper jmp bmap2 ; finish this byte ; bmapend pop psw ; not neccessary, but keeps the call crlf ; ...stack straight..send cr,lf call crlf lda drive ;get drive used  drive. So now let's print the bitmap. ; ; bmap mvi c,48 ; 1's and 0's per line call crlf ; followed by a cr,lf bmap1 inx h ; kick the pointer mov a,m ; get the byte  adi 'A' call conout call inlprt db ': R/W, Space: $' lda blksiz ; get block size code lhld free ; get nb of free blocks lp1 dcr a jz don  REZ80.COM is a Z-80 version of Ward Christensen's RESOURCE.COM. It uses TDL mnemonics. The operation of the program is the same as the original RESOURCE. END  ; multiplied by size of block dad h ; times 2 jmp lp1 ; don call bndec2 ; print size of free space call inlprt db 'k',0dh,0ah,'$' jmp finis ; res  tore things and GET OUT ; end  ; print size of free space call inlprt db 'k',0dh,0ah,'$' jmp finis ; res LD ZRST RST oOUT OUT &IN IN XTHL EX PCHL JP XCHG EX ! ~ (S (O;~:( ( (;( (# #>:y0> ͖~; "  }͖" <͖t:(  ~ <  ~ <~#* { ~ ( (#> * ~M{#!!{(HL) N#F* ~B(!D("H(#P (#~S "#~W ##!u !x!{!~#{AFBCDEHL!͵* {RET !͵>,* {CALL !JP : : * ~B(D({!!* #A,(BC)A,(DE)* ~1 ͌Q! ͺ! ͺ ! ͺ1!Qʁ!jʓ!ʪ! ͺ&! ~ ( (#> * ~ ( ( (I;(!'  (#͖ (-;(f ͖:d 0 > > >2d RLC RLCA RRC RRCA RAL RLA RAR RB(D({!!"* #(BC),A(DE),A!54HL,* ~M !!#~#!i* {SP,HL!~* {8*!* {A,!(SP),HL!!!* {DE,HL>(:!{),HL!:>){HL,(>(:RA CMA CPL STC SCF CMC CCF HLT HALT JMP JP ADI ADD ACI ADC SUI SUB SBI SBC ANI AND XRI XOR ORI OR CPI CP DS DEFS DB DEFB DW DEFW SET DEFL INR INC DCR DEC MVI LD ADD ADD SUB SUB ADC ADC SBB SBC ANA AND X! {),A!":>){A,(:!7{,A* ~;( (#+~ ( (#* z {~#~ ( #͡#H͡~ ( #!ͻ~,:+-/* ); H F#N#~( y< #Ʌo#> bk * wRA XOR ORA OR CMP CP LXI LD INX INC DCX DEC POP POP PUSH PUSH RNZRZ RNCRC RPORPERP RM CNZCZ CNCCC CPOCPECP CM JNZJZ JNCJC JPOJPEJP JM LDAX LD STAX LD DAD ADD )SHLD LD LHLD LD STA LD LDA LD MOV LD 9SPHL :d = :d <2d #: =   9! >" 2 FvOUTPUT FILE WRITE ERROR : (> |_! P[ :   =ʢ  2 S ! 4w ( ( 8# +#6 #6S xP(|>2d  T 8080   TO Z80 TRANSLATER V.2.1 !]  (>2 = vNO SOURCE FILE PRESENT!]     v >2 ! " NO DIRECTORY SPACE ` v*** END OF JOB *** S8QASMDBA (Q(?> Z80hSx!,URT:RR(͛SDM^#V#~ yyx͢T2MQ7AX2SQʹTAX2KQR S:RRx!X#SQx(2X~XQ>2MQCNV H ZSE͛SeRR~̀RR:RR(!.(F-(#'('S8}w#R(# S S+('(w#'( S!XXX` $TRANSLAT is a Z80 program which translates 8080 ASM files to Zilog Z80 mnemonics. Command: TRANSLAT MYFILE (where MYFILE is MYFILE.ASM) The program will create a new file named the same as the source file, but with the filetype of .Z80 No code optimization takes place - the translation is literal.  MYFILE.ASM) The program will create a new file named the same as the source file, but with the filetype of .Z80 No code   12A IF NOT, GO AROUND 0112 MVI E,A PUT LF IN E 0114 MVI C,2 TELL CPM TO MOVE LF TO KEYBOARD 0116 CALL 5 DO IT 0119 MVI E,D MOVE CR TO REG E 011B MVI C,5 TELL CPM TO PRINT CR TO PRINTER 011D CALL 5 DO IT 0120 MVI E,A MOVE LF TO REG E 0122 MVI C,5 TELL CPM TO MOVE LF TO PRINTER 0124 CALL 5 DO IT 0127 JMP 103 GET NEXT CHARACTER 012A MOV E,A MOVE INPUT CHAR TO REG E 012B MVI C,5 TEL1:=W!~# xb{,~#o}o5 x!.L CPM TO MOVE CHAR TO PRINTER 012D CALL 5 DO IT 0130 JMP 103 GET NEXT CHARACTER 0133 NOP 0134 NOP 0135 NOP 0136 NOP 0137 NOP 0138 NOP 0139 CR ENDS DDT ASSEMBLY -^C C RETURNS TO CPM  Ë,y$ K <! 6 # )! wK# <5KByE<80ɾ# d * {~#z +++ r : <>H2 ~@̸¬#™ ŽA #2HXY: [! m<y!~<4: ]<: <~: A>SAVE 1 B:TYPER.COM CREATES COM FILE TYPER.COM ON B: A>B:TYPER TRY IT OUT  NOP 0136 NOP 0137 NOP 0138 NOP 0139 CR ENDS DDT ASSEMBLY -^C C RETURNS TO CPM  G: G: $-<x<>--x,/<2>! ͆< y3<3<=:H<:H<g:H~X>ʺ>ú* " : <! m<yW͊E!6>!>*w#"/_~úK d.d!6!56>ú!w! ͆¬yƛ` foڎ<ʟڮڳ<ʾ<(2FS\p|!|!N!E*yoxg |<}ր!ͺEͺx@WGäOWͶͺN7G3<< \=×GFs]!  ú N<WOs]<O 7WG͸OͰyWCÔ@OͰöWBGͰF\]!ͰO! pGyʕÔF¦:<> : J¼ͧCͧͺyÚR<͊**{zd~#": >o&I LDI RLD RRD LDARIM2 LDAIIM1 STARRETISTAIIM0 RETNNEG DSBBDADCINP OUTPSBCDLBCDSDEDLDEDSHLDLHLDSSPDLSPDRLCRRRCRRALRRARRSLARSRARSLLRSRLRBIT RES SET POP PUSHRST LXI INX DAD DCX STAXLDAXMVI INR DCR ADD ADC SUB SBB ANA XRA ORA CMP MOV CALLJMP LDA STA LHLDSHLDJR) N>[$/$+$-/<̈́]:H%>X>YyO ~@/$#D"z8UO! ~$#~$""U‹SP/$͞*ͷq!9"2!!"<<2*!ͨd!~5d͖2W!id d dC JRNCJRZ JRNZJMPRDJNZCPI ORI XRI ANI SBI IN SUI OUT ACI ADI EI SPHLDI XCHGPCHLXTHLEXX RET HLT CMC STC CMA DAA RAR RAL RRC EXAFRLC NOP *"NZZ NCC POPEP M B C D E H L M A B D @ SP PSW DB ZDT VERS 1.4.14---CPU IS 8080Z-80"*" d|@ozSʇwrj!zU‹! BW@!fr!>!U>*+"+V2W@!>=!B==ʶz!d!={U!F>!w!6z@!BUÍz2Wv{Fozpz! "!"L2!""" 1N! ( 3"!"H! 7E ! !\$ :] !t 15!_ ͞>-$K A_! ^#V   > e  a  7A~#$ ů2#2D$ A="HA "= Xz4==ʾz"a!ʑz>z!Bz!{*#~{~!V!Bw!C\JlR\zʵ==ʾ!z=ʩڣ>wBw!w!BU!!BU!BUz!= "=> âA1 ! "=1 =< *}o͘*ͷ"͂Y }G ""~Ϳ#}` = ADM#}O|G{zr 7 s# x sT]x ͞ADM "L=  = YP >28!"97 14GW_ö! =Ä!: =!=+÷_W! BzÄ͞?*!9"͖"*"O*'/7?v (08"*2:DEFGMOVW^_goSI@DLI@DPCI@SPI@XTI@DAD@OTDRINDRCCDRLDDROTIRINIRCCIRLDIROUTDIND CCD LDD OUTIINI CC1B*L" *J!~42 #~#~#2 2 ~#s#r#w>A͞ͷ"ᯕo>g÷2D2$K !%:ʾ w# K.ʏ w ʙ 6 #Ï .± K ʱ w# à ʻ 6 #ñ 6+~l r 7 ~# x r  # x ͘ ͷ"~̈́""  !-~H#~E#~X* }| " >M>>> !@ *** ATTEMPT TO OVERLAY ZDT *** A!t =  ʩ # O$  È :© W _ O { `i"L# w#  é ^#V#K6 K))))oK!s#r#!4K!6 iV6#iiɷ!Fʁ!:? ƒOʛw> $z$z$>=$w>$V#^#~#Nڋ"z${ $>=$!N ~ʄ#fo÷!$7!I!R"*L">GWxL !* * ͷ"*L÷ NEXT PC D!"AhDM=h=l="l* + ʂN͎#v yғ{<_P͇:͎{i*di~#i²iÂe 2$   DA"L:< "͢*L"7![͞ͱ####~C Z M E I A B D H X Y S P c z m e i a b d h IV!""J+"L!91J7W15*L~!~6=G#^#V#~x#"L! N#F͐ ̈́*>7 *|͇:͎Wi*Ld>ii͇!~6<_!Eq#3U$ :!E $ <!k *** DISK WRITE ERROR! ***  ͎ !^4!Eq2UA=͞ͷ"~̈́>-$1  +ʵ#s #þ> $ø2A!+"ͨ:5 ̈́>*$*L"ͷ*J"_ *LF#xvʱ!Jxʮx"CFxE8C!x@xDFGOVW^_go!CFxvʱ&!x"#x F=}+"x'%y O> , ~6#~+####~,?$_   !"> _  a_!~> b5*~#"B|i}WvƐ'@'OÎ~#͍Ɛ':'$ͨ_ > $> $ |̈́}Ä $>.$z{ , 0 !))))o1C>>>><7 #   output routine. Enter with 8 bit binary ;number in . Second entry at BNDEC2 assumes 16 bit nb. in ; bndec1 mvi h,0 mov l,a ; now has number ; bndec2 push b push d push h l$@ID  @$!$I$@B@BA"I!!"D @ ! !  !BB!$I @HB $$$!$B"@D $$A" H! AB@HHB@!$@$H! B $I$B@H $H$ " @D $BB I$I$I$II$I I$xi b,-10 lxi d,-1 bndc dad b inx d jc bndc lxi b,10 dad b xchg mov a,h ora l cnz bndec2 mov a,e adi '0' $ @HIHUUUUUU@$$I$II$D"I HH D@I@@HH D BHB !  "I AI HB"A"$@@I$@A H DBAB!$ I$!! ! @ I !I$BB HH call conout pop h pop d pop b ret ; err1 call inlprt ; in line print db 0dh,0ah,'Nonstandard disk ' db 'parameter block error' db 0dh,0ah"B$@DHI$ $  D @ !!$BA@$!"AI$I$@$B!! I$$ B @I "$$$I B H !BA$I @!B!DI$B$A"HH ZDT.DOC ver 1.0 4/27/80 DOCUMENTATION FOR ZDT Version 1.4.14 This is a version of DDT that can use Z-80 Mnemonics. This software will automatically determine which chip (8080 or Z-80) it is running on and will work accordingly. Thiee blocks inx h ; add one free shld free ; store total free count pop h pop psw ; restore Acc ret ; return to caller ; ;Binary to decimals software will use TDL Z-80 Mnemonics when in the Z-80 mode. The commands to utilize this software are the same as for DDT with the addition of a few aditional commands: Extra command: Action: O Open F$  ile ie Ofilename.atb filename is any CP/M legal filename atb is CP/M file atribute ie hex,com,asm W Write to file ie Ws,f,optional offset s=start f=fi ; lsb into E inx h ; point to msb mov d,m ; get it xchg ; put it in HL... inx h ; alloc size = (dsm/8)+1 shld tbtr ; ...andnish addresses E End/Close file ie E optional hex run address The above is reconstructed from scratch notes. Please feel free to improve on this documentation. The programs oterm disassem hanoi were written by Michael M Rubenstein 4503 Rena Rd #201 Forestville, MD 20746 They may be distributed freely provided no fee is charged.  aldrv ; get any alternate drv ora a ; any specified? jz dpblk ; if not, skip next dcr a ; less one sta drive ; save as drive to use ; dpblk ; it will be 3-7 (make it 1-5) cpi 5+1 ; check for over 5 jnc err1 ; nonstandard size cpi 1 ; check for less than 1 jc err1 ; nonstandard size lda drive ; get drive to bitmap mvi c,sdsk ; set call for disk select mov e,a ; bdos wants it in E call bdos ; let bdos do it mvi c,dskpar ; we want  push psw ; save it call inlprt ; in line print db 'Allocated disk block size is $' pop psw ; get block size back sta blksiz ; save it for end dsk parameter blk call bdos ; get it, and..... shld dpb ; ...save it lxi d,5 ; offset for total blks used dad d ; add it to HL mov e,m  lxi h,512 ; set 1/2k counter lp dad h ; multiply * 2=1024 dcr a ; less block size code count jnz lp ; loop till = 0 call bndec2 ; print siz%  e in K ; dpbend call inlprt ; finish message db ' bytes per block',0dh,0ah,'$' lhld tbtr ; total bits to read push h ; save it in the stack lda drive ; agasassembly of a .COM file. This program is from -CPMUG.042. Instructions are built-in. Place RESOURCE.COM in drive A. At the A> prompt, type RESOURCE Also, refer to RESOURCE.DOC. REZ80 is a version of RESOURCE which can use TDL Z80 mnein to be safe mov e,a ; into E for bdos mvi c,sdsk ; reselect disk call bdos ; let bdos do it mvi c,gtaloc ; get the allocation address call bdos monics. ZDT is a version of DDT which can use the same mnemonics. Note: These are not the Zilog Z80 mnemonics you may be more familiar with. For information, refer to their .DOC files. TRANSLAT converts 8080 assembler code to Z80 code. It app ; ...from bdos pop d ; tbtr from stack dcx h ; back allocation up one ; ; ;We now have the total number of bits to read in DE, and ; the address to start reading them at in HL for the ; properears to use Zilog mnemonics. It was received from the Osborne Users Group (OUG) of the Washington D.C. area. The file to be translated must be on the logged (default) disk drive. For example, place TRANSLAT.COM in drive B and the .ASM file to be drive. So now let's print the bitmap. ; ; bmap mvi c,48 ; 1's and 0's per line call crlf ; followed by a cr,lf bmap1 inx h ; kick the pointer mov a,m ; get the byte  translated in drive A. At the A> prompt, type B;TRANSLAT filename.ASM See TRANSLAT.DOC for instructions. DISASSEM is an MBASIC program to disassemble a .COM file. It was received from OUG. To run, place DISASSEM.BAS in drive B and MBASI DISK.DOC -FOG/UTL.007 First Osborne Group (FOG) Utilities Disk Utilities on this disk will be particularly useful to the assembly language programmer. Using RESOURCE, you can perform detailed diC in drive A. At the A> prompt, type B: At the B> prompt, type A:MBASIC DISASSEM See DISASSEM.DOC for instructions. Also, refer to DISASSEM.LTR. Jim Woolley FOG Disk Librarian S&  eptember, 1982 ons. Also, refer to DISASSEM.LTR. Jim Woolley FOG Disk Librarian S!9"=1=~#$MO@_? $>1O>0O*#"&o ڊ |ā{0O? Nonstandard disk parameter block error $*=!:\2?BITMAP 2.2 AS OF 7/11/80 $2:=2:_"^#V#"*##~ңڣ?Allocated disk block size is $2!)=ú? bytes per block $*:_+0^#~emz ʧʬð^^:AO?: R/W, Space: $:*=)́?k $ bytes per block $*:_+0^#~emz ʧʬð^^:AO?: R/W, Space: $:*=)́?k'  18 *   _0 !~=W!xe ~#Xbxʇ {z~#o}o҃i.2_!fp+q*e2_2_!hp+q*g!jp+q*i!lp+q*k!np+q*m2_!pp]r