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.
where B800h is the segment and offset is 0
because in real mode addresses are segment shifted left 4 bits + offset
shifting left 4 bits is the same thing as multiplying by 10h (16 in decimal)
800h shifted left by 4 becomes B8000h + offset 0
(B800h*10h)+0h=B8000h
where B800h is the segment and offset is 0
because in real mode addresses are segment shifted left 4 bits + offset
shifting left 4 bits is the same thing as multiplying by 10h (16 in decimal)
800h shifted left by 4 becomes B8000h + offset 0
(B800h*10h)+0h=B8000h
Ah, thanks I knew It was simple but the kernels I have previously coded were already in pmode + I used C. Im attempting to make a real mode OS (Don't care much about the memory limits). So far I managed to make bootsector load the kernel and save itself to HDD.
Edit: after trying that code it says:
error: invalid segment override
the same error I got when I was trying
mov B800h, 'c'
Ill try to see if the info is on video memory and then I'll report back here and ask again.
btw Dex terrific job you've done with DexOS
edit: hehe.. im such an idiot my original code or the one Dex posted was working but I missed it on the screen.. I need to get myself some glasses eh ?
I have done that myself and thanks for comment on DexOS.
As a side note, i written a small realmode OS, as a OS tut, it's open source and fully commented, it a basic Dos clone, that can run some old Dos games.
The idea is everyone that leans from it, can add another int 21h function, or it may help you with your OS.
Its called MiniDos you can get it here: http://board.flatassembler.net/topic.php?t=5275&start=0
Dex wrote:I have done that myself and thanks for comment on DexOS.
As a side note, i written a small realmode OS, as a OS tut, it's open source and fully commented, it a basic Dos clone, that can run some old Dos games.
The idea is everyone that leans from it, can add another int 21h function, or it may help you with your OS.
Its called MiniDos you can get it here: http://board.flatassembler.net/topic.php?t=5275&start=0
Ye that will definitely come in useful... A DOS clone is exactly what Im attempting to write but I failed to find any source code (not that I looked for more than 10 minutes, I'll admit to that) that might tell me how the internal workings tick on DOS.