Work with HTTP Requests with x86 Assembly in RealMode

Viewed 1095

Is there a way to perform an HTTP request in the Assembly language for Intel 8086 in RealMode (Work with DosBox)? Do Intel processors provide software interrupts, or access to a network driver?

Is there a place where I can find an explanation?

1 Answers

Do Intel processors provide software interrupts, or access to a network driver?

Software interrupts are only a special variant of a call instruction; this is not only the case for Intel (x86) processors but for any other kind of processors.

If you call int 10h you actually perform a special call instruction to some function stored on the ROM of the video card.

Typically there were no ROMs on network cards so there can be no interrupt calling code on the network card ROM.

However there were device drivers which "installed" own interrupts (example: int 33h installed by the mouse driver).

Dosbox seems to emulate some interrupt related to the IPX network protocol however I doubt that it emulates a real network card or anything related to the TCP/IP protocol.

Is there a way to perform an HTTP request in the Assembly language?

Having an emulator emulating a network card you could run MS-DOS, DR-DOS or FreeDOS and access a network card.

I already did so with VMware but I only used UDP and I mixed up C and assembly code: It is not easy!

You have to send raw ethernet packets which means you'll have to build the content of the whole IP packet yourself - and the TCP protocol is a lot more complex than the UDP protocol so HTTP would be very, very complex.

Doing all this in assembler would theoretically be possible but you would need a lot of time...

Related