Try to begin an os.

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.
Post Reply
torx
Posts: 7
Joined: Sun Sep 21, 2014 7:39 am

Try to begin an os.

Post by torx »

Hello, sorry for my english i'm a french.

I'm reading a french tutorial to create an os, here : http://a.michelizza.free.fr/pmwiki.php?n=TutoOS.
And i 'm actualy on this step : http://a.michelizza.free.fr/pmwiki.php? ... S.Bootsect

The program works on Bochs, but when i write this on a floppy disk 3.5" (like that : http://djug.developpez.com/rsc/floppy.jpg)

And when i run an other pc with priority boot on floppy disk, i have this famous error : http://img15.hostingpics.net/pics/728028IMAG0092.jpg

I have try on an other pc with an other floppy disk 3.5", and the same floppy disk 3.5" : http://img15.hostingpics.net/pics/295141IMAG0094.jpg

A floppy disk give the error in english and the other give in french ^^. I know this error, there are not other device plug on my tests pc, and when i unplug my floppy disk and press any touch, the pc run normaly. But i want use this disk !!!

Some help please ?

GoodBye
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Try to begin an os.

Post by Combuster »

when i write this on a floppy disk
The tutorial has no instructions for that. What did you invent for this step, because it's probably the point where it goes wrong.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
torx
Posts: 7
Joined: Sun Sep 21, 2014 7:39 am

Re: Try to begin an os.

Post by torx »

Hello, thank.

hum yes, when he said :
tutorial wrote:Ensuite, pour tester notre secteur de boot, nous pourrions l'écrire sur une disquette et rebooter notre machine préférée avec la disquette dedans.
I have interpreted than : after this command "nasm -f bin -o bootsect bootsect.asm", write the bootsect file on a floppy disk.

So if i understand, i must do some searches with "how to bootable floppy disk" key word, to creat a bootable floppy disk ?
User avatar
SoLDMG
Member
Member
Posts: 96
Joined: Wed Jul 23, 2014 8:00 am
Location: The Netherlands
Contact:

Re: Try to begin an os.

Post by SoLDMG »

Tu utilise Windows? 32 ou 64 bit? Parce que je sais deux méthodes pour écriver les floppys avec Windows.
My post is up there, not down here.
torx
Posts: 7
Joined: Sun Sep 21, 2014 7:39 am

Re: Try to begin an os.

Post by torx »

Salut, je test sur un windows 32 bit, et un ubuntu 32 bit.
User avatar
SoLDMG
Member
Member
Posts: 96
Joined: Wed Jul 23, 2014 8:00 am
Location: The Netherlands
Contact:

Re: Try to begin an os.

Post by SoLDMG »

OK. Tu connais le command "debug" (Windows)?
My post is up there, not down here.
torx
Posts: 7
Joined: Sun Sep 21, 2014 7:39 am

Re: Try to begin an os.

Post by torx »

Hum non, et je connais pas grand à msdos, si ça a un rapport.
En faite, je beaucoup travail plus sur linux, mon pc windows c'est plus pour des tests secondaire.
User avatar
SoLDMG
Member
Member
Posts: 96
Joined: Wed Jul 23, 2014 8:00 am
Location: The Netherlands
Contact:

Re: Try to begin an os.

Post by SoLDMG »

Oh. Je ne connais DD (unix), mais debug est software pour écriver les media (floppys, USB, etc.). Quand si tu utilise "debug <ton bootsect>" et alors "w 100 0 0 1", tu écrives le sector dans le floppy entre le location correcte.

Et je suis désole pour mon français médiocre.
My post is up there, not down here.
torx
Posts: 7
Joined: Sun Sep 21, 2014 7:39 am

Re: Try to begin an os.

Post by torx »

Ok merci beaucoup pour cette solution, je la garde de coté :). Mais j'essaye de tout faire moi même, avec le moins de logiciel possible, pour mieux comprendre le fonctionnement des ordinateurs.

Enfin j'essaye.

Je fait des recherches google mon créer une disquette bootable sur linux pour le moment.

Mais l'objectif final, est plutôt de faire une disquette bootable sur n'importe quel pc, même sans os dessus.

Et ton français et déjà pas mal ^^.
User avatar
SoLDMG
Member
Member
Posts: 96
Joined: Wed Jul 23, 2014 8:00 am
Location: The Netherlands
Contact:

Re: Try to begin an os.

Post by SoLDMG »

Ah, OK, bonne chanse!
My post is up there, not down here.
User avatar
thepowersgang
Member
Member
Posts: 734
Joined: Tue Dec 25, 2007 6:03 am
Libera.chat IRC: thePowersGang
Location: Perth, Western Australia
Contact:

Re: Try to begin an os.

Post by thepowersgang »

Could one of you post a summary of what was determined using English (just for the records). From a quick read (using my ancient and incomplete knowledge of french), it seems that the discussion centered around the use of the MSDOS debug command to write data to a floppy.

