flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > HelloWorldOS in trouble |
Author |
|
JohnFound 13 Nov 2003, 15:30
Maybe you should clear D flag: "cld" instruction. I simply don't know what is D during boot process. Simply include "cld" as first instruction ans try.
|
|||
13 Nov 2003, 15:30 |
|
Ralph 15 Nov 2003, 04:03
I don't really remember how int 10h works, been a while since I did DOS programming, but I recommend you write directly to the VGA memory. You wont be able to use interrupts easily in protected mode, and if you plan on doing anything more than "hello world" you will need protected mode. Not sure if you're familiar with how that works, but a simple loop like this should do the trick:
Code: Print: MOV AH,0Eh MOV BX,String MOV CX,SizeofString MOV DI,0B800h MOV ES,DI SUB DI,Di _PrintLoop: PUSH AX XLATB STOSW POP AX INC AL LOOP _PrintLoop RET I haven't assembled that, so it might not work, in which case you may laugh at me for messing up 10 lines of code. Adding a CLD to the beginning of that like John mentioned would also be a good idea. Good luck. |
|||
15 Nov 2003, 04:03 |
|
merlin 17 Nov 2003, 16:00
@DennisB:
You forgot to set DS segment. |
|||
17 Nov 2003, 16:00 |
|
DennisB 17 Nov 2003, 19:33
Thx for all reply!
But I found the fault: I use loop but where is cx set? that's stupid of me. jmp should do a better job in this case But Ralph: I will test it and don't worry! I never laugh about anyones mistakes. _________________ The optimist finds to every problem a solution, The pessimist to every solution a problem |
|||
17 Nov 2003, 19:33 |
|
CodeWorld 19 Nov 2003, 04:38
DennisB wrote: Thx for all reply! you write OS? please write your ICQ... |
|||
19 Nov 2003, 04:38 |
|
terex 31 Dec 2003, 02:37
CodeWorld wrote: you write OS? please write your ICQ... Every russian guy, who studys assembler, exactly begins to write his own OS Me too |
|||
31 Dec 2003, 02:37 |
|
CodeWorld 31 Dec 2003, 05:37
terex wrote:
write CodeWorld@sysbin.com |
|||
31 Dec 2003, 05:37 |
|
terex 31 Dec 2003, 10:19
@CodeWorld: i would not to wrtie... Because the main aim of os-writing for me is take an expirence in low level protected mode programming and understanding a principles of modern os design.
|
|||
31 Dec 2003, 10:19 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.