Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
mov ax,7C00h
cli
mov sp,ax
xor ax,ax
mov ss,ax
sti
Dedndave,
You don't need to load SP through AX. SP may be loaded with an immediate value. Also, if you load SP immediately after SS, then you don't need to clear and set the interrupt flag. After loading SS, interrupts will be automatically disabled for one instruction. The intended instruction for that is loading SP. So this will do:
quite right Roel - lol
i was totally asleep at the wheel
as for the cli/sti, i guess ms writes their boot sectors like that
so that they will still boot up on xt class machines
it has been a while since i have done this sort of stuff
thanks for the tip