Skip to content

Instantly share code, notes, and snippets.

@dhilipsiva
Created May 16, 2012 04:15
Show Gist options
  • Save dhilipsiva/2707334 to your computer and use it in GitHub Desktop.
Save dhilipsiva/2707334 to your computer and use it in GitHub Desktop.
C program printing without using "printf". NO libraries. just c and memory ;)
//Created by DhilipSiva
//Free to modify and use
main()
{
char far *videoMemory = 0xB8000000;
char *helloString = "Hello World";
int stringLength = 11; //length of "Hello World" is 11
int count;
for(count = 0; count < stringLength; count++)
{
*(videoMemory + count) = *(helloString + count);
}
}
//There you go. Your program without any library functions ;)
//dhilipsiva@gmail.com
@divyanshpatidar85
Copy link

How it is working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment