VGA hardware cursor and hardware scrolling
VGA hardware cursor and hardware scrolling
I want to know how this 2 things work . It would be nice of you , if you could post some code . I need this for RM , it?s only , if the code is other as the code in PM (bad english !!) .
Re:VGA hardware cursor and hardware scrolling
Perhaps this will help get you started
http://www.execpc.com/~geezer/osd/cons/index.htm
As far as real mode vs pmode, if you're just dealing with ports (using IN/OUT in assembly), it's the same.
http://www.execpc.com/~geezer/osd/cons/index.htm
As far as real mode vs pmode, if you're just dealing with ports (using IN/OUT in assembly), it's the same.
Re:VGA hardware cursor and hardware scrolling
I?ve tried to write this code in asm , but when I want to write a value out to the register 0x3d4 NASM says me "invalid combination of opcodes and operands" .
Here is my code :
move_cursor:
???pusha
???mov al,80
???mul byte[spalte]
???mov bx,ax
???mov al,[zeile]
???cbw
???add bx,ax
???out 0x3D4,14
???mov dx,bx
???shr dx,8
???out 0x3d5,dx
???out 0x3d4,15
???out 0x3d5,bx
???popa
???ret
Here is my code :
move_cursor:
???pusha
???mov al,80
???mul byte[spalte]
???mov bx,ax
???mov al,[zeile]
???cbw
???add bx,ax
???out 0x3D4,14
???mov dx,bx
???shr dx,8
???out 0x3d5,dx
???out 0x3d4,15
???out 0x3d5,bx
???popa
???ret
Re:VGA hardware cursor and hardware scrolling
out 0x3D4,14 is not allowed
mov al, 14
mov dx, 0x3D4
out dx, al
mov al, 14
mov dx, 0x3D4
out dx, al
Re:VGA hardware cursor and hardware scrolling
It's not allowed because you can't use a constant (a number) if it's bigger than one byte.