SHENZHEN I/O

SHENZHEN I/O

Not enough ratings
ALU-I386-A
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
10.346 KB
20 Mar, 2024 @ 3:06am
20 Mar, 2024 @ 6:26am
4 Change Notes ( view )

Subscribe to download
ALU-I386-A

In 1 collection by cyxw
Intel® 8086 ALU Based on Chengshang Micro™
4 items
Description
You felt it sucks to use Chengshang Micro™ chips, and you missed Intel® 8086……



Introducing ALU-I386-A!
  • Calculate bytes accurately!
  • Support add and sub in one chip!
  • Three flags provided!


And you know, it still sucks, cause it doesn't support all Intel® 8086 flags……
2 Comments
cyxw  [author] 18 Jun, 2024 @ 5:05am 
@transcendentalConstant314 All data considered byte signed data, if a num is bigger than 127, then maybe its sign flag……
transcendentalConstant314 17 Jun, 2024 @ 5:45pm 
On the first test run, there is a set of inputs that is

OPR1 = 239
OPR2 = 176
MODE = 100

and naturally this means calculate 239 + 176. Now, my code does yield the right RESULT, that being 159. But I don't quite understand why the flags are supposed to be set the way they are, in the specificaion as written. I understand why ZF should be 0, I understand why CF should be 100, but I don't understand why SF should be 100. For the first input triplet, that one being (196, 142, 100), the result should be (82, 100, 0, 0), where 82 is RESULT, 100 is CF, and the last two 0 entries being ZF and SF, respectively. Why should this input require SF to be 0, but the input I listed first requiring SF to be 100?