some low level routines

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
kerim

some low level routines

Post by kerim »

Does anyone have assembler low level routines for reading a character from keyboard, displaying a character on the screen clearing the keyboard buffer, moving a cursor, etc. 8)
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:some low level routines

Post by Pype.Clicker »

for what environment ? plain hardware ? BIOS ? MS-DOS ?
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:some low level routines

Post by distantvoices »

mov ax,0xb8000
mov gs,ax
mov [gs:2],'q'

simplest code to put a character on the screen.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
kerim

Re:some low level routines

Post by kerim »

I said 'low level' which, of course, means hardware level :)
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:some low level routines

Post by Pype.Clicker »

that's because at the lowest level, there's no keyboard buffer...
reading a character from the keyboard is done with

Code: Select all

in al,0x60
cmp al,128
jae .keyup
;; key with scancode <al> pressed
.keyup:
;; key with scancode <al&127> released.
For the cursor (text) placement, check the VGA registers, and mainly the Cathod Ray Tube Controller (CRT controller) registers...
I've seen a reference to it in a 2-weeks old thread called something like "print function" ...
kerim

Re:some low level routines

Post by kerim »

Are there any texts on the Web dealing with VGA registers and low level VGA programming ?
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:some low level routines

Post by Pype.Clicker »

yep. try google, or search within the forum's archive ...
Post Reply