4
Uvaish
5y

how to print something on screen without using any library (iostream,stdlib,bit/std++) in c/c++

Comments
  • 2
    Write your own library.
    Or
    Take a note sticker, write on it and then paste it on screen. Voila!!!
  • 0
    What's wrong with iostream?
  • 2
    Smells like homework
  • 0
    You can use system calls or interrupts
  • 2
    @oreru go down to kernel space and write the drivers for the output device yourself, which would generally involve interrupts and a lot of low level programming

    Hey I mean it is a solution technically.

    You can also trigger system calls manually (i.e. without libraries) using interrupts, eg. on x86 Linux int 80h triggers the system call handler and you can put the system call id and args in places defined by the manual.

    Also if your code is in x86 real mode (DOS etc.) you can generally access the BIOS I/O routines to print stuff, I think the interrupt code for that was 21h
  • 0
    @RememberMe should be noted that int 80h is a legacy thing
  • 1
    @RememberMe @RememberMe thank you for the information
Add Comment