Author Topic: Far procedures and labels  (Read 2959 times)

Alfonso V

  • Guest
Far procedures and labels
« on: June 23, 2005, 01:51:23 PM »
I'm trying to do an interrupt handler and i need make a far procedure, something like this:

NuevaInt21h:
  STI
  PUSHF
  DB        9Ah
  OldInt21h DD 0
  CLI
  INC       BYTE [NumTeclas]
IRET                        

But "LDS       DX, OldInt21h" fails me. How can do it?

Thank you

nobody

  • Guest
Re: Far procedures and labels
« Reply #1 on: June 23, 2005, 06:39:11 PM »
> "LDS DX, OldInt21h" fails me. How can do it?

Try:

LDS DX, [OldInt21h]

----------
nmt

Alfonso V

  • Guest
Re: Far procedures and labels
« Reply #2 on: June 24, 2005, 07:37:07 AM »
I've done yet and fails too. It est, compiler gives me an error: "invalid combination of opcode and operands". Also i have put next code:
  MOV       AX, WORD [OldInt21h+2]
  MOV       DS, AX
  MOV       DX, WORD [OldInt21h]

With this, compiler goes well, but executable don't work properly because NTVDM gives an error.

Cheers

Alfonso V

  • Guest
Re: Far procedures and labels
« Reply #3 on: June 24, 2005, 07:45:21 AM »
I'm sorry

I have put it now right and goes right. I've put "LDS [OldInt21h]" instead "LDS DX, [OldInt21h]". An owful mistake, i'm sorry.