flat assembler
Message board for the users of flat assembler.

Index > Main > 8086 undefined opcode?

Author
Thread Post new topic Reply to topic
Artlav



Joined: 23 Dec 2004
Posts: 188
Location: Moscow, Russia
Artlav
I've been looking around for some time, but can't find the answer for less than 286 - what will a 8086 CPU do if it hits an undefined opcode?
Post 23 Dec 2009, 16:34
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
Artlav wrote:
I've been looking around for some time, but can't find the answer for less than 286 - what will a 8086 CPU do if it hits an undefined opcode?


There is NO illegal instruction exception on 8086 - it will do strange stuff, most likely just hang Sad SSSSSE5 on 8086 ? No problem, just decode to POPE CS and hang Sad

_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 23 Dec 2009, 16:56
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Quote:

No problem, just decode to POPE CS and hang

This pope thing again... (not everybody know that's your way of calling POP Smile)
Post 23 Dec 2009, 17:05
View user's profile Send private message Reply with quote
chaoscode



Joined: 21 Nov 2006
Posts: 64
chaoscode
what is POPE?
Post 27 Dec 2009, 03:20
View user's profile Send private message ICQ Number Reply with quote
windwakr



Joined: 30 Jun 2004
Posts: 827
Location: Michigan, USA
windwakr
chaoscode wrote:
what is POPE?


It's the way DOS386 defines pop. I think it's just so push and pop are the same length for him, lol.


EDIT: Loco says it right above you anyways.
LocoDelAssembly wrote:

(not everybody know that's your way of calling POP Smile)

_________________
----> * <---- My star, won HERE
Post 27 Dec 2009, 03:26
View user's profile Send private message Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler
Chaoscode wrote:

what is POPE?

LocoDelAssembly wrote:

[DOS386's] way of calling POP

@DOS386: What do you mean by "hang"? Sounds destructive.­
Post 27 Dec 2009, 03:29
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
windwakr wrote:
so push and pop are the same length for


right Shocked
Post 27 Dec 2009, 03:34
View user's profile Send private message Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 709
Location: Adelaide
sinsi
A lot of opcodes use 0Fh as the prefix byte - unfortunately to an 8088/8086 this is the 'pop cs' instruction.
Your computer will hang or reboot since CS has changed...
Maybe you jump into the middle of a DOS write-to-disk function and trash your C:

push/pope - why not use psh/pop ?
Post 27 Dec 2009, 03:36
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17666
Location: In your JS exploiting you and your system
revolution
Why not just push/pop Question
Post 27 Dec 2009, 03:40
View user's profile Send private message Visit poster's website Reply with quote
Fanael



Joined: 03 Jul 2009
Posts: 168
Fanael
revolution wrote:
Why not just push/pop Question
And why not just stmdb/ldmia?
Post 27 Dec 2009, 10:43
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17666
Location: In your JS exploiting you and your system
revolution
ldmfd/stmfd
Post 27 Dec 2009, 11:20
View user's profile Send private message Visit poster's website Reply with quote
MazeGen



Joined: 06 Oct 2003
Posts: 977
Location: Czechoslovakia
MazeGen
Artlav wrote:
I've been looking around for some time, but can't find the answer for less than 286 - what will a 8086 CPU do if it hits an undefined opcode?

Accroding to the manual, 186/188 generates int 6 if it executes 0F, 63-67, F1, FE /7, or FF/7. (Don't know why it doesn't list FE /2-6 and few others.)
Post 28 Dec 2009, 09:08
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< 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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.