I'm looking for the way to get the initial value of a screen terminal
in Linux Assembly (AT&T syntax/GAS).
The version of the program that works OK in MSDOS is the following:
_dir_pantalla PROC FAR
push es
xor ax,ax
mov es,ax
mov dl,es:[449H]
cmp dl,7
je b0
cmp dl,2
je b8
cmp dl,3
je b8
error: mov ax,-1
mov dx,-1
jmp fin
b0: mov dx,0B000h
jmp fin
b8: mov dx,0B800H
fin: pop es
ret
_dir_pantalla ENDP
Then I can use the screen like a matrix 80 x 25 with the first element
being the initial screen address and I can write a character &
attribute to each position of the matrix (this is,each position of the
screen).
I need the same code for Linux using GAS syntax.
Thanks |