Author Topic: Quick testing embedded on real hardware  (Read 10813 times)

Offline dreamaco

  • Jr. Member
  • *
  • Posts: 19
Quick testing embedded on real hardware
« on: July 09, 2011, 03:49:16 AM »
A DOS boot loader - Wraps code that was normally meant to boot up on a clean PC, into a .com DOS file.
This could be used to simulate a bootup at the DOS prompt, e.g. to speed up true hardware testing of OS or embedded systems.

One could very well question why? And the simple answer is of course when the glove fits..
This is clearly not for everyone but since this has prooved useful to many people already. And maybe to spark some ideas what is possible :)

it all boils down to DOS is not that way off.. instead sometimes its actually useful
NASM, DOS, a memorycard, a netbook, you could have lots of fun coding with only that.

About DOS
Note that the loader needs memory 7c00 and above to be free, and vanilla DOS normally is.
Though DOS are very sensitive to this even a mousedriver might shuckle up things. Its boils down to its sensitive to how config.sys and autoexec.bat is setup.
But when it works it seem to do so without failing. Tested on actual DOS hardware and DOSBOX. Which means you could have this setup on many platforms.

I would suggest an empty autoexec.bat and a config.sys containing only

device=himem.sys /testmem:off

This has worked for every machine or emulation so far I've seen.

Have a good one!

Code: [Select]
; Simple boot
ORG 0x100
mov ax,cs
mov ds,ax
mov si,Begin
mov ax,0x7c0
mov es,ax
mov di,0
mov cx,48 * 1024 ; Moves 48KB, change if needed. Max 63KB (actually 64KB -256 bytes of PSP of .com files and -36 bytes of this loader)
rep movsb
mov ax,0
mov es,ax
mov fs,ax
mov gs,ax
; mov dl,simulatedbootid
jmp 0:0x7c00
Begin: INCBIN "actualbootcode.bin"
« Last Edit: July 09, 2011, 04:38:32 AM by dreamaco »