home .. forth .. colorforth mail list archive ..

[colorforth] bug in bit32?


Here is bit16 and bit32 from ftp://ftp.ultratechnology.com/GEN.ASM:

bit16: lodsw
    xchg AL, AH
    mov  ECX, 16
b16: shl  AX, 1
        jnc  @f
            mov  [EDI], DX
@@:     add  EDI, 2
        next b16
    ret

bit32: lodsw
    xchg AL, AH
    mov  ECX, 16
b32: shl  EAX, 1
        jnc  @f
            mov  [EDI], DX
            mov  [EDI+2], DX
            mov  [EDI+hp*2], DX
            mov  [EDI+hp*2+2], DX
@@:     add  EDI, 4
        next b32
    ret

Notice above by the lablel 'b32', 'shl EAX, 1'. I think this should be 'shl AX, 1' like in 'bit16'. I think bit32 apears to work because the previous row in the bitmap will be shifted into the upper 16 bits of EAX, and will be displayed on the next call to bit32.

Maybe this not so important, with colorForth being rewritten in colorForth, but I thought I bring up in case I have misunderstood.


---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com