Help With Patricknet Development

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.
PatrickV
Member
Member
Posts: 151
Joined: Sun Jul 06, 2008 7:50 pm
Location: New Zealand
Contact:

Help With Patricknet Development

Post by PatrickV »

Hey Guys.
I found this image from the osdevr.net site. It is a pre compiled grum.ima The kernal i 've posted mad a few changes and made it so the it is kernel.bin and sticked it on the image but i run it to this problem. It says the something to do with memory i will post my kernel code and screen shot. Plus the kernel is 512 bytes. I need all the help i can get to get the beta 0.0.2 out

My Code:

Code: Select all

;Patricknet Bootsector
;Built By Patrick V(Project Manager)
;Bootsector is opensource

[bits 32]
[org 0x7c00]
jmp Start
; Message Strap
msg		db "Patricknet - Version: Beta 0.2 (15/9/2008)",13,10,0
Start:
	xor ax,ax
	cli
	mov ss,ax
	mov sp,0x7C00
	sti
		
	mov si,msg               
	call printdriver


printdriver:     
	mov ah,0x0E
	mov bh,0x00
	mov bx,0x07
	printdriverloop:
		lodsb
		or al,al
		jz short printdriverend
		int 0x10
		jmp printdriverloop
printdriverend:    
	jmp printdriverend		; return to caller

padding     TIMEs 510-($-$$) db 0
;Flag Point Form Bios To Notice That This A Patricknet Boot Sector Is Vaild By Signature
Dw 0AA55h

Attachments
1.JPG
User avatar
cr2
Member
Member
Posts: 162
Joined: Fri Jun 27, 2008 8:05 pm
Location: ND, USA

Re: Help With Patricknet Development

Post by cr2 »

Umm.... you can't use BIOS interrupts in protected mode. :roll:

and... delete the "TIMES" macro, the dw 0xAA55, and all the "org" stuff(GRUB will do this for you). it might help, you're not writing a stage1 bootloader here(at least it doesn't seem that way).
Last edited by cr2 on Sat Oct 25, 2008 1:02 pm, edited 1 time in total.
OS-LUX V0.0
Working on...
Memory management: the Pool
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Re: Help With Patricknet Development

Post by 01000101 »

you have what looks like a stage 1 bootloader, and if it isn't, it's pretty close. So if you went through the trouble to write all the ORG, signature, padding, real-mode print code, why are you trying to use grub as you obviously aren't doing it for the PMode benefits.
PatrickV
Member
Member
Posts: 151
Joined: Sun Jul 06, 2008 7:50 pm
Location: New Zealand
Contact:

Re: Help With Patricknet Development

Post by PatrickV »

Thanks i will clean it up. I understand that you cann't make bios int calls. So what do you do when you print text. It seams you are telling that little bios int screen driver i wrote wont work. So what do i use instead.
PatrickV
Member
Member
Posts: 151
Joined: Sun Jul 06, 2008 7:50 pm
Location: New Zealand
Contact:

Re: Help With Patricknet Development

Post by PatrickV »

Some more updates of my kernel I took bit and peaces away and i know i still have to do something about not using bios calls. Here is my update of my kernel and screen shot error

Update Kernel:

Code: Select all

;Patricknet Kernel
;Built By Patrick V(Project Manager)
;This Patricknet Kernel Version Is Opensource
;Kernel Build (10/10/2008)

[bits 32]
jmp Start
; Message Strap
msg		db "Patricknet - Version: Beta 0.2 (10/10/2008)",13,10,
		db "Kernel Version Build: (10/10/2008)",13,10,0
Start:
	xor ax,ax
	cli
	mov ss,ax
	mov sp,0x7C00
	sti
		
	mov si,msg               
	call printdriver


printdriver:     
	mov ah,0x0E
	mov bh,0x00
	mov bx,0x07
	printdriverloop:
		lodsb
		or al,al
		jz short printdriverend
		int 0x10
		jmp printdriverloop
printdriverend:    
	jmp printdriverend		; return to caller
Error Screen Shot On Runtime:
2.JPG
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: Help With Patricknet Development

Post by Troy Martin »

Printing to Screen </shameless plug>
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
kubeos
Member
Member
Posts: 138
Joined: Tue Jan 30, 2007 2:31 pm
Location: Kamloops BC, CANADA
Contact:

Re: Help With Patricknet Development

Post by kubeos »

PatrickV
Member
Member
Posts: 151
Joined: Sun Jul 06, 2008 7:50 pm
Location: New Zealand
Contact:

Re: Help With Patricknet Development -ERGENT

Post by PatrickV »

Sorry for bumping up this topic. It was better for me to do this and start a whole new topic. Here what been happening lately witth Beta0.2
I followed this:
kubeos wrote:http://wiki.osdev.org/Bare_bones
I got so close to get something work on GRUB. The problem is compiling and linking. In barebones you comple the "C" code with gcc and Link it with "LD" Which they are linux based which i tried a virtual machine with linux to get those 2 software to work. But that fails. I've tried cygwin but the installer crashes. Have you got any ideas to help me out. I would like a tool on windows will be beter. Barebones only helps on linux.
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Re: Help With Patricknet Development

Post by 01000101 »

DJGPP is what I used to use when I developed on a Windows machine.

homepage:
http://www.delorie.com/djgpp/

and for a list of the packages you will need:
http://www.delorie.com/djgpp/doc/ug/int ... djgpp.html

just get those packages, unzip the archives, set your environment variables, and use gcc/binutils
PatrickV
Member
Member
Posts: 151
Joined: Sun Jul 06, 2008 7:50 pm
Location: New Zealand
Contact:

Re: Help With Patricknet Development

Post by PatrickV »

Oh thanks. I will look into that. I hope this one will work. What about a linker because i need to link the multiboot header that is required by grub. I any suggestion 01000101 or anyone?
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Re: Help With Patricknet Development

Post by 01000101 »

http://www.delorie.com/djgpp/doc/ug/intro/installing-djgpp.html wrote: Basic Functionality:

v2gnu/bnu27b.zip
This is the assembler and linker, and a few other programs (like the librarian). You'll need these for all languages.
that package includes GAS (assembler) and LD (linker).
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Re: Help With Patricknet Development

Post by pcmattman »

When you say the Cygwin installer crashes, what exactly do you mean? It might be a problem with the copy you downloaded or something. I know it works perfectly for me (on Vista).
PatrickV
Member
Member
Posts: 151
Joined: Sun Jul 06, 2008 7:50 pm
Location: New Zealand
Contact:

Re: Help With Patricknet Development

Post by PatrickV »

Look. I can't do anything. djgpp won't allow me to access the download information form their site. so i am stuffed. I spent on saturday for 3 hours typeing diffrent command options of gcc on linux: "srcdir/gcc/configure" and "srcdir/configure" and i got now where because you have to set cc in envoroment which i have no clue about. face i and i don't ask people to compile and link if for an that will be a anoying. I just have problems not have the right tools for creating an 32 bit mode operating system. I need some help.
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: Help With Patricknet Development

Post by Combuster »

... and the error cygwin gives?
"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 ]
User avatar
babylon2233
Member
Member
Posts: 66
Joined: Fri May 23, 2008 5:30 pm
Location: Malaysia

Re: Help With Patricknet Development

Post by babylon2233 »

I don't really understand the problem that you faced when trying to use GCC on Linux. I'm expecting you want to compile those bare bone source code. I believe you just need a normal GCC in Linux. Maybe you trying to compile that GCC from source. It would help us to help you if you can give us details about your problem.

Can you please tell me which Linux did you use?
Post Reply