@@ -656,10 +656,11 @@ asm
movzwl %cx,%eax
shrl $3,%eax
cmpw $40,ScreenWidth
- jne .Lmorethan40cols
+ {jne .Lmorethan40cols}
+ jne .Lexit
shrl $1,%eax
.Lmorethan40cols:
- incl %eax
+ {incl %eax} {need to be zero based - no inc}
jmp .Lexit
.LGetMouseXError:
xorl %eax,%eax
@@ -679,7 +680,7 @@ asm
popl %ebp
movzwl %dx,%eax
.LGetMouseYError:
@@ -713,6 +714,8 @@ asm
jne .LSetMouseXYExit
movw x,%cx
movw y,%dx
+ shll $3,%ecx {character based convert to pixels: x * 8}
+ shll $3,%edx {character based convert to pixels: y * 8}
movl $4,%eax
pushl %ebp
int $0x33
@@ -407,10 +407,11 @@ asm
{$else}
cmp ScreenWidth, 40
{$endif}
- jne @@morethan40cols
+ {jne @@morethan40cols}
+ jne @@exit
shr ax, 1
@@morethan40cols:
- inc ax
+ {inc ax} {need to be zero based - no inc}
jmp @@exit
@@GetMouseXError:
xor ax, ax
@@ -430,7 +431,7 @@ asm
@@GetMouseYError:
@@ -460,6 +461,12 @@ asm
jne @@SetMouseXYExit
mov cx, x
mov dx, y
+ shl cx, 1 {character based convert to pixels: x * 8}
+ shl cx, 1
+ shl dx, 1 {character based convert to pixels: y * 8}
+ shl dx, 1
mov ax, 4
push bp
int 33h