Hello, fellow programmers!
I have a stupid (for your lvl) question:
Using "flat assembler" and debugging it using "ollydbg (v2.00.01)"
I have a following code:
format PE
org 100h
start:
mov eax, 0 ; clear entire register
mov edx, 0 ; clear entire register
mov ah, 02h ; define control character
mov dl, 'A' ; character it needs to print to "standart output" (?)
int 21h ; interruption service call
hlt
So, with the code above I have 2 problems:
- OllyDbg says "Access violation when reading [FFFFFFFF]" when it comes to the line with interruption service call.
- I rewrote the code above using
mov ah, 05h
control character. Still got an error from 1st item.
It would be kind of you to help me solve this two requirements:
- Understanding the difference between the "standart output" and "default printer".
- Writing a single character to console(?) without using
ds
register (and any previously defined data).
My greatest thanks to everyone, who reply!
Solved by...
As it comes out, you cannot use direct call of DOS services from Win32 executable.