home bbs files messages ]

Just a sample of the Echomail archive

Cooperative anarchy at its finest, still active today. Darkrealms is the Zone 1 Hub.

   PASCAL_LESSONS      Pascal Programming Lessons      361 messages   

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

   Message 326 of 361   
   Anton Shepelev to Anton Shepelev   
   TP 7.0 pointer passing convension   
   16 Feb 20 22:12:54   
   
   MSGID: 2:221/360.0 5e49a242   
   REPLY: 2:221/360.0 5e48573e   
   PID: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)   
   CHRS: IBMPC 2   
   TZUTC: 0200   
   I wrote:   
      
   > Here  is a fixed version, without redundant opera-   
   > tions and with single-byte write:   
   >   
   > procedure AtoB(a: byte; var b: byte);   
   > begin asm   
   >    MOV   ES,  [BP+2]  { store segment of b in ES }   
   >    MOV   DI,  [BP+4]  { store offset  of b in DI }   
   >    MOV   AX,  [BP+8]  { store a in AX            }   
   >    MOV  [DI],  AL     { assign AX to a           }   
   > end end;   
      
   Problem solved.  Here is the correct code in TP  as-   
   sembly:   
      
   procedure AtoBRef(a: byte; var b: byte);   
   begin asm   
      MOV   DI,     [BP+4]  { store offset  of b in DI }   
      MOV   ES,     [BP+6]  { store segment of b in ES }   
      MOV   AX,     [BP+8]  { store a in AX            }   
      MOV  [ES:DI],  AL     { assign AX to a           }   
   end end;   
      
   It works as advertised.   
      
   ---   
    * Origin: nntps://fidonews.mine.nu - Lake Ylo - Finland (2:221/360.0)   
   SEEN-BY: 1/123 90/1 103/705 154/10 203/0 221/1 6 242 360 226/16 227/114   
   SEEN-BY: 229/426 452 616 1014 240/5832 249/206 317 400 280/464 5003   
   SEEN-BY: 317/3 322/757 342/200 396/45 423/81 120 633/280   
   PATH: 221/1 280/464 229/426   
      

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


(c) 1994,  bbs@darkrealms.ca