Using GCC you may put values into registers with inline assembler like so:
Code:
asm("mov $0xffff, %ax\n");
to load AX with 0xffff. However I don't think this will be very useful as the Dos function call 0x21 needs these values loaded into registers to tell it what to do. Just loading the registers with values isn't enough in Linux unless you are doing something clever with Dos emulation.
For example - the example you gave appears to be a Dos memory allocation call with the number of paragraphs in the BX register. You would have to translate this and other calls to suitable Linux calls if porting.