home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / BEEHIVE / ZSUS / Z3HELP-2.LBR / D.LBR / DPROG.HZP / DPROG.HLP
Text File  |  2000-06-30  |  8KB  |  242 lines

  1. ;
  2.  
  3.                     DPROG - Device Programmer
  4.  
  5.                           A ZCPR3 Tool
  6.  
  7.  
  8.  
  9.        D - DPROG Summary        1 - Characters
  10.        P - DPROG Programming    2 - Format Specifications
  11.                                 3 - Word Definitions
  12.                                 4 - DPROG Commands
  13.  
  14.  
  15. :D
  16.  
  17. Command: DPROG 1.0
  18.  
  19. Syntax:
  20.  
  21.      DPROG                    <-- program from STD.DPG
  22.      DPROG filename           <-- program from filename.DPG
  23.      DPROG filename.typ       <-- program from filename.typ
  24.  
  25. Function:
  26.  
  27.      DPRO╟á i≤á useΣ t∩ prograφ thσ devicσ a⌠á thσá Console¼ ì
  28. List¼á o≥á PuncΦ Device«á  I⌠ read≤ thσ indicateΣ o≥ implieΣ ì
  29. filσ afte≥ ß patΦ searcΦ anΣ print≤ ou⌠ string≤ accordinτ t∩ ì
  30. thσá format≤ containeΣ iε thσ file«á  Thσ DPRO╟ too∞ caεá bσ ì
  31. useΣ t∩ senΣ an∙ se⌠ oµ bytσ value≤ iε an∙ desireΣ forma⌠ t∩ ì
  32. eithe≥ thσ Console¼ List¼ o≥ PuncΦ devices.
  33.  
  34. Options: None
  35.  
  36. Comments:
  37.  
  38.      Thσá filσ useΣ t∩ prograφ thσ devicσ i≤ ßá conventiona∞ ì
  39. ASCI╔ tex⌠ filσ whicΦ contain≤ fou≥ basiπ type≤ oµ lines:
  40.  
  41.           1«á commen⌠á line≤ - thosσ line≤ whosσ firs⌠á non-ì
  42. blanδ characte≥ i≤ ß semicoloε (;)
  43.  
  44.           2«  worΣ definitioε line≤ - thosσ line≤ tha⌠ begiε ì
  45. witΦ ß dasΦ (-⌐ iε columε onσ followeΣ immediatel∙ b∙ ß word
  46.  
  47.           3«á  DPRO╟á commanΣ line≤ - thosσ line≤á beginninτ ì
  48. witΦ ß specia∞ commanΣ characte≥ t∩ DPROG
  49.  
  50.           4«á  outpu⌠ line≤ - an∙ othe≥ linσ whicΦ doe≤á no⌠ ì
  51. fi⌠á onσá oµá thσ threσ type≤ oµ line≤á above╗á thesσá line≤ ì
  52. generatσ thσ outpu⌠ whicΦ i≤ sen⌠ t∩ thσ device
  53.  
  54.      Thσá detail≤á oµá ho≈ t∩ writσ program≤á iεá thσá DPRO╟ ì
  55. languagσ arσ covereΣ elsewherσ iε thi≤ HL╨ file.
  56.  
  57. Selected Error Messages: Self-explanatory
  58.  
  59. Examples of Use:
  60.  
  61.      DPROG          -- program from STD.DPG
  62.      DPROG ASM      -- program from ASM.DPG
  63.  
  64.  
  65. :P
  66.  
  67.                         DPROG Programming
  68.  
  69.      DPRO╟á i≤á ßá 3╦ interprete≥ fo≥ ßá devicσá programminτ ì
  70. language«á  Word≤ (ß symbo∞ u≡ t∩ 1╢ character≤ long⌐á whicΦ ì
  71. contaiεáá an∙áá combinatioεáá oµáá outpu⌠áá forma⌠áá contro∞ ì
  72. instructions¼á tex⌠á strings¼á anΣ reference≤ t∩ othe≥ word≤ ì
  73. caε bσ defineΣ iε thi≤ language«  Oncσ ß worΣ i≤ defined¼ i⌠ ì
  74. caεá bσá nameΣá iεá aεá outpu⌠á line¼áá anΣá it≤á definitioε ì
  75. (includinτ embeddeΣ forma⌠ controls⌐ wil∞ bσ translateΣá anΣ ì
  76. outpu⌠á t∩á eithe≥ thσ console¼á printer¼á o≥ puncΦá device«  ì
  77. WorΣá reference≤ caε bσ nesteΣ u≡ t∩ 12╕ level≤á deep«á  Fo≥ ì
  78. example:
  79.  
  80.  
  81.  
  82. ;
  83. ; Sample DPROG programming file
  84. ;
  85.  
  86. ; Define Basic Words
  87. -esc      (%c)           "\E"      ; the escape character
  88. -ctrly                   "^Y"      ; the character control-Y
  89. -test     (Char: %c %x %d\n)       ; character test format
  90. -normal_form   (%c)                ; normal output format
  91.  
  92. ;
  93. ; Use Words
  94. ;
  95. "This is a test\n" test "ABC" normal_form "\nEnd of Test"
  96.  
  97.  
  98.  
  99.      Thσá outpu⌠ froφ thσ executioε oµ thσ outpu⌠ linσá wil∞ ì
  100. be:
  101.  
  102. This is a test
  103. Char: A 41 65
  104. Char: B 42 66
  105. Char: C 43 67
  106. End of Test
  107.  
  108.  
  109.  
  110.      UseΣ iε conjunctioε witΦ botΦ forma⌠ definition≤ (wherσ ì
  111. the∙á arσ outpu⌠ literally⌐ anΣ quoteΣ string≤á (wherσá the∙ ì
  112. arσ outpu⌠ accordinτ t∩ thσ curren⌠ forma⌠ definition)¼á thσ ì
  113. followinτ escapσ sequence≤ apply:
  114.  
  115.      ^c   Define control character (2-char sequence)
  116.      \b   Backspace char
  117.      \d   Delete char (DEL)
  118.      \e   Escape char (ESC)
  119.      \l   New Line char (CRLF pair)
  120.      \n   Line Feed Char (LF)
  121.      \r   Carriage Return char (CR)
  122.      \t   Tab char (TAB)
  123.      \#   Numeric value (forms are \d for decimal, \dH
  124.                for hex, \dq for octal, \dB for
  125.                binary: \1, \245, \33h, \0feH, \111b,
  126.                \77q, etc)
  127.  
  128.  
  129.      Additionally¼ thσ forma⌠ expressioε i≤ oµ thσ form
  130.  
  131.                       (<format text>)
  132.  
  133. wherσá <forma⌠á text╛ caε contaiε an∙ characte≥ sequencσá a≤ ì
  134. wel∞ a≤ recognizσ thσ followinτ outpu⌠ directives:
  135.  
  136.      %c   Output chars as ASCII characters
  137.      %d   Output chars as floating decimal ASCII chars
  138.      %x   Output chars as 2 hex ASCII chars
  139.      %2   Output chars as 2 decimal ASCII chars
  140.      %3   Output chars as 3 decimal ASCII chars
  141.  
  142.      An∙ tex⌠ caε surrounΣ thesσ outpu⌠ directives¼ anΣ eacΦ ì
  143. directivσá caε bσ useΣ a≤ man∙ time≤ a≤ desireΣ iε ßá forma⌠ ì
  144. expression«á  Oncσ ß forma⌠ expressioε i≤ given¼á i⌠ i≤ useΣ ì
  145. unti∞ ß ne≈ expressioε i≤ defined«  Fo≥ example:
  146.  
  147.  
  148.             (%x %d ) "\12\10hA" (%c) "\12\10hA"
  149.  
  150. will output:
  151.  
  152.                   0C 12 10 16 41 65 ^L^PA
  153.  
  154. wherσá ^╠á anΣá ^╨ arσ thσá ASCI╔á control-╠á anΣá control-╨ ì
  155. characters.
  156.  
  157.  
  158.      Finally¼á t∩á makσ al∞ oµ thi≤ complete¼á thσ use≥á caε ì
  159. direc⌠ outpu⌠ t∩ thσ console¼á printer¼ o≥ puncΦ a⌠ an∙ timσ ì
  160. (fo≥ programminτ whateve≥ devicσ yo⌡ wan⌠ t∩ program)¼ therσ ì
  161. arσá debugginτ command≤ (pausσ t∩ examinσ output¼á dum≡ worΣ ì
  162. definitioε table¼á dum≡ forma⌠ expression)¼á anΣ yo⌡ caε se⌠ ì
  163. u≡ a≤ man∙ *.DP╟ file≤ tha⌠ yo⌡ wan⌠ t∩ prograφ ß variet∙ oµ ì
  164. functions«á  DPRO╟ i≤ ß truσ ZCPR│ utility¼á anΣ i⌠ searche≤ ì
  165. thσá patΦá fo≥ thσ *.DP╟ files¼á s∩ thσ *.DP╟ file≤á caεá bσ ì
  166. retaineΣá iε thσ ROO╘ director∙ anΣ the∙ wil∞ bσ founΣá froφ ì
  167. an∙ director∙ oε thσ system.
  168.  
  169.      DPROG is used by issuing a command of the form:
  170.  
  171.           DPROG filename.typ  <-- program from filename.typ
  172.           DPROG filename      <-- program from filename.DPG
  173.           DPROG               <-- program from STD.DPG
  174.  
  175.  
  176.      DPROG¼á oµá course¼á caε bσ useΣ withiε aεá alias¼á ZE╪ ì
  177. commanΣ file¼ o≥ an∙ othe≥ ZCPR│ environment«  Fo≥ instance¼ ì
  178. thσ followinτ WorΣ Sta≥ alia≤ i≤ reasonable:
  179.  
  180.      IF NEC=$2
  181.           DEV L NEC      <-- assign printer
  182.           WSN $1         <-- run NEC version of WS
  183.      ELSE
  184.           DEV L TTY      <-- assign printer
  185.           DPROG CORRESP  <-- program printer for
  186.                               correspondence
  187.           WS $1          <-- run proper version of WS
  188.      FI
  189.  
  190. :1
  191.  
  192.      Thσá followinτá symbol≤á arσá useΣá t∩á definσá specia∞ ì
  193. characters under DPROG:
  194.  
  195.      ^c   Define control character (2-char sequence)
  196.      \b   Backspace char
  197.      \d   Delete char (DEL)
  198.      \e   Escape char (ESC)
  199.      \l   New Line char (CRLF pair)
  200.      \n   Line Feed Char (LF)
  201.      \r   Carriage Return char (CR)
  202.      \t   Tab char (TAB)
  203.      \#   Numeric value (forms are \d for decimal, \dH
  204.                for hex, \dq for octal, \dB for
  205.                binary: \1, \245, \33h, \0feH, \111b,
  206.                \77q, etc)
  207.  
  208. :2
  209.  
  210.      Thσ followinτ escapσ sequence≤ (thσ escapσ characte≥ i≤ ì
  211. %⌐ arσ valiΣ iε forma⌠ specification≤ (whicΦ arσ encloseΣ iε ì
  212. parentheses) under DPROG:
  213.  
  214.      %c   Output chars as ASCII characters
  215.      %d   Output chars as floating decimal ASCII chars
  216.      %x   Output chars as 2 hex ASCII chars
  217.      %2   Output chars as 2 decimal ASCII chars
  218.      %3   Output chars as 3 decimal ASCII chars
  219.  
  220. :3
  221.  
  222.      A word definition under DPROG takes the following form:
  223.  
  224.           -word_symbol  text_of_definition
  225.  
  226. where "-" is the first character in the line.
  227.  
  228. :4
  229. è     Thσáá followinτá DPRO╟á command≤á arσáá availablσáá fo≥ ì
  230. debugging and other purposes:
  231.  
  232.      Output Direction:
  233.           >C   Direct Output to Console
  234.           >L   Direct Output to List (Printer)
  235.           >P   Direct Output to Punch
  236.  
  237.      Data Dump:
  238.           =    Dump both Word Table (Symbols) and Format
  239.           =F   Dump current Format Specification
  240.           =S   Dump current Word Table (Symbol Table)
  241.  
  242. ≤ me