contents   index   previous   next



Dos.asm(buf[, ax[, bx[, cx[, dx[, si[, di[,

   ds[, es]]]]]]]])


buf - a byte buffer.


ax, bx, cx, dx, si, di, ds, es - registers.



number - long value for whatever is in DX:AX when buf returns.



Make a far call to the routine that you have coded into buf. ax, bx, cx, dx, si, di, ds, and es are optional; if some or all are supplied, then the ax, bx, cx, etc... will be set to these values when the code at buf is called. The code in buf will be executed with a far call to that address, and is responsible for returning via retf or other means. The ScriptEase calling code will restore ALL registers except ss, sp, ax, bx, cx, and dx. If es or ds are supplied, then they must be valid values or 0, if 0 then the current value will be used.



// The following example uses 80x86 assembly code

// to rotate memory bits:


   // return value of byte b rotate count byte

function RotateByteRight(b, count)


   assert( 0 <= b && b <= 0xFF );

   assert( 0 <= count && count <= 8 )

   return asm(`\xD2\xC8\xCB',b,0,count,0);


   // assembly code for would look as follows:

   // ror al, cl D2C8

   // retf CB