home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 3,445 of 4,675   
   bilsch01 to All   
   text editor basics   
   28 Jun 18 16:52:15   
   
   From: king621@nospicedham.comcast.net   
      
   The underlying system is 16-bit real mode FAT16, 64 sectors/cluster.   
   Display is via the 4000 byte area at segment 0xb800. That area holds   
   2000 text bytes. I have text files from 15k to 135k size to experiment   
   with.  My program can find a desired file and load part (4096 bytes) of   
   it in memory.  I have some questions now about designing a simple text   
   editor. Questions regarding memory buffers.   
      
   1.  I believe I must decide on a maximum (MAX) file size it will work   
   with.  If the user tries to load a larger file (document) I must issue   
   an error saying to choose a file less than MAX.  I think a good size for   
   MAX might be 96k (3 clusters) but that might be too ambitious.  NOTE: I   
   don't know how much memory I can use before overwriting essential BIOS   
   information.  OS (text editor included) begins at 0x7e00.   
      
   2. Size of files in bytes vs size of files in clusters.  This program   
   must examine inside the last cluster of the file and determine where   
   text ends and where zeros begin and calculate file size (nonzero data in   
   last cluster plus n x 32768) and record that in the root directory entry.   
      
   3.  I must provide a memory buffer larger than MAX because editing can   
   add new text data which can exceed MAX size.  Call this MAXBUF.  What   
   should I consider in choosing MAXBUF size ?   
      
   4. I need a 'selection buffer' to hold chunks of text selected for copy   
   and insertion elsewhere in the document.   
      
   All suggestions will be appreciated.   TIA.   Bill S.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca