flat assembler
Message board for the users of flat assembler.

flat assembler > OS Construction > Where is the misstake???

Author
Thread Post new topic Reply to topic
joachim_neu



Joined: 22 Dec 2003
Posts: 139
hello,

where is the misstake in my files??? I would like, that the file kernel.bin with this inside in ASM:

Code:
org 100h
mov ax,0x1000
mov es,ax
mov ds,ax

mov si,nachricht
lodsb
or al,al
jz schreiben_d
mov ah,0x0e
mov bx,0x0007
int 0x10
jmp lesen
schreiben_d:
retn
lesen:
mov ah,0
int 16h
ret
db 0eah
dw 0000h
dw 0ffffh
nachricht db "Please press a key to REBOOT...$",24h                                                                                                                                                     


Whouldn't boot by this loader in file boot.bin:

Code:
;SpecialCommand Bootloader (C) COPYRIGHT by JOACHIM NEU 2003

start:
cli                  ; Keine Interrupts verwenden!
mov ax, 0x9000       ; Adresse des Stack speichern
mov ss, ax           ; Stackadresse festlegen
mov sp, 0            ; Stackpointer auf 0 setzen
sti                  ; Jetzt lassen wir wieder Interrupts zu
mov [bootdriv], dl
laden:                ; Mit dieser Funktion laden wir unsere Shell vom Bootlaufwerk
push ds
mov ax, 0
mov dl, [bootdriv]
int 13h
pop ds
jc laden
mov ax, 0x1000       ; 0x1000 ist die Speicheradresse unserer Shell
mov es, ax
mov ds, ax
push ax
mov ax, 0
push ax
retf
bootdriv db 0         ; Das Bootlaufwerk
loadmsg db "Lade VitaXia...",13,10,0

; Mit dieser Funktion geben wir einen String aus
putstr:
lodsb
or al,al
jz putstrd
mov ah,0x0E
mov bx,0x0007
int 0x10
jmp putstr
putstrd:
retn

load1:
mov ax,0x1000
mov es,ax
mov bx, 0
mov ah, 2
mov al, 5
mov cx, 2
mov dx, 0
int 13h
jc load1
mov si,loadmsg
call putstr
retn
times 0x1fe-$ db 00h
dw 0AA55h 
    


please help me

JOACHIM NEU
Post 25 Dec 2003, 16:49
View user's profile Send private message Visit poster's website Reply with quote
joachim_neu



Joined: 22 Dec 2003
Posts: 139
hello,
here is an other problem, make only the image with rawrite on a floppy an test it, the command COM doesn't work, an VER doesn't work right... Where is the problem???

JOACHIM NEU


Description: The ZIP-File with kernel.asm and boot.asm, witch are both in the image, boot.asm is compiled with NASM, because I've got it from an tut...
Download
Filename: sc.zip
Filesize: 21.05 KB
Downloaded: 154 Time(s)

Post 26 Dec 2003, 12:55
View user's profile Send private message Visit poster's website Reply with quote
Endre



Joined: 29 Dec 2003
Posts: 212
Location: Budapest, Hungary
Let's do it step by step. I comment you the code (see below), so you may find the problems. By the way this little code should work under DOS without your boot loader, so you can simply test it.

Gruß
Endre

Code:
org 100h
mov ax,0x1000      ; this three lines can cause problems
mov es,ax          ; since lodsb reads from ds:[si]
mov ds,ax          ; I suggest commenting them out 
                   ; or setting ds, es to cs

mov si,nachricht   ; load nachricht in si
lodsb              ; load character 'P' in al
or al,al           ; test if  'P' == 0 (it has low probability Smile
jz schreiben_d     ; if 'P' is zero then finish
mov ah,0x0e        ; else print it out
mov bx,0x0007      ;
int 0x10           ;
jmp lesen          ; the whole lesen rutine should be here
schreiben_d:       ; finish
retn
lesen:
mov ah,0           ; wait for a key
int 16h
ret                ; finish
db 0eah
dw 0000h
dw 0ffffh
nachricht db "Please press a key to REBOOT...$",24h ; where is the 0 from the end? You test for it above.
    
Post 01 Jan 2004, 14:41
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.