home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / news / cpmnet81.mqr / CPMNET81.MAR
Text File  |  1985-02-09  |  22KB  |  548 lines

  1.  
  2. >>>>>>>>>>>>>>>>>>>>> CP/M-Net News <<<<<<<<<<<<<<<<<<<<<<<<
  3.  
  4. ============================================================
  5. Number 3           March, 1981       Volume 1, Issue 3
  6. ============================================================
  7.  
  8.             In This Issue
  9.             =============
  10.  
  11.      The Famous UP-Arrow Story - Michael J. Karas
  12.  
  13.       CP/M Bit Map File Allocation...EXPLAINED!
  14.  
  15.    A Simple 6 Byte Hexadecimal to ASCII Conversion Routine
  16.  
  17.    A CP/M 1.4 Parameter Display Program in Microsoft Basic
  18.  
  19.   CP/M-Net 'Tip-of-the-Month', 64 character wide DDT or SID
  20.  
  21.  
  22. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  23.  
  24.  
  25.            The Famous UP-Arrow Story
  26.            =========================
  27.              by
  28.           Michael J. Karas
  29.  
  30.  Some time ago,  while working at a job that I would just as
  31. soon  forget,  the famous up-arrow incident took place.   My
  32. desk  happened    to  be right next to that  of  Kelly  Smith,
  33. editor of the CP/M Net (tm) News.  Kelly had been spending a
  34. large  amount of his time working on a diagnostics  software
  35. package for the company's business computer.  (The now known
  36. PCC  2000.) Building a diagnostics package can    be  creative
  37. and  on one particular day Kelly wanted to show me how    some
  38. of  the softare worked.  In other words he wanted me to  see
  39. some  of  the creativity that he had put into this  software
  40. package.
  41.  
  42.  I went over to his computer setup to look at the CRT screen
  43. while  he showed me the Memory Display/Alter routine he  had
  44. made.  After  observing for a short time I asked how do  you
  45. back  up  to the previous memory address if  you  enter  the
  46. wrong data. His response was that you terminated the current
  47. entry  sequence and reentered the errored memory address.  I
  48. decided that it would be nice if there was a key that  would
  49. allow you to simply backup to the previous address.
  50.  
  51.  After    lunch,    (Kelly    usually seemed to pound away at  the
  52. keyboard all during lunch in those days;) Kelly asked me  if
  53. a newly modified version of his Display Alter Routine solved
  54. my  problem.  I  tried it out and found that while  entering
  55. data  with the memory display/alter command that use of  the
  56. up-arrow  (^) key would cause the displayed address to    back
  57. up to the previous address. A very useful feature I decided.
  58. Kelly's only comment was that some people get their gibblets
  59. jiggled in the most strange ways.  Anyway,  to this day  the
  60. monitors  in  all of my personal computers contain a  memory
  61. display/alter routine with the up-arrow.
  62.  
  63.  These days I don't usually use the monitors anymore due  to
  64. the  fact that I have disks and thus access to DDT,  Digital
  65. Research's Diagnostic Debugging Tool. The "S" command of DDT
  66. does not have the capability to offer the up-arrow attribute
  67. to ease the pain of putting in the wrong value for a  memory
  68. byte.  So  I  took it upon myself to change DDT so  that  it
  69. would do "Up-Arrow".
  70.  
  71.  If  you should desire to "jiggle your giblets" while  using
  72. the  DDT Version 1.4 debugger package then you will have  to
  73. do  a  little  work for the "jigglin'".  The  rest  of    this
  74. article  describes  how  to  make  DDT    react  to  up-arrow.
  75. Operating  instructions  are at the end of the    installation
  76. procedure.  Note that this patch is specifically tailored to
  77. DDT  Version 1.4 and may not work with other  versions.  The
  78. short program below should be edited into a file using    your
  79. favorite editor with the name "DDTPATCH.ASM". It should then
  80. be  assembled  into a ".HEX" file using  an  assembler.  Use
  81. particular care to get all of the strange equated numbers at
  82. the beginning exactly right.
  83.  
  84. ;****************************************************************
  85. ;    PATCH TO GIVE SET MEMORY COMMAND BACKUP CAPABILITY
  86. ;    IN DDT VERSION 1.4.
  87. ;****************************************************************
  88. ;
  89. ;
  90. WBOOT    EQU    00000H        ;WARM BOOT ENTRY ADDRESS
  91. BDOS    EQU    00005H        ;BDOS ENTRY ADDRESS
  92. TPA    EQU    00100H        ;START OF TRANSIENT PROGRAM
  93. ;
  94. ;
  95. CMNDLP    EQU    06FEH        ;LOCATION OF COMMAND LOOP START
  96.                 ;(IN ABSOLUTE DDT IMAGE)
  97. ;
  98. DISPLP    EQU    0A7EH        ;LOCATION OF DISPLAY LOOP START
  99.                 ;(IN ABSOLUTE DDT IMAGE)
  100. ;
  101. PATCH    EQU    0A91H        ;LOCATION OF PATCH IN MEMORY ALTER
  102.                 ;(IN ABSOLUTE DDT IMAGE)
  103. ;
  104. ASCHEX    EQU    0C53H        ;LOCATION OF CONVERSION ROUTINE
  105.                 ;(IN ABSOLUTE DDT IMAGE)
  106. ;
  107. ENDDDT    EQU    0FD0H        ;LOCATION OF END OF DDT 1.4
  108.                 ;(IN ABSOLUTE DDT IMAGE)
  109. ;
  110.     ORG    TPA+1        ;FIX OLD DDT 1.4 MODULE SIZE
  111. ;
  112.     DW    0FB6H+028H    ;NEW MODULE SIZE WITH PATCH
  113. ;
  114.     ORG    PATCH+200H    ;OFFSET ASSEMBLY AREA
  115. ;
  116.  
  117.     POP    H
  118.     CALL    CHARIN-200H    ;GO TO NEW ROUTINE TO GET CHAR
  119. ;
  120.     CPI    0DH        ;IS INPUT CHAR A CARRIAGE RETURN?
  121.     JZ    INCMADR-200H    ;GO TO INCREMENT TO NEXT ADDRESS
  122. ;
  123.     CPI    '.'        ;IS INPUT THE EXIT PERIOD?
  124.     JZ    CMNDLP        ;GO BACK TO DDT'S COMMAND LOOP
  125. ;
  126.     CPI    '^'        ;IS INPUT AN UPARROW TO BACKUP
  127.     JZ    DECMADR-200H    ;GO TO DECREMENT TO PREV ADDRESS
  128.     CALL    ASCHEX        ;GO TO ASCII TO HEX CONVERSION
  129.     RLC            ;ADJUST HEX FOR HIGH NIBBLE
  130.     RLC
  131.     RLC
  132.     RLC
  133.     MOV    D,A        ;SAVE HIGH NIBBLE
  134.     CALL    CHARIN-200H    ;GET ASCII FOR LOW CHAR
  135.     CALL    ASCHEX        ;GO TO ASCII TO HEX CONVERSION
  136.     ORA    D        ;COMBINE LOW AND HIGH NIBBLES
  137.     NOP            ;FIX PATCH SIZE TO FIT IN DDT 1.4
  138.     MOV    M,A        ;PUT NEW VALUE INTO MEMORY
  139. INCMADR:
  140.     INX    H        ;INCREMENT FOR NEXT MEMORY ADDRESS
  141.     JMP    DISPLP        ;GO DISPLAY NEXT MEM ADDRESS
  142. ;
  143. ;
  144. ;CODE TO BE PATCHED IN AT END OF DDT PROGRAM. THESE ROUTINES
  145. ;ADD THE CAPABILITY TO GET SINGLE CONSOLE CHARACTERS AND TO
  146. ;DECREMENT THE CURRENTLY DISPLAYED MEMORY ADDRESS IN THE DDT
  147. ;SET MEMORY COMMAND.
  148. ;
  149.     ORG    ENDDDT+200H
  150. ;
  151. CHARIN:
  152.     PUSH    D        ;SAVE POSSIBLE HIGH NIBBLE
  153.     PUSH    H        ;SAVE CURRENT MEMORY ADDRESS
  154.     MVI    C,01H        ;SET BDOS FUNCTION FOR CONIN
  155.     CALL    BDOS        ;USE BDOS FOR CONSOLE INPUT
  156.     POP    H
  157.     POP    D
  158.     RET
  159. DECMADR:
  160.     DCX    H        ;DECREMENT MEMORY ADDRESS
  161.     JMP    DISPLP        ;GO DISPLAY THE PREVIOUS MEM ADDRESS
  162. ;
  163.     END
  164. ;
  165. ;
  166.  
  167.  Once you have made the hex file, then put a copy of it on a
  168. CP/M  system  disk along with your copy of DDT version    1.4.
  169. Boot  up  this disk in drive A:  and  carefully  follow  the
  170. installation  instructions below.  If you are not  currently
  171. familiar  with the operation of DDT now would be a good time
  172. to get the manual out and read it.  We will be using DDT  to
  173. make a patched version of itself. The sequence below must be
  174. followed  exactly.  The  notation  <cr> indicates  that  you
  175. should enter carriage return.  The part of the text that the
  176. system types versus the part that you type should be obvious
  177. if you are familiar with DDT.
  178.  
  179. A>
  180. A>DDT<cr>              <== Invoke DDT
  181. DDT VERS 1.4
  182. -IDDT.COM<cr>
  183. -R<cr>                  <== Read in a copy of DDT.COM
  184. NEXT  PC
  185. 1400 0100
  186. -S1308<cr>              <== Change bit map for patch
  187. 1308 92 88<cr>
  188. 1309 08 42<cr>
  189. 130A 44 12<cr>
  190. 130B 48 02<cr>
  191. 130C 40 .<cr>
  192. -F13AC,13B0,00<cr>          <== Fill in new zeros to map
  193. -S13B1<cr>              <== Add a new bit to map
  194. 13B1 00 04<cr>
  195. 13B2 00 .<cr>
  196. -M11B6,1400,1A00<cr>          <== Move bit map out of way
  197. -IDDTPATCH.HEX<cr>
  198. -R<cr>                  <== OVerlay DDT.COM with patch
  199. NEXT  PC
  200. 1400 0000
  201. -M1A00,2000,11DE<cr>          <== Move bit map into place
  202. -^C                  <== Bale out of DDT to System
  203. A>SAVE 19 DDTP.COM<cr>          <== Save patched DDT
  204.  
  205.  You  are now ready to try out the patched version  of    DDT.
  206. For the most part DDT will operate just like before. The new
  207. version  will modify the way that the "S" substitute  memory
  208. command functions.  The command is invoked just as before (-
  209. Saaaa<cr>  aaaa=desired address).  When DDT responds with  a
  210. display of the memory address and its contents it will enter
  211. a mode waiting for operator input. Four different things can
  212. be entered at this point:
  213.  
  214. a)  A <cr> may be entered to cause the contents of the    next    
  215.     memory address to be displayed.
  216.  
  217. b)  A "." may be entered to cause DDT to return back to  the
  218.     command mode.  Note that the patched DDT does not need a
  219.     <cr>  after the "." to return to the command  or  prompt
  220.     mode.
  221.  
  222. c) A "^" may be entered to cause DDT to display the contents
  223.    of the previous memory address. This is the back-up mode.
  224.    Note  that the backup is immediate and does not require a
  225.    <cr> after it.
  226.  
  227. d)  A two digit hexadecimal value may be entered  to  modify
  228.    the    contents of the currently displayed memory location.
  229.    The    digits must be 0-9;A-F or DDT will display a "?" and
  230.    return  to the prompt mode. The second entered digit will
  231.    be taken immediately and will change the memory contents.
  232.    The next higher address will then be displayed.
  233.  
  234.  I hope you enjoy the up arrow feature as much as I  do.  Or
  235. as Kelly Smith would say, "Get your gibblets jiggled."
  236.  
  237. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  238.  
  239.       CP/M Bit Map File Allocation...EXPLAINED!
  240.       =========================================
  241.                 by
  242.             Kelly Smith
  243.  
  244.  
  245.              What It's for...
  246.  
  247.  For  each  diskette  "logged-on"  to the  CP/M  Basic    Disk
  248. Operating   System  (BDOS),   physical    diskette  space   is
  249. dynamically  allocated    to that diskette  (for    later  write
  250. operations)   and  maintained  in  memory  by    Bit   Mapped
  251. Allocation.  When changing diskettes (and to avoid the "R/O"
  252. error  message)  you  must  enter  Control-C  to  erase  the
  253. previous  diskettes Bit Map,  and cause the BDOS to read the
  254. file directory to establish the new Bit Map.  On  subsequent
  255. write  operations to the diskette,  the Bit Map is modified,
  256. and  the  diskette  File Control Block (FCB)  for  the    (now
  257. closed file) is updated in the File Directory.
  258.  
  259.               What It Is...
  260.  
  261.  The  Bit Map is actually a tight encoding of available  (or
  262. not)  sectors on the diskette.    The Bit Map is an  array  of
  263. single    bits which correspond to each block of eight sectors
  264. allocated  for usage on the diskette.  A  blank  (formatted)
  265. diskettes Bit Map Allocation array then looks like this:
  266.  
  267.       ("Standard" Single Density IBM Format Diskette)
  268.  
  269.            GROUP ALLOCATION MAP DRIVE - B
  270.           11000000000000000000000000000000
  271.           00000000000000000000000000000000
  272.           00000000000000000000000000000000
  273.           00000000000000000000000000000000
  274.           00000000000000000000000000000000
  275.           00000000000000000000000000000000
  276.           00000000000000000000000000000000
  277.           000000000000000000
  278.        240 GROUPS REMAINING ON DISK OUT OF 243
  279.  
  280.  Notice  that two bits are 1's...this predefines  allocation
  281. space  for  the CP/M Directory for the    diskette  (i.e.,  16
  282. sectors or 2 groups),  and insures that the directory is not
  283. overwritten  when creating new files.  All remaining 0's are
  284. free  groups,  ready to become allocated in  the  directory.
  285. When the BDOS receives a request to create a file,  it first
  286. searches the Bit Map until it finds a bit containing a zero,
  287. and  the number (this will be explained shortly) of this bit
  288. is  the number of the first free group to be  allocated  for
  289. the  file.  The BDOS sets the bit map to a one and places  a
  290. one  byte  hexadecimal    group  number into the    FCB  of  the
  291. directory,  created  for the new file.    As subsequent  write
  292. operations  occur for the file,  the BDOS examines the    last
  293. group number in the FCB (and also the Next Record count) and
  294. from  the numbers automatically computes the  next  physical
  295. track  and  sector  number where the diskette  write  is  to
  296. occur.    Keeping  in mind that eight sectors equal one group,
  297. when  all eight sectors of a group have  been  written,  the
  298. BDOS  searches the Bit Map again for the next bit containing
  299. a zero. When a free allocation is found, its group number is
  300. added  to the FCB (not necessarily a sequential number)  and
  301. the  corresponding bit is set to a one.  Also note that  the
  302. minimum file size that a file will be,    is one    kilobyte...a
  303. file which has seven or fewer sectors will be shown (by STAT
  304. Filename.Typ<cr>) as utilizing one group (1k);    a file which
  305. has  eight  sectors will be shown as utilizing    two  groups,
  306. even though the second group is empty.
  307.  
  308.  Here  is  an  example of what one sector of  the  directory
  309. looks like, showing four FCB's for three files:
  310.  
  311.   Filename.Typ    EX RC <--------------Group-------------->
  312.   -------------------------------------------------------
  313.   MACRO   .LIB    00 80 45464748 494A4B4C 4D4E4F50 51525354
  314.   MACRO   .LIB    01 08 55000000 00000000 00000000 00000000
  315.   PLINK   .COM    00 0B 56570000 00000000 00000000 00000000
  316.   DISKTEST.COM    00 09 58590000 00000000 00000000 00000000
  317.  
  318.  Specifically,     note    that  the  file  MACRO.LIB  has  two
  319. entries...and also the Record Count (RC) for the first entry
  320. is set to 80 hexadecimal.  As new records are written to the
  321. diskette,  the RC is updated by the BDOS.  When a transition
  322. occurs    from  7F to 80,  the BDOS adds a new  FCB  into  the
  323. directory,  and  also  creates a new extension (EX)  to  the
  324. file.  Bit  Map  allocation  then  proceeds  from  the    next
  325. available group.
  326.  
  327.              And Why...
  328.  
  329.  As I mentioned, the group allocations may not be sequential
  330. (even  though my example shows sequential groups).  As files
  331. are deleted from the diskette, they leave "holes" in the Bit
  332. Map to make space available for any new files to be created.
  333. The major advantage here, is that the disk is never required
  334. to  be    "packed down" (i.e.,  for iCOM FDOS  users  or    UCSD
  335. Pascal    users,    you  know  what I mean!).  For users  of  an
  336. operating   system  that  utilizes  Sequential     or   Linked
  337. Allocation methods, my heart goes out to you...nothing quite
  338. so  "gut wrenching" as a disk error in the middle of a    pack
  339. operation!  The  other advantage to Bit Map  Allocation,  is
  340. true random access to sectors (no "kludge" ISAM,  as in MITS
  341. DOS  or  BASIC and no "rewind file pointers" as in  PASCAL),
  342. and  dynamic  allocation of file  size.  Another  source  of
  343. frustration regarding Linked Allocations is when an isolated
  344. sector    (which    "forward references" the next sector in  the
  345. file)  is "bombed"...there is no way to recover  the  ENTIRE
  346. file intact...just up to the point of the offending sector!
  347.  
  348.  Now for some detail (as promised):  To determine the  group
  349. allocation  from the Bit Map,  we must first "split" the  in
  350. half...then  it all begins to make (I hope) good  sense.  To
  351. find  the (hexadecimal) group number of an individual bit in
  352. the  Bit Map,  take the first digit from the even  (or    odd)
  353. half row and the digit from the column in the same half.  As
  354. shown  in  the    example  below then,  the  next  free  group
  355. allocation is 02 and the last free group is F1:
  356.  
  357.           GROUP ALLOCATION MAP DRIVE - B
  358. Even Half Row          Columns          Odd Half Row
  359.  
  360.          0123456789ABCDEF 0123456789ABCDEF
  361.          ---------------------------------
  362.       0 :1100000000000000:0000000000000000: 1
  363.       2 :0000000000000000:0000000000000000: 3
  364.       4 :0000000000000000:0000000000000000: 5
  365.       6 :0000000000000000:0000000000000000: 7
  366.       8 :0000000000000000:0000000000000000: 9
  367.       A :0000000000000000:0000000000000000: B
  368.       C :0000000000000000:0000000000000000: D
  369.       E :0000000000000000:00          : F
  370.      240 GROUPS REMAINING ON DISK OUT OF 243
  371.  
  372.  The PHYSICAL relationship of sectors to groups is such that
  373. Group  02  starts at Track 2/Sector 20,  Group 03 starts  at
  374. Track 02/Sector 13 (YES!  Sector 13, because of the diskette
  375. "skew factor"...hmmm,  a good topic for yet another  mundane
  376. article on my part...OK, OK,...BORING!), and so on.
  377.  
  378.  In conclusion,  Digital Research's CP/M BDOS makes the most
  379. efficient  use    of available space on  the  diskette.  Other
  380. operating systems (let's cuss MITS DOS again!) often require
  381. that  the  file size be specified by the  user...overcaution
  382. (and  much  guessing)  results in large  amounts  of  unused
  383. diskette  space that is NOT AVAILABLE to other    files.    This
  384. space  can  only be recovered by copying the data to  a  new
  385. diskette with the proper file size specified, and WHATS EVEN
  386. WORSE is that this same procedure must be followed to EXPAND
  387. a  file  that  has already  utilized  the  space  originally
  388. allocated to it! So anyway...NICE JOB Dr. Kildall!
  389.  
  390. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  391.  
  392.  
  393.    A Simple 6 Byte Hexadecimal to ASCII Conversion Routine
  394.    =======================================================
  395.                 by
  396.      Kelly Smith (originator of routine unknown)
  397.  
  398.  Only  six  bytes  of  8080  (or Z80)  code  can  perform  a
  399. hexadecimal (0 to F) to ASCII conversion.  Assuming that the
  400. hexadecimal digit is in the A register, then:
  401.  
  402. hex$to$ascii:        ; convert low nibble hex digit in the
  403.             ; the A reg., to ASCII character in the
  404.             ; A reg.
  405.       adi  90h  ; first add
  406.       daa        ; adjust result, if carry
  407.       aci  40h  ; second add, adjust to ASCII
  408.       daa        ; adjust result, if carry
  409.       .
  410.       .
  411.       .
  412.  
  413.  How  does  it work?  There are two main considerations  for
  414. hexadecimal to ASCII conversion: Is the A register less than
  415. ten, or is the A register greater than or equal to ten?
  416.  
  417.  The first DAA instruction (which operates on the lower four
  418. bits   (low  nibble)),     adjusts  the  result  of  the     ADI
  419. instruction  to  less than ten.  Then  the  ACI  instruction
  420. operates  on the upper four bits (high nibble) by adding the
  421. carry  out of the lower nibble.  The second DAA  instruction
  422. then adjusts the results of the high nibble to less than 10.
  423.  
  424.  If the A register is initially less than ten, the first add
  425. results in 9Xh...in this case, the DAA does not affect the A
  426. register. The second add (with carry) results in 9Xh+40h=DXh
  427. (D Hex = 13 Dec).  After the second DAA,  the result is  3Xh
  428. where 'X' is the decimal digits 0 through 9;  thus the ASCII
  429. representation     for   decimal     digit    9  results   in   39
  430. hexadecimal.
  431.  
  432.  If  the A register is initially ten or greater,  the  first
  433. add results in 9Xh (same as before),  but the result of  the
  434. foqst DAA is 0Yh (i.e.,  Yh=Xh-10d) and includes the setting
  435. of  the  carry    flag.  The next add (with  carry)  gives  us
  436. oYh+40h+1=4Zh, where Z=Y+1. The last DAA has no affect...The
  437. hexadecimal  digits 41 to 46 represent the ASCII alphabetics
  438. A to F...for example,  let X=10d=Ah,  then Y=X-10d=10d-10d=0
  439. and  Z=Y+1=0+1=1...the result is 41 hexadecimal,  the  ASCII
  440. symbol     for   'A'...the  routine  is    simpler   than     the
  441. explanation!
  442.  
  443. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  444.  
  445.  
  446.   A CP/M 1.4 Parameter Display Program in Microsoft Basic
  447.   =======================================================
  448.                by
  449.      Kelly Smith (from a program by Rod Hart)
  450.  
  451.  Its  not  often that you find a really unique utility    that
  452. "crosses  boundries"  between  an  operating  system  and  a
  453. computer  language...this one,    is particularly "cute"    (and
  454. useful),  that    I  downloaded with XMODEM  from  Rod  Hart's
  455. system...nice  job Rod!  My only changes were to make it all
  456. fit on a 24 by 80 screen display, without using clear screen
  457. codes that are terminal sensitive.  Note also, this WILL NOT
  458. WORK on CP/M 2.2 parameters! So put your "thinking caps" on,
  459. write a version for CP/M 2.2, XMODEM it to Rod or myself and
  460. become FAMOUS (if not rich)!
  461.  
  462. 10 REM CP/M Version 1.4 System Parameter Display Program
  463. 20 REM by Roderick W. Hart (WA3MEZ)
  464. 30 REM December 23, 1979
  465. 40 REM modified February 8, 1981 by Kelly Smith, CP/M-Net
  466. 50 PRINT TAB( 10) "Parameters unique to your CP/M Version 1.4 are:"
  467. 60 BD=PEEK(7)*256
  468. 70 SP=PEEK(BD+&H3A)
  469. 80 RB=PEEK(BD+&H3C)
  470. 90 LS=PEEK(BD+&H3D)
  471. 100 LB=PEEK(BD+&H3E)
  472. 110 DL=PEEK(BD+&H3F)
  473. 120 DT=PEEK(BD+&H40)
  474. 130 RE=PEEK(BD+&H3B)
  475. 140 TR=PEEK(BD+&H40)
  476. 150 MT=(BD+&H1A)
  477. 160 PRINT:PRINT TAB( 10) "Your BDOS starts at ";HEX$(BD);" hex"
  478. 180 PRINT TAB( 10) "Your sector map table is located at ";HEX$(MT);" hex"
  479. 190 PRINT TAB( 10) "Your directory allocation mask is ";HEX$(DL);" hex"
  480. 200 PRINT TAB( 10) "You have";TR;"tracks reserved for the system"
  481. 210 PRINT TAB( 10) "You have";SP;"sectors per track"
  482. 220 PRINT TAB( 10) "You have";RE;"records per extent"
  483. 230 PRINT TAB( 10) "You have";RB;"records per block"
  484. 240 PRINT TAB( 10) "Last sector in block is";LS
  485. 250 PRINT TAB( 10) "Last block on the disk is";LB
  486. 290 PRINT:PRINT TAB( 24);"Sector Map Table"
  487. 300 PRINT TAB( 24);"------ --- -----"
  488. 310 PRINT
  489. 320 FOR X=0 TO (SP-1)
  490. 330 MP=PEEK(MT+X)
  491. 340 Z=Z+5
  492. 350 IF Z<60 THEN 360 ELSE 390
  493. 360 PRINT TAB( Z);MP;
  494. 370 IF X=(SP-1) THEN 410
  495. 380 NEXT X
  496. 390 Z=5:PRINT CHR$(15)
  497. 400 GOTO 360
  498. 410 END
  499.  
  500. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  501.  
  502.  
  503.          CP/M-Net "Tip-of-the-Month"
  504.          ===========================
  505.                  by
  506.          Kelly Smith and Eddie Currie
  507.  
  508.  Are  you one of the "poor unfortunates" that has to contend
  509. with  a 64 character wide screen display,  and    bashes    your
  510. head  against the CRT in front of you (while mumbeling    "why
  511. did  I    EVER  BUY this #`!%&$ THING...it SCREWS UP  the  DDT
  512. 'DUMP' display so badly,  I can't even use it!").  Well,  no
  513. more  tears  on  the  keyboard my  friend...just  put  these
  514. patches into DDT or SID,  and as if by magic (at no time  do
  515. my  fingers  leave my hands),  VOILA...a 64  character    wide
  516. 'DUMP' that you can actually READ!!!...follow along:
  517.  
  518.  For users of DDT.COM version 1.4 or 2.2, make the following
  519. substitution...
  520.  
  521. A>ddt ddt.com<cr>   <--- patch DDT.COM using DDT
  522. DDT VER 2.2        <--- DDT announcing itself
  523. NEXT  PC
  524. 1400 0100        <--- DDT telling us it's used 19 pages
  525. -sa17<cr>        <--- Substitute at address 0A17 hex...
  526. 0A17 05 08<cr>        <--- ...08 instead of 05!
  527. 0A18 08 .<cr>        <--- end the substitution
  528. -g0<cr>         <--- exit DDT and return to CP/M
  529. A>save 19 ddt64.com<cr> <--- save the 64 wide DDT.COM
  530.  
  531.  And for users of SID.COM...
  532. A>sid sid.com<cr>   <--- patch SID.COM using SID
  533. SID VER 1.4        <--- SID announcing itself
  534. NEXT  PC  END
  535. 2D00 0100 B3FF        <--- SID telling us it's used 44 pages
  536. #saa5<cr>        <--- Substitute at address 0AA5 hex...
  537. 0AA5 93 96<cr>        <--- ...96 instead of 93!
  538. 0AA6 08 .<cr>        <--- end the substitution
  539. #g0<cr>         <--- exit SID and return to CP/M
  540. A>save 44 sid64.com<cr> <--- save the 64 wide SID.COM        
  541.  
  542.  What these patches do, is to throw out the space characters
  543. between  each  display of the hexadecimal representation  of
  544. each  memory content of the DDT or SID    'DUMP'    display...it
  545. crunches the display format, and make it READABLE!
  546.  
  547. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  548.