[Coco] 2's compliment

mrspock12 at juno.com mrspock12 at juno.com
Mon Sep 7 06:14:27 EDT 2009


just use the SUB command.

the assembler generates the SUB opcode which will be used by the processor.  the processor will generate the 2's complement of the 2nd operand and add it to the first operand.  the assembler doesn't have to do any math for you.  all it has to do is generate the opcodes.  same goes for the MUL instruction.  multiplies are performed by successive addition of the first operand to itself the number of times indicated by the second operand;  but still, it is done internally by the processor--not by the assembler.

____________________________________________________________
The Art Institutes
Earn a graphic design degree. Find a location near you today!
http://thirdpartyoffers.juno.com/TGL2131/c?cp=HqAL0B_AiEq8B79KGSjoPQAAJz2MGlx2Pi3jwjncgcBXdehhAAQAAAAFAAAAABsvXT4AAAAAAAAAAAAAAAAACEEkAAAAAA==



More information about the Coco mailing list