Hello all,
I am attempting to create an assembly program (for a class) on OpenBSD. The
teacher has no issue with me developing the code based on the UNIX-based
assembly (int 0x80 syscalls vs. int 0x21 Dos Function), but he does not want
me to use 32-bit code. I believe this has something to do with him wanting me
to use a "Real-addressing Mode" as opposed to the 32-bit protected mode. I'm
doing x86 assembly.Now, I can create nice and working 32-bit OpenBSD elf executables using yasm
and so on. It took a bit of work to understand how to do it, but other than
that, it works fine. Now, the issue I am having is that I can't figure out how
to instead write 16-bit code. Basically, the teacher should be happy if I
don't use the extended registers. Reading in the Yasm documentation, I found
the BITS directive, and also the note that it should not be necessary to use
this directive, since the object file format I choose should automatically
handle this. The `obj' format was indicated as one of the file formats that I
should use. However, the yasm assembler in OpenBSD does not have that as a
valid format. Also, there seems to be no way to generate 16-bit OpenBSD
executables. Is this true?My basic question is, how can I create an assembly program using that will run
on OpenBSD that is 16-bit (that is, using only the non-extended registers)?Any help would be greatly appreciated, as searching online has confused me
royally as to whether this is even possible or not. It seems like it should be.--
((name "Aaron Hsu")
(email/xmpp "arcfide@sacrificumdeo.net")
(phone "703-597-7656")
(site "http://www.aaronhsu.com"))
