Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Accessing register values...
#1
A subroutine I'm porting from C is passed values from various registers. I'm using FB DOS for this. How would I access the value of the register at the time it is needed? Also, the value the subroutine takes is an unsigned long (32-bit) -- filling the parameter with a 16-bit register value wouldn't work too well, would it?

Anyone? Thanks.
color=blue]subxero - admin at this place.[/color]
Reply
#2
What is that, a library? It has to be recompiled with GCC, FB can't use other "conventions" like VC's fastcall or such.

If you can't recompile it, then only inline asm can be used, making it hard to port and to maintain, course.

asm mov somereg, [somearg]
asm call someproc

If someproc is cdecl, then the stack must be cleaned up, etc.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)