VGA hardware cursor and hardware scrolling

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
FlashBurn

VGA hardware cursor and hardware scrolling

Post by FlashBurn »

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 !!) .
crazybuddha

Re:VGA hardware cursor and hardware scrolling

Post by crazybuddha »

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.
FlashBurn

Re:VGA hardware cursor and hardware scrolling

Post by FlashBurn »

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
alfhiger

Re:VGA hardware cursor and hardware scrolling

Post by alfhiger »

out 0x3D4,14 is not allowed

mov al, 14
mov dx, 0x3D4
out dx, al
crazybuddha

Re:VGA hardware cursor and hardware scrolling

Post by crazybuddha »

It's not allowed because you can't use a constant (a number) if it's bigger than one byte.
Post Reply