I'm trying to make some screen functions. One such function is puts, but I realized some pretty anomalous behavior.
..... The following code works-
Code: Select all
int tempVideoMain(){ //Starting point of exec
char str[20]="Hello world";
puts(str);
}
void puts(char str[]){
for(int i=0;str[i]!=0;i++) putch(str[i]);
}
On the other hand, I have no clue why this does not work:
Code: Select all
int tempVideoMain(){
puts("Hello World"); // The only thing that has viably changed
}
void puts(char* str){
for(int i=0;str[i]!=0;i++) putch(str[i]);
}
using djgpp compiler and the putch (put character) function definately works, btw.
Thnx
PS: If this is more related to general programming, then could some1 move this thread there...