Re: fresh question: dos_interrupt()

new topic     » goto parent     » topic index » view thread      » older message » newer message

Alan Tu wrote:

> The constants defined in machine.e for dos_interrupt() don't make sense.
> For example, there's no AH, but it seems AH is equivalent to AX in
> Euphoria.  I don't get it.  Could someone please help?

Ahah!  Something I can understand!  <g>  AH is IN AX but is not the SAME as
AX.  Basicly, put it this way, AX = { AH, AL }.  What's going on here is
that you can adjust both the high and the low byte of AX by referring to AH
and AL (in assembly, etc).  So,...  If you need AH to be (for example) 32
and AL to be (fe) 128, then AX = 32 * 256 + 128.  Er, you work it out.  If
you don't care about AL or want it zero, simply make AX=256*AH.  In
Euphoric,

function makeAX(AH,AL)
    integer AX
    AX=256*AH+AL
    return AX
end function

myvar1 = makeAX(var1,0)
myvar2 = makeAX(var2, var2b)

The same goes for BX,CX,DX.  BX=BH*256+BL.  CX.....  etc.

Sorry this got so long and hope it helps.  ;')

\/\/ood/\/\age

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu