JoeOS: I'm gonna try some OS Development

Started by Joe, June 16, 2005, 10:19:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Joe

Shut up Sidoh. Lets see you write something better. Thanks for the input c0n, I'm trying to get that working. Warrior gave me some code, but its fucked up big time. He went to lay down, and I'm working with Darkness now.
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


Joe

Want your own copy of JoeOS?! Well, you're high. Anyhow, download this, unzip it, and execute make. (You're going to need a floppy disk in fd0, probably a:).
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


Warrior

Kernel was always easier for me provided I have a good exception handling system for my messups and a semi decent Library
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Joe

#18
c0n, you probably haven't knoticed yet, but Mangix is a moron who has trouble with VisualBasic. Anyone know whats wrong with the following code? It doesn't do jack shit except hang.

;-----------------------------------------------------------------------------------------
; These are my string constats. 0x01 is a smily face, 0x0D is a CR, 0x0A is a LF, and 0x00
; is a null terminator. Anything in quotes is the text of the string.
msgwelcome       db "Welcome to JoeOS by Joe[x86]! ",            0x01, 0x0D, 0x0A, 0x00
msghalt          db "Bootloader halted.",                              0x0D, 0x0A, 0x00
msgshutdownsafe  db "It is now safe to shutdown your computer.",       0x0D, 0x0A, 0x00
msgnewline       db                                                    0x0D, 0x0A, 0x00

; ----------------------------------------------------------------------------------------
; Here is the information that shows the processor where the origin of the bootloader is,
; and how many bits we're using.
[BITS 16]     ; This tells us we are using 16 Bits
[ORG 0x0]     ; Origin = 0x00
jmp 0x7c0:start ; Set start to 0x07C0 and start the procecdure "start" there

;-----------------------------------------------------------------------------------------
; This is my start procedure. This initiates the operating system environment, and calls
; my print procedure to display some messages
start:
  xor ax, ax
  mov ax, cs
  mov ds, ax
  mov es, ax
  mov fs, ax
  ; Here I set the value of ax, ds, es, and fs to 0. I cant access these directly, so I xor
  ; ax to make it zero and move it to each of them.

  mov si, msgwelcome
  call print
  ; "Welcome to JoeOS by Joe[x86]! (smile)"

  mov si, msghalt
  callcprint
  ; "Bootloader halted."

  mov si, msgshutdownsafe
  call print
  ; "It is now safe to shutdown your computer."
 
jmp $ ; Hang
times 510-($-$$) db 0   ; This fills the rest of unused space with 0s
dw 0xAA55               ; Include bootloader signature

;-----------------------------------------------------------------------------------------
; Here is the print procedure I will be using. Written by Warrior[x86]. Broken. =/.
print:
  mov ah, 0x10
  mov bh, 0x00          ; Page = 0
  mov bl, 0x09          ; Color = Blue
  lodsb                 ; Load SI into AL
  cmp al, 0             ; If we hit a null terminator..
  je .Done              ; Go to the label ".Done"
  int 0x10              ; print the character
  jmp print             ; print until the whole string is printed
  .Done:                ; The label ".Done"
ret



EDIT -
OMG WTF I FOUND DEE PROBLEM IT IS 528 KB NOT 512 WTF HELP ME FIX IT WAR!~
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


Joe

If you want to tear me down, do it somewhere where I'm not a moderator. Get out of my forum or be positive towards my projects.
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


Warrior

I'd think that the far jump would set the CS register *shrug* I lost my source so it's hard to tell what you're doing wrong.

You put your print procedure under the code that fills the rest with zeros so yes, you will step out of the 512 byte limit.

Smooth.
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Joe

Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


Warrior

Look up int 13h, you're going to want to have a second stage loaded soon
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Joe

Have these IA-32 processors learned nothing of my stubbornness? Well, looks like they gave up. It works now. I don't have my working bootloader in the zip yet, because it takes forever to upload over SFTP, but download the zip and replace the bootloader.asm file with this if you wanna check it out.
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


Joe

Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


zorm

Are you testing on an old system or in something like VMWare or Bochs?
"Frustra fit per plura quod potest fieri per pauciora"
- William of Ockham

Warrior

He has a test bed. Bochs is handy for it's useful debug messages and ability to emulate floppys, cdroms, etc.. and even has the ability to plug in additional BIOS's. Oh yea it's open source. 2.2 came out not too long ago :]
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Blaze

I just tried joes os.  The coolest thing there was the smiley.
And like a fool I believed myself, and thought I was somebody else...

Joe

Zorm, I'm testing on a Compaq Presario CDS 520 (an old computer), and occasionally VirtualPC and my bros Dell Dimension 2300.

Warrior, I never got Bochs to work, but I have it installed. VPC likes to kill my modem driver. Wanna help me get Bochs to work? Thanks!

Damn right, Blaze. Go Palio! Oh wait, did I just agree with being torn down? Pfft, you suck Blaze! <3.
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


Joe

I have successfully loaded my pre-kernel from my floppy disk, so I am out of developming my bootloader, and am no longer restricted by Real Mode and the 512K bootloader limit. I should be able to enter Protected Mode and load a kernel now, however I'll save that for tomorrow. Aparently I've passed c0n at OS development, and thats enough for the first two days, if you ask me. I'm going to bed, cya tomorrow Warrior.
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.