Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: aeBIOS - new version

1 view
Skip to first unread message

Mike Gonta

unread,
Dec 29, 2010, 10:15:27 AM12/29/10
to
"wolfgang kern" wrote in message news:iff9e0$f4h$1...@newsreader2.utanet.at...
>
> Mike Gonta posted:
> ...
>> The latest source code, documentation, image file and change log are
>> here:
>>
>> http://aeBIOS.com/aeBIOS/assets/
>
> Thanks, got it.
>
> mmh..., on a first glimpse into kernel.asm:
>
> bin2hex:
> push ebx
> push ecx
> push edx
> mov edx, eax
> mov ah, 0Eh ;prepare for INT 10h that early ?
> xor bh, bh
> add esi, ecx
> sub esi, 1 ;how about lea esi,[esi+ecx-1] ?
> .1:
> mov al, dl
> shr edx, 4
> and al, 0Fh
> add al, '0'
> cmp al, '9'
> jbe .2
> add al, 7
> .2:
> mov [esi], al
> lea esi, [esi-1]
> sub ecx, 1
> jmp .1 ;*** shouldn't this read: "jnz .1"
> pop edx
> pop ecx
> pop ebx
> ret

Hi Wolfgang,

That piece of code is an unused artifact from a previous version.
For those interested, bin2hex is a simple routine to convert the
value in eax to a hexadecimal number in a buffer pointed to by esi,
ecx is the number of digits to convert.

bin2hex:
push edx
mov edx, eax
lea esi,[esi+ecx-1] ; start with least significant digit
.1:
mov al, dl
shr edx, 4
and al, 0Fh
add al, '0'
cmp al, '9'
jbe .2
add al, 7
.2:
mov [esi], al
lea esi, [esi-1]
sub ecx, 1
jnz .1
pop edx
ret

> btw Mike, why you don't like INC DEC ? :)

They remind me of real mode code, (I also don't like the string
instructions). I'm waging a personal war against real mode
programming. With aeBIOS access to BIOS functions in 32 bit
protected mode is simple and easy.


Mike Gonta
look and see - many look but few see

http://aeBIOS.com


0 new messages