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 4,315 of 4,675    |
|    Robert Prins to wolfgang kern    |
|    Re: Disassembly of old Turbo Pascal (V3)    |
|    19 Apr 21 01:26:54    |
   
   From: robert@nospicedham.prino.org   
      
   On 2021-04-18 09:29, wolfgang kern wrote:   
   > On 18.04.2021 11:09, Robert Prins wrote:   
   >> On 2021-04-17 21:50, Frank Kotler wrote:   
   >>> On 04/17/2021 06:07 PM, Robert Prins wrote:   
   >>>   
   >>> ...   
   >>>> Turbo Pascal V3 (and probably versions 1 & 2 too) created .COM files are   
   not   
   >>>> run-of-the-mill .COM files.   
   >>>   
   >>> As I recall, DOS doesn't care what the file is named. If the first two   
   bytes   
   >>> are "MZ", it's an exe. Perhaps we should not call it .COM?   
   >>   
   >> They are not MZ files, they are real COM files, be it that they do strange   
   >> things once loaded.   
   >>   
   >> Not that strange, given that "turbo.com", the original "IDE" did also handle   
   >> multiple segments (itself, and the image of the compiled program, when set   
   to   
   >> run from memory) Anders Hejlsberg, who originally wrote it, was (and still   
   is)   
   >> pretty brilliant guy.   
   >   
   > if they are real COM files then the segment info is found in the code.   
   >   
   > often seen start in com-files:   
   >   
   > org 0100h ;to override DOS default segment setting   
   > push CS ;the COM-loader grant a few bytes stack   
   > pop SS   
   > mov SP.xxxx ;wherever it's wanted to be   
   > push CS   
   > pop DS   
   > push 0   
   > pop ES   
   > ....   
      
   The info is there, but it's not as trivial as what you show. I'm sure that I   
   will be able to get at it at some stage to automagically create an skeleton IDC   
   file to generate the segments, after all I also got this bit of REXX,   
      
   === CUT ===   
   data = charin(file, 1, chars(file))   
      
   data = overlay(reverse(x2c(d2x(date('T', now, 'I') + 12 * 3600, 8))), data,   
   pos('PE' || x2c(00 00), data) + 8)   
      
   call charout file, data, 1   
   === CUT ===   
      
   that sets the timestamp in the PE files coming out of Virtual Pascal to 12:00   
   with "now" being the date of the newest source file.   
      
   Robert   
   --   
   Robert AH Prins   
   robert(a)prino(d)org   
   The hitchhiking grandfather - https://prino.neocities.org/indez.html   
   Some REXX code for use on z/OS - https://prino.neocities.org/zOS/zOS-Tools.html   
      
   --- 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