home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / articles / archives / limanews.exe / LFA7.TXT < prev    next >
Text File  |  2006-10-19  |  18KB  |  265 lines

  1. ORIGINALLY PUBLISHED IN LIMA NEWSLETTER JUNE 1994
  2.  
  3.              LETTER from AUSTRALIA - No. 7  Apr / 94 
  4.              --------------------------------------- 
  5.  
  6.      Well, it does seem a long time since I last put fingers (2 of them anyway)
  7. to keyboard to bash out a Letter.  Actually I did start one in January, about
  8. on schedule but events conspired against it.  Just after New Year I tried to
  9. install a 80-track drive on the Hawks Nest machine, so I could spend evenings
  10. of a lazy summer vacation doing some TI programming.  Disaster struck however
  11. and in process of hooking up the drive to a PC power supply, I managed to
  12. reverse the power leads to the Mechatronics 80-Z unit.  It was downhill with
  13. Murphy all the way from there.  Although the PE-Box turned out to be undamaged,
  14. the first spare normal console did not work - a dud power supply and of course
  15. it was one with a mid-lead connector.  Any other I could rustle u p had
  16. on-board snap-on connector.  So out with the CC-40 and Memo-Writer.  Time to do
  17. a Charlie Good and compose a Letter on that and download it later to the Kotara
  18. machine.  No luck there -- after several attempts, new batteries, every time
  19. the Memo-Writer would lose its conte nts when it was put aside for later work.
  20. Either something is faulty in the CC-40 or the M-W cartridge does not really
  21. handle 18 Kb expanded machines properly.  Eventually I gave up in frustration. 
  22.  
  23.      After that came a vacation trip to New Zealand.  The air tickets were
  24. William's Xmas present to ancient parents - that was the least of the expenses,
  25. but I could not convince him to pick up the damage to the Master Blaster.
  26. According to our Kiwi friends February is the best time to visit NZ, unless you
  27. are specifically after a skiing holiday.  With only 2 weeks or so we chose to
  28. restrict our visit to the South Island, and scarcely had enough time for that.
  29. As it turned out the weather was well-nigh perfect, sunny and clear all the way
  30. down the west coast of the South Island, a very rare event indeed in summer.
  31. This followed on a period of extreme rainfall and flooding in the South Island.
  32. Some of the mountain roads such as Haast Pass had only just reopened so tourist
  33. numbers were down temporarily. 
  34.  
  35.      Many things about NZ were more or less as expected, but some that I should
  36. have been prepared for came as a surprize.  Mostly this was to do with driving
  37. around the country.  Our experiences have been of Australia and the USA, both
  38. rather large countries.  You can drive from east to west coasts in NZ in just a
  39. few hours if you don't stop to look at the scenery along the way! That is
  40. obvious enough from a map but still a surprize.  Mountain driving is not what
  41. we expected at all.  We were used to the western US of A where mountain driving
  42. starts at 5 or 6000 feet and goes up from there, and were thinking of high
  43. altitudes and cold at night - there are glaciers after all.  That's not how it
  44. is - most of the driving is at or near sea level, and even the passes are only
  45. 3000 feet or so, even though the mountains rise to 12,000 ft.  That is not to
  46. say it is trivial.  The mountain s of NZ are very young in geological terms and
  47. always eroding do wn in great landslides, and it is only about 6 million years
  48. since tectonic plate collisions caused the uplift.  The recent ice ages ground
  49. out deep glacial valleys all over the place.  The narrow west coast plain has
  50. formed from all the eroded material being washed back up.  I could have spent
  51. days and days just picking up the beach pebbles and driftwood at Hokitika and
  52. Gillespies. 
  53.  
  54.      The relationships between NZ and Australia show quite a few parallels to
  55. those between Canada and the USA.  Small country reacts to much bigger
  56. neighbour.  NZ does share with Australia the characteristic attitude expressed
  57. in the phrase "She'll be right mate!" common to both countries.  In NZ however
  58. they have a corollary to that which runs "Geez, how did thet heppen" with a
  59. slight attempt there to convey the NZ pronunciation.  Mainly this differs from
  60. Australian pronunciation in the vowel sounds, and to Australian ears the accent
  61. is quite distinctive.  Unlike the U S where there are distinctive regional
  62. accents, the Australian and NZ internal variations are more between "educated"
  63. and "broad".  Regional variations tend to be more in items of vocabulary than
  64. accent.  I still use terms that date from my Queensland childhood which are
  65. foreign to NSW where I now live.  I sometimes think all those Kiwis come to
  66. Australia looking for their lost vowel sounds.  One thing that is good in NZ is
  67. "fush and chups" - the only place we have had it as good in Australia was at
  68. Apollo Bay on the Great Western Road in Victoria.  I guess that shares an
  69. exposure to the Antartic.  Much of the South Island of NZ is south of Tasmania,
  70. but it amazing how easily you can get sunburnt in the Otago region.  In NZ they
  71. are very conscious of ozone depletion problems. 
  72.  
  73.      Driving a car in the South Island is an interesting experience.  NZ used
  74. to be a rolling museum of old British cars, but now these have been largely
  75. displaced by imports of second hand Japanese cars.  Like Australia, Japan, and
  76. the UK the cars are right hand drive, so we had no adjustment problems there,
  77. apart from dodging the occasional US or German tourists who had forgotten what
  78. side of the road they were supposed to be on.  We have scared some American
  79. drivers in our time in the US too while adjusting - once you have changed over
  80. a couple of times the switch becomes just another driving skill.  NZ is the
  81. last refuge of the one-lane bridge even on main highways, and in one place on
  82. the west coast a long one-lane bridge is shared by the railroad track.  Very
  83. unnerving when you are out in the middle.  Kiwis treat speed limits very
  84. casually.  You can usually tell you are in a town area with 50 km/hr speed
  85. limit by noticing the traffic is all moving at 70 km/hr, and 20 km/hr over the
  86. limit is the basic norm.  I gather speed cameras were introduced last December
  87. and made such a haul that the protests are still reverberating and there was no
  88. sign of them while we were there. 
  89.  
  90.      I had better stop talking about NZ before this becomes the the equivalent
  91. of forcing you to look at the slides from our holiday.  Magic moments included
  92. walking to the terminus of the Fox Glacier just near sea-level rain-forest, a
  93. helicopter trip to the top of the glacier, and the glow-worm cave on Lake Te
  94. Anau, known from Maori legend but lost for centuries and only rediscovered
  95. relatively recently.  All in all I can thoroughly recommend NZ as a place to
  96. visit. 
  97.  
  98.      Nature is said to abhor a vacuum.  In this case it fills it with possums.
  99. The word must have gone out and some new ones moved in.  Also the Animal
  100. Welfare lady brought back the baby possum whose mother had been savaged, a
  101. tough little survivor that one.  So now we have a full complement that come
  102. down outside the kitchen door for food.  You do get a different slant on them
  103. in NZ however.  Australia has its own set of disasters with introduced animals
  104. - rabbits, foxes, cane toads, starlings, mynahs, and domestic ones gone feral
  105. such as cats, pigs, and goats, just to list a few of them.  In NZ also they
  106. have a hugE list of introduced disasters, not the least of which is the common
  107. Australian brush-tail possum.  These have gone crazy in NZ and are destroying
  108. much of the native forest.  In Australia the level of toxins in the tree leaves
  109. that they eat keeps a reasonable balance, but in NZ they munch up almost
  110. everything and are in plague proportions.  On the west coast of NZ approaching
  111. Hokitika we went along one section of road where there were squashed possums
  112. every meter or so. 
  113.  
  114.      Most programming work around here has been on Editors in various versions.
  115. Ever since the coming of the AVPC, developments in this area have been driven
  116. by the 80-column versions, with the 40-col following along as best it can.
  117. Most recent releases have been the Vn 5.01 80-column version with large 64 Kb
  118. buffer in 9938 VDP extension VRAM.  To put this in user terms, I have combined
  119. all the 80-col documentation into a single file 310 sectors long on disk which
  120. still leaves more than 10% of the text buffer free.  I am currently working on
  121. a symmetrical "editring" version which replaces the large DiskReview type of
  122. View buffer with a second text buffer with exactly the same properties as the
  123. first one.  It can still be used as a View buffer if desired, but with exactly
  124. the same capacity and edit and search functions as the first buffer.  I think I
  125. finally slew all the RS bugs in the 40-col ED/AEH version last night and
  126. e-mailed off the corrected version in TIED form to Charlie this afternoon.  By
  127. the time you read this you will have seen it at the Lima MUG or have received
  128. it in the Lima UG distribution.  
  129.  
  130.      Now if you have 80-col capability you will have found that it works as
  131. well as the earlier regular size buffer versions despite the greatly increased
  132. capacity.  A preliminary test is sue of this was set up for programmers' editor
  133. function only because buffer handling speed was such that word-wrap mode would
  134. not have been realistic.  So what has changed? The test version used VDP RAM as
  135. just a larger buffer for text data, but separated this from the line table
  136. which was kept in CPU RAM.  The large size combined with the inherent
  137. inefficiencies of reading and writing to VDP memory slowed down buffer
  138. manipulation functions to a degree unacceptable in a general purpose editor.
  139. The next step was clear as I was also looking to the future of using CPU RAM
  140. expansions, which of necessity page in numerous smaller blocks of RAM, and only
  141. one of these can be addressed at a time at a given address.  VDP memory is
  142. different in that though there is a 16 Kb bank size built in, reads or writes
  143. can auto-increment over the whole range which is what was done in the test
  144. P/E-only issue. 
  145.  
  146.      So what we are facing is the design of a buffer manager that can handle a
  147. banked or segmented buffer structure.  There are gains to be made here, because
  148. if only a one or two segmen ts have to be attended to at a time, even if there
  149. is overhead in deciding just which segments, we may well come out way ahead on
  150. the amount of buffer shuffling that has to be done.  I have talked about how
  151. TI-Writer type editors handle buffer management in previous writings, but I
  152. will give a brief summary here.  The design concept is to keep the buffer
  153. manager as a separate layer with a small set of defined interface routines
  154. called by the edit code.  This has been extended in the segmented model by
  155. another layer which is called by the previously defined buffer functions, and
  156. the edit code remains blissfully unaware of the details of the text buffer.
  157. The exception to this statement was the buffer initialization called by Purge
  158. which acted directly on the buffer pointers. 
  159.  
  160.        The original TI-Writer defined a set of line oriented services, and was
  161. not particularly tightly written and even very inefficient for block functions.
  162. The general structure of the one piece text buffer is a downwards growing table
  163. of line pointers to an upwardly growing pile of compacted ("squished") lines.
  164. No gaps are left in this pile.  It is shuffled down when a line is deleted, and
  165. new lines are added to the top.  Text buffer full occurs when the two collide.
  166. These services are B LWP calls to 
  167. INSTLN -- adds a new line to the buffer and inserts a new entr y in the line
  168. table. 
  169. DELTLN -- deletes a line by removing it from the text pile, an d adjusts all
  170. line pointer references as necessary. 
  171. UPDTLN -- replaces the modified line with the new one, deletin g the old and
  172. inserting a new line if necessary. 
  173. GETLN -- fetches and unsquishes an existing line from the text bufer. 
  174.  
  175.      These have a small cast of supporting BL routines, to generate line
  176. numbers, locate lines in the buffer, check for possible overflow, adjust the
  177. line table, and to do mass moves of the text buffer.  Later versions of the
  178. Funnelweb editors added some block oriented BLWP services to improve handling
  179. blocks o f lines for Copy and Delete which was handled with appalling slowness
  180. by the original TI written code.  Another BL service, MVLINS was added to
  181. optimize line table block shuffles as need ed for the Move lines function,
  182. which now occur rapidly with no risk of overflow (TI's terrible original code
  183. first copied the bloc k line by line and then deleted the original also line by
  184. line). 
  185. DLBLOC -- deletes blocks of lines by contiguous blocks in the text buffer, and
  186. is very much faster for a well ordered buffer, and usually much faster than
  187. doing it line by line.  In the worst case it is no better than the original,
  188. but in practice the text buffer is rarely so disordered. 
  189. CPBLOC -- copies a block of lines by making tentative additions of the copied
  190. lines and their pointers beyond the existing contents.  If buffer overflow
  191. would occur the attempt is abandoned with no changes, and if successful only a
  192. single reshuffle of the pointer table is necessary. 
  193.  
  194.      Now in the new segmented buffer model, the edit code sees exactly this
  195. same interface.  The new buffer manager introduces a layer of services below
  196. this, the segment manager.  A variation that had already been made in the
  197. P/E-only large buffer test issue was that the line table occupied its own area
  198. of CPU RAM in high-mem, and line table overflow became a separate issue from
  199. text overflow.  The capacity was made large enough to cover most normal usage
  200. of a 64 Kb text buffer.  It was found desirable to introduce seven new BLWP
  201. services for the segment manager. 
  202. INISEG -- sets up the data tables and pointers for the segment ed buffer
  203. structure.  This is called by the Purge routine in the main code, and isolates
  204. all details of the buffer from the caller. 
  205. FNDSEG -- locates and returns segment data for the segment containing the
  206. particular line requested by line number. 
  207. GETSEG -- returns the data for the first segment it can find w ith enough room
  208. for the line to be stored. 
  209. TMPSEG -- sets up a temporary segment data table for use by the block copy
  210. function. 
  211. MAXSEG -- locates the temporary segment with the most room left to see what
  212. size of contiguous block can be stored in one hit. 
  213. UPDSEG -- updates the permanent segment table for a successful block copy that
  214. does not cause overflow. 
  215. FRESEG -- returns data for the SD display showing text buffer and line table
  216. free. 
  217.  
  218.      As you can see it is the Copy Block function alone that is responsible for
  219. 3 out of 7 of these.  Deeper below these still are the routines for setting up
  220. bank switching and VDP addressing.  These are of no concern at all to the edit
  221. code, and would change drastically if a different form of banked memory were
  222. used.  The manager currently assumes a 64 Kb fully byte addressed buffer as its
  223. model, segmented into from 2 to 32 segments of uniform size in binary sequence.
  224. This allows for a 2 Kb minimum size which would be appropriate for the banked
  225. memory in Horizon family RAMdisks.  The Vn 5.01 editor as issued uses 4 Kb
  226. segments, a size chosen deliberately not to match the 16 Kb banks of VDP.  The
  227. segment size can be altered by a single dat a word in the program, but I have
  228. not yet had the time to experiment to find the optimal segment size. 
  229.  
  230.      The next stage of development beyond the 2 file edit-ring using VDP is to
  231. extend the edit ring approach to banked RAM devices of one sort or another.
  232. With this it would also be possible to extend the large buffer model to the
  233. 40-col version.  Whether that effort is worth it or not, I am still not sure.
  234. Immediate plans are to use a 192 Kb HRD for this purpose, as I have one of
  235. these spare for use as a memory expansion.  The Quest RD would make a good
  236. candidate as it has a simpler CRU banking structure, but I am short of RAMdisk
  237. space and cannot spare it .  The AMS looks too small at 128 Kb to be of more
  238. than limited interest now that the edit-ring idea is up and running, as it
  239. would support only a single full 64 Kb buffer in this size.  Talking of that
  240. device, I know it only from description, but the opinions expressed in the last
  241. Letter were carefully considered.  The article from Jim K in the Feb/94 BB&P
  242. missed the point in its highly polemical defense of the design decision (flawed
  243. in my view) not to have a DSR ROM.  The comments I made on this in no way
  244. implied that a DSR was necessary for memory access via DSRlink search and DSR
  245. routine execution though Jim K seems to be stuck on this model as a straw man
  246. to tear apart.  What a DSR could and should provide at the very least is test
  247. functions, and as a report I have seen from Germany on the AMS card indicates,
  248. initialization function for warm restarts as well.  It does not really matter,
  249. as the path of memory expansion for general purpose use around here will of
  250. necessity be the surplus small HRD. 
  251.  
  252.      If you are curious when and where this is being written, I am at home on
  253. my TI-99/AVPC, with the radio playing Lester Flatt tunes on the ABC's Sunday
  254. night country music program - which much to my liking tends to play a lot of
  255. bluegrass, the C&W stuff itself not being of much interest.  I did start to
  256. write it on the PC as it will be e-mailed via my office PC to Ohio when do ne,
  257. but I find I like using the FW Editor much better than any PC editor I have, so
  258. I will put up with the extra step of transferring it to PC disk.  
  259.  
  260.        Tony McGovern 
  261.        Funnelweb Farm 
  262.        May / 01 / 94  
  263.        e-mail -- phpam@cc.newcastle.edu.au 
  264.        Delphi -- GLOBAL01 
  265.