www.delorie.com/djgpp/bugs/show.cgi   search  
Bug 000359

When Created: 01/26/2003 04:29:02
Against DJGPP version: 2.03
By whom: ams@ludd.luth.se
Abstract: djasm has problems with - 1 + 0xf
Take this source code, djasm_bug.asm:

.type "com"
.org 0x100

start:
        mov     dx, lab         ; -> dx = 0x100, ok
        mov     dx, lab - 1     ; -> dx = 0xff, ok
        mov     dx, lab + 0xf   ; -> dx = 0x10f, ok
        mov     dx, lab - 1 + 0xf       ; -> dx = 0xf0, wrong. (0x10e is ok.)

lab = 0x100

Compile with "djasm djasm_bug.asm djasm_bug.com djasm_bug.map".

Check the assembly of the fourth mov dx line.


Right,

						MartinS



  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2010   by DJ Delorie     Updated Jul 2010