Mail Archives: djgpp/1997/11/13/10:46:23
Hi!
I'm making a simple ISR that will hook IRQ 0.
To set the ds to the correct value I read
___djgpp_ds_alias. This variable is relative to
the cs-segment.
How do I do something like:
mov ax, cs:[___djgpp_ds_alias]
I've tried:
cs:
movw ___djgpp_ds_alias, %ax
but it doesn't work. I get a sigsegv and in the dump
I can see that ds is set to an illegal value.
Allegro does it this way:
.byte 0x2e
movw ___djgpp_ds_alias, %ax
But I'd like a neater wayt than to use '.byte'.
'.byte' looks like a temporary solution.
Does anyone know if this is possible?
/Johan Levin
- Raw text -