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  [DS:DI],  AL     { assign AX to a           }
end end;