home bbs files messages ]

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

   comp.lang.pascal.borland      Borland Pascal was actually pretty neat      2,978 messages   

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

   Message 2,834 of 2,978   
   Dr J R Stockton to All   
   Re: ASM + Pascal calling question   
   24 Feb 11 20:35:57   
   
   a675d43b   
   From: reply1108@merlyn.demon.co.uk   
      
   In comp.lang.pascal.borland message , Wed, 23 Feb 2011 13:43:42, Jim Leonard   
    posted:   
      
   >On Feb 23, 1:31 pm, Marco van de Voort  wrote:   
   >> On 2011-02-23, Jim Leonard  wrote:   
   >>   
   >> > I'm aware that TP7/BP7 pascal programs can call external assembler   
   >> > routines.  But is the opposite possible?  Meaning, can assembler   
   >> > programs call routines in precompiled pascal units?  C and assembly   
   >> > have this relationship (you can call C library routines from asm, and   
   >> > asm libs from C) but was curious if TP7+Tasm had this same   
   >> > relationship.   
   >>   
   >> Yes. Because of the same reason. Both C and Pascal are translated to   
   >> assembler, so in the compiled translation assembler already calls pascal/C   
   >> routines.   
   >   
   >What I meant was:  From my assembler program, can I link in routines   
   >from precompiled pascal units?   
   >   
   >I'm beginning to think not, but would like confirmation either way.   
      
      
   Undoubtedly it is possible, but you might have to write your own linker,   
   or a pre-processor for the Pascal, etc.   
      
      
   What might serve more easily is to take your ASM code, and drop it into   
   a Pascal program that reads essentially   
      
           { whatever makes code in your Pascal units available }   
           begin   
           ASM   
           { what you have in ASM, tweaked }   
           END   
           end.   
      
   That ought to work, but the tweak could be large, and your asm code   
   would need to understand the Pascal call interface.   
      
   --   
    (c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk  Turnpike v6.05  IE 8.   
    Web   - FAQ-type topics, acronyms, and links.   
    Command-prompt MiniTrue is useful for viewing/searching/altering files. Free,   
    DOS/Win/UNIX now 2.0.6; see .   
      
   --- 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