[address in hex] [data in hex] data in binary - what it does
[000] [41] 01 000 001 - mem[0] = mem[0] + mem[1]
[001] [82] 10 000 010- status = mem[0] < mem[2]?
[002] [E8] 11 101 000 - if (status) jump to 005
[003] [39] 00 111 001 - mem[7] = mem[1]
[005] [38] 00 111 000 - mem[7] = mem[0]
Originally posted by: amdfanboy
I mean, how does the CPU interpret this.
Originally posted by: Sahakiel
Originally posted by: amdfanboy
I mean, how does the CPU interpret this.
Same way you process mailing addresses.
a: So,how does the CPU interpret assembly ?
CTho9305: It doesn't. The assembly is compiled to machine instructions
a: I get that, how does it know what to do ?
CTho9305: well, it reads a few bytes from memory and looks at them
CTho9305: and then based on the pattern it sees, does various operations
a: So it already knows what to do based on preset codes. (ie assembly)?
CTho9305: right, there is a set of instructions, and every line of assmebly translates into one of those instructions
a: Ok, thank you.![]()
Originally posted by: CTho9305
This might be useful to anyone else who sees the thread and wonders what happened:
a: So,how does the CPU interpret assembly ?
CTho9305: It doesn't. The assembly is compiled to machine instructions
a: I get that, how does it know what to do ?
CTho9305: well, it reads a few bytes from memory and looks at them
CTho9305: and then based on the pattern it sees, does various operations
a: So it already knows what to do based on preset codes. (ie assembly)?
CTho9305: right, there is a set of instructions, and every line of assmebly translates into one of those instructions
a: Ok, thank you.![]()
I don't believe the 486 added any instructions. There's no fundamental reason to add instructions for new CPUs - for all we know, SSE3 could have been implemented only so Intel could say "Hey look, AMD processors don't support these 13 new instructions, and are therefore inferior, even though no software uses them!". Of course, other instructions (like the i586 CMOV) are probably very useful (it lets you conditionally set values without a branch instruction, so I would guess there is a MUCH lower performance penalty)Originally posted by: rallyrulz
Thats why with every new release of cpu, theres new instructions to go with it, whether it be SSE2, 3, MMX whatever, there is new assembly level instructions
The "original" instruction set was still somewhat large, depending on what you call original (808x?), the orignal ones would have just had the mov, add, div, sub, jmp and so on, these days they probably have tons, you can download and read about them actually, probably from intel technical specs section.
NASM, MASM, a86, gas, there are lots of assemblers for x86. I don't think the second part of your not-sentence means anything ("vs.net has v6.0"? comes with TASM 6.0?)TASM is an assembly compiler, and i think vs.net has v6.0 Where as borland 5 way back had 3 i think.
Any old compiler can compile code that will be compatible - seeing as both of the companies make processors implementing the same instruction set.So presumably these new tasm compiler executables will have the new cpu instructions loaded into them and compile code that is compatable between amd and intel.
I don't think that explains how it's actually implemented very well.Right down at the hardware level, you have registers (ax, bx, cx, dx) are the primary ones, you have arithmetic logic units, they do the integer math, you have floating point units, they do the big long crunhy decimal numbers, and you have the execution unit which executes the actual instuctions (outsources the math, its like the business in the middle). And on a scale below that, you have logic gates, ands / ors/ nots /xors which when combined make 'adder' circuits for math, and the rest is some truely complex combinations which give it a brain. Combinations of transistors, resistors create all the gates.
I don't think that explains how it's actually implemented very well.Right down at the hardware level, you have registers (ax, bx, cx, dx) are the primary ones, you have arithmetic logic units, they do the integer math, you have floating point units, they do the big long crunhy decimal numbers, and you have the execution unit which executes the actual instuctions (outsources the math, its like the business in the middle). And on a scale below that, you have logic gates, ands / ors/ nots /xors which when combined make 'adder' circuits for math, and the rest is some truely complex combinations which give it a brain. Combinations of transistors, resistors create all the gates.
Originally posted by: gsellis
Therefore to simplify it, they developed the RISC arch. Technology came along and made it mostly MOOT.
The 486 did add new instructions. I don't really remember what they are though. They weren't that exciting.I don't believe the 486 added any instructions. There's no fundamental reason to add instructions for new CPUs