Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Question about some x86 opcodes (Developers)

posted by DOS386, 03.11.2008, 10:04

> it is unclear whether the remaining three arithmetic
> instructions in this group (001=OR, 100=AND, 110=XOR) also
> accept "short" immediates, i.e., whether
>   OR DI, 12h  ->  83 CF 12     "short"
> is valid, or
>   OR DI, 12h  ->  81 CF 12 00  "long"
> must be used instead.

> There is an option in Masm:
> OPTION NOSIGNEXTEND
> and the documentation says:
> > NOSIGNEXTEND Overrides the default sign-extended opcodes for
> > the AND, OR, and XOR instructions and generates the larger
> > non-sign-extended forms of these instructions. Provided for
> > compatibility with NEC V25 and NEC V35 controllers.

Funny point :-|

> However, many assemblers and compilers actually do use "short" forms even
> for 8086 target! These are results of my testing:

My test:

FASM always brews the short 3-byte variant. There is no "only 8086" option in FASM, however there is an include file for this purpose http://board.flatassembler.net/download.php?id=2832 , and it doesn't affect those instructions. OTOH

OR DI, WORD $12

brews the 4-byte variant :clap:

---
This is a LOGITECH mouse driver, but some software expect here
the following string:*** This is Copyright 1983 Microsoft ***

 

Complete thread:

Back to the forum
Board view  Mix view
22756 Postings in 2121 Threads, 402 registered users (0 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum