C
C
cthulhudx2015-02-15 13:19:37
C++ / C#
cthulhudx, 2015-02-15 13:19:37

Is it possible to directly work with BIOS interrupts using C?

Here is a code that runs on bare metal. Displays the line "hello world" on the screen and reboots the computer. Is it possible to implement something similar in pure C?

#make_boot#

org 7c00h

mov ah,00h
mov al,03h
int 10h 

mov ah,13h
mov al,1
mov bh,0
mov bl,0000_1011b
mov dl,1
mov dh,0
mov cx,message - offset text
mov bp,offset text
int 10h

INT 19h
text db 'Hello world!'
message:

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Armenian Radio, 2015-02-15
@cthulhudx

Yes, it's possible.

A
Alexey Artyushkov, 2015-09-12
@frank_sider

No, you can't use BIOS interrupts. Compilers compile 32 bit code. Execution of such code is possible only in protected mode. And BIOS interrupts are only in real mode.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question