flat assembler
Message board for the users of flat assembler.

Index > DOS > [found] Good 8086 instruction reference?

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
Rahsennor



Joined: 07 Jul 2007
Posts: 61
Rahsennor 04 May 2020, 06:14
Hello again! Thirteen years on and this place hasn't changed a bit. No JS, no remote fonts, not even a CDN. I love it.

I've finally come full circle, but I'm one TASM reference manual poorer than last time around. (No, I didn't throw it out. It was borrowed, I had to give it back.) I've still got RBIL, but it doesn't cover the instruction set and I don't remember all the details, especially since I never even tried to target anything older than a 386. Now I have an 8088 itch to scratch, but everything my search-fu has turned up acts like the Pentium was the dawn of time (if they even remember it at all!).

So, anyone know where I can find a good 8086 instruction set reference? One with all the flags, encodings, cycle counts etcetera? As longs as it has all the data, accurate, I can type it up in whatever handy tables I want. I just can't find anything detailed enough.
Post 04 May 2020, 06:14
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20298
Location: In your JS exploiting you and your system
revolution 04 May 2020, 06:40
I typed "8086.pdf" including the quotes into my search engine.

The first hit is this:
https://www.datasheet4u.com/datasheet-parts/8086-datasheet.php?id=544568

I didn't download it. But I see it is an Intel manual.
Post 04 May 2020, 06:40
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8349
Location: Kraków, Poland
Tomasz Grysztar 04 May 2020, 09:05
Bitsavers' archive has the original books from Intel: http://bitsavers.trailing-edge.com/components/intel/8086/
It's a really nice archive full of goodies, I've been using the 80286 portions of their archive in my 16-bit protected mode live tutorial sessions.
Rahsennor wrote:
I've still got RBIL, but it doesn't cover the instruction set (...)
RBIL contains OPCODES.LST, which was a really good resource at the time, and in fact it was the main document I used when writing early versions of fasm.
Post 04 May 2020, 09:05
View user's profile Send private message Visit poster's website Reply with quote
Rahsennor



Joined: 07 Jul 2007
Posts: 61
Rahsennor 05 May 2020, 03:24
Well no wonder I've been having trouble... none of those links work for me! Thank goodness for archive.org.
revolution wrote:
I typed "8086.pdf" including the quotes into my search engine.

The first hit is this:
https://www.datasheet4u.com/datasheet-parts/8086-datasheet.php?id=544568

I didn't download it. But I see it is an Intel manual.
Unfortunately that's a datasheet, not a manual. 25 pages of pinouts, voltages and so on. There is a brief instruction set summary squeezed into the last few pages... but emphasis on "brief." It's missing details, like flags.

Tomasz Grysztar wrote:
Bitsavers' archive has the original books from Intel: http://bitsavers.trailing-edge.com/components/intel/8086/
It's a really nice archive full of goodies, I've been using the 80286 portions of their archive in my 16-bit protected mode live tutorial sessions.
I did stumble on some links to Bitsavers while I was searching, but I can't seem to access the site for some reason. Your link is on archive.org, but only two of the actual PDFs are archived, and one of them seems to be corrupted. The remaining on - lucky last - is an instruction reference, but it still doesn't list what instructions set what flags.

Tomasz Grysztar wrote:
RBIL contains OPCODES.LST, which was a really good resource at the time, and in fact it was the main document I used when writing early versions of fasm.
OPCODES.LST doesn't cover the "normal" instructions in detail. Among other things, it still doesn't cover flag effects - at least, not that I can find. It does mention certain instructions leaving certain flags in an undefined state, but that only makes me less certain, not more!

Oh well, I have nearly everything else at least. Time to start compiling a table...
Post 05 May 2020, 03:24
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20298
Location: In your JS exploiting you and your system
revolution 05 May 2020, 03:38
For the details on the flags those will still be valid from all later CPU docs.

For the cycle counts that is specific to the chip you have in your machine. IIRC some of the CMOS chips had different timings to the HMOS chips.

For those old chips you can quite easily manually measure the cycle counts. They don't have all the other things like caches, buffers, OOO, etc. to affect the readings.
Post 05 May 2020, 03:38
View user's profile Send private message Visit poster's website Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 789
Location: Adelaide
sinsi 05 May 2020, 05:25
I remember the Norton Guides, maybe this can help
http://x-hacker.org/ng/
http://www.x-hacker.org/ng/iapx86/index.html
Post 05 May 2020, 05:25
View user's profile Send private message Reply with quote
Rahsennor



Joined: 07 Jul 2007
Posts: 61
Rahsennor 07 May 2020, 10:10
sinsi wrote:
I remember the Norton Guides, maybe this can help
http://x-hacker.org/ng/
http://www.x-hacker.org/ng/iapx86/index.html
Score! Thank you, that has just about everything I'm missing, and stacks more besides.
Post 07 May 2020, 10:10
View user's profile Send private message Reply with quote
Rahsennor



Joined: 07 Jul 2007
Posts: 61
Rahsennor 10 May 2020, 08:39
So many inconsistencies and omissions... the only thing that bugs me more than buggy software is buggy documentation! The hunt for accurate reference material continues.

Anyway, I've put too much work into this to keep it to myself so here it is. Some extra pairs of eyes on it would be appreciated. Otherwise I just hope it's useful to someone.


Description:
Download
Filename: 8086-B1.ZIP
Filesize: 10.8 KB
Downloaded: 782 Time(s)

Post 10 May 2020, 08:39
View user's profile Send private message Reply with quote
Ali.Z



Joined: 08 Jan 2018
Posts: 712
Ali.Z 10 May 2020, 15:22
i probably missed this post, anyhow im building my 8086 and 8087 assembler and disassembler based on these documents.

i couldnt upload them here im not sure why, the 3rd-party file hosting will automatically delete the uploaded files after 1 week; so i hope you can get them before that date:

https://filebin.net/d3l1tl5r1ih9nkb7

_________________
Asm For Wise Humans
Post 10 May 2020, 15:22
View user's profile Send private message Reply with quote
Rahsennor



Joined: 07 Jul 2007
Posts: 61
Rahsennor 11 May 2020, 04:11
Fantastic! Thank you so much! Hopefully that should be the last word.
Post 11 May 2020, 04:11
View user's profile Send private message Reply with quote
guignol



Joined: 06 Dec 2008
Posts: 763
guignol 11 May 2020, 07:27
Post 11 May 2020, 07:27
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8349
Location: Kraków, Poland
Tomasz Grysztar 11 May 2020, 09:07
Ali.Z wrote:
i probably missed this post, anyhow im building my 8086 and 8087 assembler and disassembler based on these documents.

i couldnt upload them here im not sure why, the 3rd-party file hosting will automatically delete the uploaded files after 1 week; so i hope you can get them before that date:

https://filebin.net/d3l1tl5r1ih9nkb7
Your 8086 document is an excerpt from "The 8086 Family Users Manual " (1979), which is available in full from Bitsavers' archive I linked earlier (among other similar scanned books, including "iAPX 86/88, 186/188 User's Manual" from 1985, which I would also recommend).

Interesting that Bitsaver's URL seems to be not working for everyone. Is their server blocked in some areas?
Post 11 May 2020, 09:07
View user's profile Send private message Visit poster's website Reply with quote
Ali.Z



Joined: 08 Jan 2018
Posts: 712
Ali.Z 11 May 2020, 17:27
i dont think its blocked, but i tried multiple times to access it and the browser suggested that the server might not be responding.

i finally was able to connect to their server, its great i have 4 of their documents so i guess i will download the other missing stuff.

nice share, os2museum (Michal Necasek) had hosted a list of intel sdm that he collected over 20years.

the link is dead, and web.archive.org is blocked in my country. Sad

the link: http://kib.kiev.ua/x86docs/SDMs/
its a heavy archive, you need gigs of disk space.

_________________
Asm For Wise Humans
Post 11 May 2020, 17:27
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8349
Location: Kraków, Poland
Tomasz Grysztar 11 May 2020, 17:37
Yeah, I've been recommending that one, too. Too bad it is dead now.
Post 11 May 2020, 17:37
View user's profile Send private message Visit poster's website Reply with quote
Rahsennor



Joined: 07 Jul 2007
Posts: 61
Rahsennor 12 May 2020, 08:33
The number of broken links I've turned up while looking for this stuff is definitely making me think there's some kind of blocking going on. Maybe they're on some kind of piracy blacklist? I haven't been game to try any tricks, just in case someone is watching...

BTW, I've found two errors in the 8086 Family Users Manual already (AAM is listed as one byte, TEST mem, imm as performing zero memory transfers)... and funnily enough they're also in Norton Guides. Guess which reference they must have used. Smile
Post 12 May 2020, 08:33
View user's profile Send private message Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 789
Location: Adelaide
sinsi 12 May 2020, 09:10
Post 12 May 2020, 09:10
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8349
Location: Kraków, Poland
Tomasz Grysztar 12 May 2020, 10:27
Rahsennor wrote:
BTW, I've found two errors in the 8086 Family Users Manual already (AAM is listed as one byte, TEST mem, imm as performing zero memory transfers)... and funnily enough they're also in Norton Guides. Guess which reference they must have used. Smile
The 1985 manual has at least the AAM mistake corrected.

It's really frustrating that Bitsavers' archive is not working for you, it's such an excellent historical resource. They also have several mirrors:
http://bitsavers.org/
http://bitsavers.computerhistory.org
http://bitsavers.informatik.uni-stuttgart.de
http://bitsavers.trailing-edge.com
http://www.bighole.nl
They have hundreds documents, and they are all searchable (have been passed through OCR), which another big plus. The 1985 one I mentioned is at http://bitsavers.org/components/intel/8086/210912-001_iAPX_86_88_186_188_Users_Manual_1985.pdf (you can try the same path at different mirrors).
Post 12 May 2020, 10:27
View user's profile Send private message Visit poster's website Reply with quote
Ali.Z



Joined: 08 Jan 2018
Posts: 712
Ali.Z 12 May 2020, 18:16
AAM is not listed as 1 byte, if you look carefully at instruction decoding: see page 176.


Description: D4 0A
Filesize: 24.8 KB
Viewed: 21327 Time(s)

Screenshot_20200512-211133_1.jpg



_________________
Asm For Wise Humans
Post 12 May 2020, 18:16
View user's profile Send private message Reply with quote
Ali.Z



Joined: 08 Jan 2018
Posts: 712
Ali.Z 12 May 2020, 18:40
if you really want to hunt their mistake, then see page 166: (encoding)
the figure says it takes a displacement which is not true.

but they already mentioned earlier at page 162 that the disp is optional and the MOD indicates if present.

and when we take a look at the 2nd byte 0Ah it says mod is 0 so no disp which it means it have no operands.

you cant completely rely on either the instruction encoding pages or decoding pages, you have to switch between them and read multiple times to figur out the right opcode bytes and whether it takes operands or not.

that what confused me a lot when i started to write both the disassembler and assembler, they say correct thing in one place and incorrect at another place.


Description:
Filesize: 25.69 KB
Viewed: 21323 Time(s)

Screenshot_20200512-213356_1.jpg


Description: instruction encoding page 166, AAM and AAD mistake
Filesize: 25.21 KB
Viewed: 21323 Time(s)

Screenshot_20200512-213030_1.jpg



_________________
Asm For Wise Humans
Post 12 May 2020, 18:40
View user's profile Send private message Reply with quote
Ali.Z



Joined: 08 Jan 2018
Posts: 712
Ali.Z 12 May 2020, 20:08
Rahsennor wrote:
TEST mem, imm as performing zero memory transfers


i did not understand what you meant by this, would you explain? also specify the size of the operation.

_________________
Asm For Wise Humans
Post 12 May 2020, 20:08
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.