1. BL, BH etc...

Hello all...
I've been making some handy mouse routines usding the dos interrupt #33,
but theres one that requires REG_AL and REG_AH to store information, but
machine.e only has REG_AX = 7 etc. as constants.

Does anyone out there know what REG_BL, REG_BH etc are?

thanks heaps :)

Mike Fowler - mike.fowler at nelsun.gen.nz
  o__ ---
 _,>/'_ ---
(_) \(_) ---
Tip for the month: Buy a flatbed scanner - great mouse pads.

new topic     » topic index » view message » categorize

2. Re: BL, BH etc...

> From: Mike Fowler <stoner at NELSUN.GEN.NZ>
> Hello all...
> I've been making some handy mouse routines usding the dos interrupt #33,
> but theres one that requires REG_AL and REG_AH to store information, but
> machine.e only has REG_AX = 7 etc. as constants.
>
> Does anyone out there know what REG_BL, REG_BH etc are?
>
> thanks heaps :)

Say you want Interrupt #10, Service #10, Function #07.

AH = #10
AL = #07

then,

regs[REG_AX] = #1007
regs = dos_interrupt(#10, regs)

Each register is 16 bits wide and can be divided into high and low.
REG_BL is REG_BX low 8 bits
REG_BH is REG_BX high 8 bits

Now have I confused you?

Greg Harris

new topic     » goto parent     » topic index » view message » categorize

3. Re: BL, BH etc...

MF> I've been making some handy mouse routines usding the dos interrupt
MF> #33, but theres one that requires REG_AL and REG_AH to store
MF> information, but machine.e only has REG_AX = 7 etc. as constants.
MF> Does anyone out there know what REG_BL, REG_BH etc are?
GH> Say you want Interrupt #10, Service #10, Function #07.
GH> AH = #10
GH> AL = #07
GH> then,
GH> regs[REG_AX] = #1007
GH> regs = dos_interrupt(#10, regs)

okay - ive got that.. thanks :)

GH> Each register is 16 bits wide and can be divided into high and low.
GH> REG_BL is REG_BX low 8 bits
GH> REG_BH is REG_BX high 8 bits

GH> Now have I confused you?

maybe... i _think_ i understand now... so if, say, REG_AX = #3F, then
REG_AL = #3, and REG_AH = #F ???

or am i dreaming?

Thanks again :)

Mike Fowler - mike.fowler at nelsun.gen.nz
  o__ ---
 _,>/'_ ---
(_) \(_) ---
Tip for the month: Buy a flatbed scanner - great mouse pads.

new topic     » goto parent     » topic index » view message » categorize

4. Re: BL, BH etc...

At 22:53 29-08-97 GMT, you wrote:
>---------------------- Information from the mail header -----------------------
>Sender:       Euphoria Programming for MS-DOS <EUPHORIA at
>MIAMIU.ACS.MUOHIO.EDU>
>Poster:       Mike Fowler <stoner at NELSUN.GEN.NZ>
>Organization: NelSun BBS
>Subject:      Re: BL, BH etc...
>-------------------------------------------------------------------------------
>
>MF> I've been making some handy mouse routines usding the dos interrupt
>MF> #33, but theres one that requires REG_AL and REG_AH to store
>MF> information, but machine.e only has REG_AX = 7 etc. as constants.
>MF> Does anyone out there know what REG_BL, REG_BH etc are?
>GH> Say you want Interrupt #10, Service #10, Function #07.
>GH> AH = #10
>GH> AL = #07
>GH> then,
>GH> regs[REG_AX] = #1007
>GH> regs = dos_interrupt(#10, regs)
>
>okay - ive got that.. thanks :)
>
>GH> Each register is 16 bits wide and can be divided into high and low.
>GH> REG_BL is REG_BX low 8 bits
>GH> REG_BH is REG_BX high 8 bits
>
>GH> Now have I confused you?
>
>maybe... i _think_ i understand now... so if, say, REG_AX = #3F, then
>REG_AL = #3, and REG_AH = #F ???
>
>or am i dreaming?

  You're dreaming!

  To get the high part of a register (AH,BH,CH,DH) you should multiply by
256   not 16.
  say you want to put 45 in AH the r[REG_AX] = 45*256




Jacques Deschenes
Baie-Comeau, Quebec
Canada
desja at globetrotter.qc.ca

new topic     » goto parent     » topic index » view message » categorize

5. Re: BL, BH etc...

> maybe... i _think_ i understand now... so if, say, REG_AX =3D #3F, then
> REG_AL =3D #3, and REG_AH =3D #F ???
>
> or am i dreaming?

#=B73F is equal to #003F, so AH=3D#00 and AL=3D#3F, it isn't that
confusing...

Regards,
  Daniel Berstein
  danielberstein at usa.net
  http://www.geocities.com/SiliconValley/Heights/9316

new topic     » goto parent     » topic index » view message » categorize

6. Re: BL, BH etc...

GH> REG_BH is REG_BX high 8 bits
GH> Now have I confused you?
MF> maybe... i _think_ i understand now... so if, say, REG_AX = #3F,
MF> then REG_AL = #3, and REG_AH = #F ???
MF> or am i dreaming?
JD>   You're dreaming!
JD>   To get the high part of a register (AH,BH,CH,DH) you should
JD> multiply by 256   not 16.   say you want to put 45 in AH the
JD> r[REG_AX] = 45*256

thanks, Jacques. I've got it now. (at long last :)

so its back to the coding, i guess :)

I'll post my mouse routines ASAP, plus my other works :)

Mike Fowler - mike.fowler at nelsun.gen.nz
  o__ ---
 _,>/'_ ---
(_) \(_) ---
Tip for the month: Buy a flatbed scanner - great mouse pads.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu