Running files
RE:Running files
u so full of damn questions
shut the hell up and make ur fuckin com, u moron
shut the hell up and make ur fuckin com, u moron
RE:Running files
Well, your first mistake was attempting to write an OS in C and Assembly, without actually knowing C or Assembly. That's about the equivalent of building the CN Tower without knowing anything about architecture.
Your second mistake was calling libc methods in an OS, which you must rewrite to exist in your own OS (you are, afterall, writting an OS...!). Last I checked 'run' wasn't a standard C function, either... and if it does, indeed, accept only 11 character names, then it's obviously an old DOS function... in other words, it's useless for OS development.
Third, scanf does _NOT_ only use lower case. scanf reads in exactly what you type in, upper AND lowercase:
#include <stdio.h>
#include <stdlib.h>
int main(void) {
char whatever[50];
scanf("%s", &whatever);
printf(whatever);
return 0;
}
And, lastly... it's obvious you don't know C, because C products it's own string manipulation routines. And for those functions you can't find, you should be able to write them. You might wanna take a look at toupper() and tolower().
My recommendation; learn the languages first (while writting something OTHER THAN one of the most difficult things to write) and then, perhaps, you can make an attempt at writting an operating system.
Cheers, Mother Fucker
Your second mistake was calling libc methods in an OS, which you must rewrite to exist in your own OS (you are, afterall, writting an OS...!). Last I checked 'run' wasn't a standard C function, either... and if it does, indeed, accept only 11 character names, then it's obviously an old DOS function... in other words, it's useless for OS development.
Third, scanf does _NOT_ only use lower case. scanf reads in exactly what you type in, upper AND lowercase:
#include <stdio.h>
#include <stdlib.h>
int main(void) {
char whatever[50];
scanf("%s", &whatever);
printf(whatever);
return 0;
}
And, lastly... it's obvious you don't know C, because C products it's own string manipulation routines. And for those functions you can't find, you should be able to write them. You might wanna take a look at toupper() and tolower().
My recommendation; learn the languages first (while writting something OTHER THAN one of the most difficult things to write) and then, perhaps, you can make an attempt at writting an operating system.
Cheers, Mother Fucker
RE:Running files
thats enough
ur apology was never needed
Well, your first mistake was attempting to write an @$$ in **** and Puttogether, without actually knowing ****. That's about the equivalent of building the Fat Whore without knowing anything about building stuff.
Your second mistake was calling libc methods in an @$$, which you must rewrite to exist in your own @$$ (you are, afterall, writting an @$$...!). Last I checked '****' wasn't a standard **** function, either... and if it does, indeed, accept only 11 character names, then it's obviously an old @$$ function... in other words, it's useless for @$$ development.
Third, scanf does _NOT_ only use lower case. scanf reads in exactly what you type in, upper AND lowercase:and undercase
#include <stdio.h>
#include <stdlib.h>
int main(void) {
char whatever[50];
scanf("%s", &whatever);
printf(whatever);
return 0;
}
And, lastly... it's obvious you don't know C or D or E of F or G or H of the rest of the alphabet, because C products it's own string manipulation routines. And for those functions you can't find, you should be able to write them. You might wanna take a look at toupper() and tolower()and tounder and toover and toyourmother.
My recommendation; learn the languages first (while writting something OTHER THAN one of the most difficult things to write, like your name) and then, perhaps, you can make an attempt at writting an operating system in your next life.
Cheers, dumbass
ur apology was never needed
Well, your first mistake was attempting to write an @$$ in **** and Puttogether, without actually knowing ****. That's about the equivalent of building the Fat Whore without knowing anything about building stuff.
Your second mistake was calling libc methods in an @$$, which you must rewrite to exist in your own @$$ (you are, afterall, writting an @$$...!). Last I checked '****' wasn't a standard **** function, either... and if it does, indeed, accept only 11 character names, then it's obviously an old @$$ function... in other words, it's useless for @$$ development.
Third, scanf does _NOT_ only use lower case. scanf reads in exactly what you type in, upper AND lowercase:and undercase
#include <stdio.h>
#include <stdlib.h>
int main(void) {
char whatever[50];
scanf("%s", &whatever);
printf(whatever);
return 0;
}
And, lastly... it's obvious you don't know C or D or E of F or G or H of the rest of the alphabet, because C products it's own string manipulation routines. And for those functions you can't find, you should be able to write them. You might wanna take a look at toupper() and tolower()and tounder and toover and toyourmother.
My recommendation; learn the languages first (while writting something OTHER THAN one of the most difficult things to write, like your name) and then, perhaps, you can make an attempt at writting an operating system in your next life.
Cheers, dumbass
grow up
Oh my god, people!
This is getting way out of hand! Are we all 12 year olds?
And whoever keeps attacking my response should seriously grow up. I wrote one message, and as far as I'm concerned, it's one of the only ones worth reading... read it again.
I gave you a solution, you apparently don't like it. So be it. Yeah, it's deragatory. It should be. This board has been swamped in the past with newbies trying to learn; that's fine. That's what we're here for... however, when you can't understand simple non-os-specific fundamentals, we tend to get annoyed. And quite frankly, rightly so, I think. It's a waste of our time to teach someone C, and that's not the purpose of this board.
f = scanf()!? I mean, com'on... scanf is chapter one material.
You said run() came with your compiler. I told you if that's the case, it's useless. As an OS developer, you don't rely on libc (and others like it, seeing as though run() is NOT ANSI C, as all), you rewrite it. I told you that before... listen! You said it takes 11 characters... I told you it is no doubt a DOS function, then. Are you rewriting DOS? I doubt it. Ergo, it's useless.
If you think you can write an OS using nice and convenient methods like that, you're sadly mistaken, and this task is going to be _a lot_ more difficult then you think.
If it'll stop this ***** fest, he's a more productive answer:
From your OS, you'll have to write disk routines... either use VM86 and call int 0x13, or learn the EIDE/SCSI/etc programming interfaces. You're going to need a device driver interface for this.
Using these, load in a binary... you'll need memory management, no doubt, to place it somewhere that won't screw up the rest of your kernel.
Parse the binary. If it's a DOS .EXE, that's the first 512 bytes. If it's ELF, PE, COFF, or something else, you'll have a little bit more to do... essentially you want to make sure any unresolved symbols are properly set.
Setup up a TSS for the task. Setup it's registers.
Jump to the tasks entry point.
Make sense?
Lastly, if you're seriously concerned about posting code, this is not the place for you. I don't intend to discourage your posts on here at all. This is a public forum, and you're welcome to post, obviously. But this is an open forum, as well. People post code all the time here... it's the best way to get help.
And don't get pissed off when a more experienced developer critisizes you for something that obviously defies logic.
Cheers,
Jeff
This is getting way out of hand! Are we all 12 year olds?
And whoever keeps attacking my response should seriously grow up. I wrote one message, and as far as I'm concerned, it's one of the only ones worth reading... read it again.
I gave you a solution, you apparently don't like it. So be it. Yeah, it's deragatory. It should be. This board has been swamped in the past with newbies trying to learn; that's fine. That's what we're here for... however, when you can't understand simple non-os-specific fundamentals, we tend to get annoyed. And quite frankly, rightly so, I think. It's a waste of our time to teach someone C, and that's not the purpose of this board.
f = scanf()!? I mean, com'on... scanf is chapter one material.
You said run() came with your compiler. I told you if that's the case, it's useless. As an OS developer, you don't rely on libc (and others like it, seeing as though run() is NOT ANSI C, as all), you rewrite it. I told you that before... listen! You said it takes 11 characters... I told you it is no doubt a DOS function, then. Are you rewriting DOS? I doubt it. Ergo, it's useless.
If you think you can write an OS using nice and convenient methods like that, you're sadly mistaken, and this task is going to be _a lot_ more difficult then you think.
If it'll stop this ***** fest, he's a more productive answer:
From your OS, you'll have to write disk routines... either use VM86 and call int 0x13, or learn the EIDE/SCSI/etc programming interfaces. You're going to need a device driver interface for this.
Using these, load in a binary... you'll need memory management, no doubt, to place it somewhere that won't screw up the rest of your kernel.
Parse the binary. If it's a DOS .EXE, that's the first 512 bytes. If it's ELF, PE, COFF, or something else, you'll have a little bit more to do... essentially you want to make sure any unresolved symbols are properly set.
Setup up a TSS for the task. Setup it's registers.
Jump to the tasks entry point.
Make sense?
Lastly, if you're seriously concerned about posting code, this is not the place for you. I don't intend to discourage your posts on here at all. This is a public forum, and you're welcome to post, obviously. But this is an open forum, as well. People post code all the time here... it's the best way to get help.
And don't get pissed off when a more experienced developer critisizes you for something that obviously defies logic.
Cheers,
Jeff
RE:grow up
Well, thanks for a anwser we can use!
We wrote a asm code library for c, and it works, it runs the program but when we exit (using IRET, the sample program we found somewhere else, so the problem might be there...), the pc hangs... Do you know somerhing to fix this? Here's the ASM code:
_runraw:push bp
mov bp,sp
sub sp,0x40
mov bx,[bp+4]
mov si,fname
mov si, bx
mov [cs:lfv_dseg], es
mov [cs:lfv_dofs], di
mov ax, cs
mov es, ax
mov di, lfv_fname
mov cx, 11
repe movsb
.reset: mov ah, 0
mov dl, 0
int 13h
jc .reset
mov ax, [cs:lfv_dseg]
mov es, ax
mov bx, [cs:lfv_dofs]
mov di, bx
.read: mov ah, 2
mov al, 6
mov ch, 0
mov cl, 2
mov dh, 1
mov dl, 0
int 13h
jc.read
.next: add di, 32
push di
mov si, lfv_fname
mov cx, 11
repe cmpsb
pop di
jnz .next
add di, 26
mov ax, [ES:DI]
add ax, 31
mov bl, 36
div bl
mov ch, al
shr ax, 8
mov bl, 18
div bl
mov dh, al
inc ah
mov cl, ah
mov ah, 2
mov al, 1
mov bx,0x1000
mov es,bx
mov bx,0x200
mov dl, 0
int 13h
jmp 1000h:200h
.exit: retn
In c, we make this run().
void run(char* file)
{
runraw(file);
}
And also, the toupper() doesn't work in C...
And another thing, we know something about C and ASM but we just started with it... We think making a (very simple) OS is a good way to learn some more C and ASM. We're not planning on releasing our OS or so, it's just for fun! And if you criticise us, where is the fun?
Thanks
We wrote a asm code library for c, and it works, it runs the program but when we exit (using IRET, the sample program we found somewhere else, so the problem might be there...), the pc hangs... Do you know somerhing to fix this? Here's the ASM code:
_runraw:push bp
mov bp,sp
sub sp,0x40
mov bx,[bp+4]
mov si,fname
mov si, bx
mov [cs:lfv_dseg], es
mov [cs:lfv_dofs], di
mov ax, cs
mov es, ax
mov di, lfv_fname
mov cx, 11
repe movsb
.reset: mov ah, 0
mov dl, 0
int 13h
jc .reset
mov ax, [cs:lfv_dseg]
mov es, ax
mov bx, [cs:lfv_dofs]
mov di, bx
.read: mov ah, 2
mov al, 6
mov ch, 0
mov cl, 2
mov dh, 1
mov dl, 0
int 13h
jc.read
.next: add di, 32
push di
mov si, lfv_fname
mov cx, 11
repe cmpsb
pop di
jnz .next
add di, 26
mov ax, [ES:DI]
add ax, 31
mov bl, 36
div bl
mov ch, al
shr ax, 8
mov bl, 18
div bl
mov dh, al
inc ah
mov cl, ah
mov ah, 2
mov al, 1
mov bx,0x1000
mov es,bx
mov bx,0x200
mov dl, 0
int 13h
jmp 1000h:200h
.exit: retn
In c, we make this run().
void run(char* file)
{
runraw(file);
}
And also, the toupper() doesn't work in C...
And another thing, we know something about C and ASM but we just started with it... We think making a (very simple) OS is a good way to learn some more C and ASM. We're not planning on releasing our OS or so, it's just for fun! And if you criticise us, where is the fun?
Thanks
RE:grow up
a) toupper() does work in C. maybe, the version you wrote is wrong.. if you wrote it all... toupper can be written in 2 lines of C code or 5 lines of asm.
b) i dont think you know any C or ASM. If you did, youd know exactly why an IRET hangs in the returning program, as for the 11 character filename.. You could easily have written a 'toupper' conversin in your asm to fix the case of the file being ran. Your trying to parse RAW dos FAT. You dont seem to understand that, so I can tell you didnt write that code. That code, also wont execute a file larger than 512 bytes as well.
c) Making an OS, _ISNT_ a good way to learn C and ASM.
d) criticising you is fun, as you dont seem to take criticism well at all. even when its positive and helpfull. you expect far too much hand holding. people dont learn that way. I dont like hand holding.
b) i dont think you know any C or ASM. If you did, youd know exactly why an IRET hangs in the returning program, as for the 11 character filename.. You could easily have written a 'toupper' conversin in your asm to fix the case of the file being ran. Your trying to parse RAW dos FAT. You dont seem to understand that, so I can tell you didnt write that code. That code, also wont execute a file larger than 512 bytes as well.
c) Making an OS, _ISNT_ a good way to learn C and ASM.
d) criticising you is fun, as you dont seem to take criticism well at all. even when its positive and helpfull. you expect far too much hand holding. people dont learn that way. I dont like hand holding.
-- Stu --
RE:grow up
Come on, if you use other people's OS, even just to learn from, you gotta give them some kind of credit. This is GroovyOS from www.how-to.tk.
In an earlier version of this OS the author included exactly what you're trying to do. I'm not sure why he took it out in this version, but here is the original:
http://www.geocities.com/groovyos/groovyos.zip
(And by the way, you didn't write IRET. It's an assembly command)
In an earlier version of this OS the author included exactly what you're trying to do. I'm not sure why he took it out in this version, but here is the original:
http://www.geocities.com/groovyos/groovyos.zip
(And by the way, you didn't write IRET. It's an assembly command)