home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / 1989 / 01 / tricks / dcaend.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1988-10-06  |  1.8 KB  |  61 lines

  1. (* ------------------------------------------------------ *)
  2. (*                 Aenderungen zu DC.PAS                  *)
  3. (*          (C) 1988 by Mark Richter und TOOLBOX          *)
  4. (* ------------------------------------------------------ *)
  5.  
  6. (* Zeile 27: *)
  7. end_of_program, out_cycle : BOOLEAN;
  8. inp_file, out_file        : TEXT;
  9. esc                       : CHAR;
  10.  
  11. (* Zeile 28/29: *)
  12. command                  : (cl,instr,regr,step,run,go,
  13.                             tim,bpt,int,ldf,sav,other,
  14.                             hlp,view,ends);
  15.  
  16. (* Zeile 177: *)
  17. 'G': command := go; 'L': command := ldf; 'S': command:=sav;
  18.  
  19. (* Hinter Zeile 222: *)
  20. PROCEDURE save_file; FORWARD;
  21.  
  22. (* Zeile 230: *)
  23. sav : save_file; bpt : breakpoint; int : interrupt;
  24.  
  25. (* Hinter Zeile 245: *)
  26. PROCEDURE save_file;
  27. VAR i  : INTEGER;
  28.     arg: INTEGER;
  29.     st : mnem_str;
  30. BEGIN
  31.   IF Pos('.', item[2]) = 0 THEN
  32.     item[2] := Concat(item[2], '.DC');
  33.   IF Open_Sav_File(item[2]) THEN BEGIN
  34.     FOR i := 0 TO mem_size DO BEGIN
  35.       Write(out_file, i:2, ' ');
  36.       IF memory[i].nocommand = TRUE THEN BEGIN
  37.         dasm(memory[i].speicherwort, arg);
  38.         WriteLn(out_file, ' DEF', ' ', arg:3);
  39.       END ELSE BEGIN
  40.         disassemble(memory[i].speicherwort, st, arg);
  41.         WriteLn(out_file, st:4, ' ', arg:3);
  42.       END;
  43.     END;
  44.     Close(out_file);
  45.   END ELSE error(illfil);
  46. END;
  47.  
  48. (* ------------------------------------------------------ *)
  49. (*            Aenderungen zu DCTURMS.PAS                  *)
  50. (* ------------------------------------------------------ *)
  51.  
  52. (* Hinter Zeile 42: *)
  53. FUNCTION Open_Sav_File(filename: lines): BOOLEAN;
  54. BEGIN
  55.   Assign(out_file, filename);
  56.   (*$I-*) ReWrite(out_file); (*$I+*)
  57.   Open_Sav_File := (IOResult = null);
  58. END;
  59.  
  60. (* ------------------------------------------------------ *)
  61.