Debug is a pretty old tool, and unlikely to work properly in 64-bit windows. There are other tools that use NT APIs to write disk images to physical floppies, and there is a windows port of DD.
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
torx
Posts: 7
Joined: Sun Sep 21, 2014 7:39 am

Re: Try to begin an os.

Post by torx »

Sun Sep 21, 2014 10:50 am
  • SoLDMG wrote:Tu utilise Windows? 32 ou 64 bit? Parce que je sais deux méthodes pour écriver les floppys avec Windows.
    Do you use Windows ? 32 or 64 bit ? Because i know two methods to write on a floppy disk with Windows.

Sun Sep 21, 2014 10:56 am
  • torx wrote:Salut, je test sur un windows 32 bit, et un ubuntu 32 bit.
    Hi, i test on a Windows xp 32 bit and on a Linux Ubuntu 32 bit.

Sun Sep 21, 2014 10:59 am
  • SoLDMG wrote:OK. Tu connais le command "debug" (Windows)?
    Ok, do you know the "debug" command on Windows ?

Sun Sep 21, 2014 11:01 am
  • torx wrote:Hum non, et je connais pas grand à msdos, si ça a un rapport.
    En faite, je beaucoup travail plus sur linux, mon pc windows c'est plus pour des tests secondaire.
    Hum no, and i don't know very well msdos, if you speak about that.
    I work more on Linux, i use my Windows to do secondary tests.

Sun Sep 21, 2014 11:14 am
  • SoLDMG wrote:Oh. Je ne connais DD (unix), mais debug est software pour écriver les media (floppys, USB, etc.). Quand si tu utilise "debug <ton bootsect>" et alors "w 100 0 0 1", tu écrives le sector dans le floppy entre le location correcte.

    Et je suis désole pour mon français médiocre.
    Oh, i don't know DD (unix), but debug is a software to write on device (floppy, USB, etc.). When you use "debug <my bootsect>" and "w 100 0 0 1", you will write the sector on the floppy at the correct location.

    And i'm sorry for my french.

Sun Sep 21, 2014 11:19 am
  • torx wrote:Ok merci beaucoup pour cette solution, je la garde de coté :). Mais j'essaye de tout faire moi même, avec le moins de logiciel possible, pour mieux comprendre le fonctionnement des ordinateurs.

    Enfin j'essaye.

    Je fait des recherches google mon créer une disquette bootable sur linux pour le moment.

    Mais l'objectif final, est plutôt de faire une disquette bootable sur n'importe quel pc, même sans os dessus.

    Et ton français et déjà pas mal ^^.
    Ok thank you very much for this way, i will remember of this :). But i try to do all from scratch, without a lot of software, for a better computer comprehension.

    Hum, i try :/.

    Actualy, i'm doing google searches to create a bootable floppy disk on Linux.

    But my objectif is to create a bootable floppy disk on any computer, without operating system on this.

    And your french is not bad ^^.
torx
Posts: 7
Joined: Sun Sep 21, 2014 7:39 am

Re: Try to begin an os.

Post by torx »

For more clearly, i want launch this program on "any" computer.

File : bootsect.asm

Code: Select all

[BITS 16]  ; say to nasm than we wotk in 16 bits
[ORG 0x0]

; segments init in 0x07C00
    mov ax, 0x07C0
    mov ds, ax
    mov es, ax
    mov ax, 0x8000
    mov ss, ax
    mov sp, 0xf000    ; stack de 0x8F000 -> 0x80000

; print a message
    mov si, msgDebut
    call afficher


end:
    jmp end


;--- Variables ---
    msgDebut db "Hello world !", 13, 10, 0
;-----------------

;---------------------------------------------------------
; Synopsis: Print a characters string terminated by 0x0
; Entree:   DS:SI -> content the string
;---------------------------------------------------------
afficher:
    push ax
    push bx
.debut:
    lodsb         ; ds:si -> al
    cmp al, 0     ; fin chaine ?
    jz .fin
    mov ah, 0x0E  ; call service 0x0e, int 0x10 of bios
    mov bx, 0x07  ; bx -> attribut, al -> caractere ascii
    int 0x10
    jmp .debut

.fin:
    pop bx
    pop ax
    ret

;--- NOP to 510 ---
    times 510-($-$$) db 144
    dw 0xAA55
Create binary with "nasm -f bin -o bootsect bootsect.asm"

Write bootsect on a bootable floppy disk.
User avatar
SoLDMG
Member
Member
Posts: 96
Joined: Wed Jul 23, 2014 8:00 am
Location: The Netherlands
Contact:

Re: Try to begin an os.

Post by SoLDMG »

thepowersgang wrote:Could one of you post a summary of what was determined using English (just for the records). From a quick read (using my ancient and incomplete knowledge of french), it seems that the discussion centered around the use of the MSDOS debug command to write data to a floppy.

Debug is a pretty old tool, and unlikely to work properly in 64-bit windows. There are other tools that use NT APIs to write disk images to physical floppies, and there is a windows port of DD.
Debug isn't even included with Windows 64 bit, and it doesn't work, even under DOSBox (for me at least).
My post is up there, not down here.
Post Reply