Original Post
I want to get easy Pixel acces under linux, so I tried to use int 10h with xor ah,ah ;just to get shure mov ax,13h;setting graficsmode 13, 256 colors 320x200 int 10h ;bios video int I get a memory acces error. (even when running from one of the real terminals) Does someone know whats wrong about it? the whole code is:
section .data ;section declaration
msg db "O_o",0xa ;our dear string
len equ $ - msg ;length of our dear string
section .text ;section declaration
;we must export the entry point to the ELF linker or
global _start ;loader. They conventionally recognize _start as their
;entry point. Use ld -e foo to override the default.
_start:
;write our string to stdout
mov edx,len ;third argument: message length
mov ecx,msg ;second argument: pointer to message to write
mov ebx,1 ;first argument: file handle (stdout)
mov eax,edx ;system call number (sys_write)
int 0x80 ;call kernel
xor ah,ah
mov ax,13h
int 10h
;and exit
mov eax,1 ;system call number (sys_exit)
xor ebx,ebx ;first syscall argument: exit code
int 0x80 ;call kernel