| 
   
    | ...write data to the printer port? |   
    | Autor: 
      Ramon Schenkel |  | [ Print tip 
] |  |  |  
 
 
procedure Out32(portadresse: Word; wert: Byte);var
 val: Byte;
 begin
 val := Byte(wert);
 asm
 push dx
 mov dx,portadresse
 mov al,val
 out dx,al
 pop dx
 end;
 end;
 
 function Inp32(portadresse: Word): Byte;
 var
 val: Byte;
 begin
 asm
 push dx
 mov dx,portadresse
 in al,dx
 mov val,al
 pop dx
 end;
 Inp32 := Byte(val) and $00ff;
 end;
 
 
 // Example/Beispiel:
 
 Out32($378, 0)  {= Dataport all 8 Bit Low}
 Out32($378, (Inp32($378) or 1); {Dataport Bit 1 High}
 Out32($378, (Inp32($378) and 254);  {Datap. Bit 1, Low}
 
 
 
   |