Com 212 intro to system programming book Theory


Register Register instructions



Download 0.65 Mb.
View original pdf
Page19/72
Date13.05.2021
Size0.65 Mb.
#56617
1   ...   15   16   17   18   19   20   21   22   ...   72
com-212-introduction-to-system-programming-theory
9833 SS1 FISHERY LESSON NOTE
2. Register <-> Register instructions
mov reg -> reg Copy a register's value to another mov val -> reg register, or set its value to a constant. All arithmetic goes from register to register add reg, reg -> reg Add reg & reg and put the sum in reg. sub reg, reg -> reg Subtract reg from reg. mul reg, reg -> reg Multiply reg & reg. idiv reg, reg -> reg Do integer division of reg into reg. imod reg, reg -> reg Do reg mod reg. There are two special instructions that let you perform addition and subtraction on the stack pointer push reg This subtracts the value of stack pointer push val by value contained in reg or the constant defined in val. pop reg This adds the value of reg or val pop val to the stack pointer.

Download 0.65 Mb.

Share with your friends:
1   ...   15   16   17   18   19   20   21   22   ...   72




The database is protected by copyright ©ininet.org 2024
send message

    Main page