Difference between revisions of "Machine language"

From ThorstensHome
Jump to: navigation, search
Line 4: Line 4:
 
! x86 machine language !! assembler command !! remark
 
! x86 machine language !! assembler command !! remark
 
|-
 
|-
| 54 ||       push  rsp
+
| 0a                  || .byte 0xa ||
 
|-
 
|-
| 85 c0 || test eax,eax ||  
+
| 41                  || inc    cx ||
 
|-
 
|-
| 90 || NOP ||  
+
| 54                  || push  rsp ||
 
|-
 
|-
| b8 00 00 00 00  || mov    eax,0x0 ||  
+
| 85 c0                || test eax,eax ||  
 
|-
 
|-
| c3              ||   ret  ||
+
| 90                  || NOP ||  
 
|-
 
|-
| cd 10 || int 10 ||
+
| b8 00 00 00 00      || mov    eax,0x0 ||  
 
|-
 
|-
| eb fd || short jump to executing the byte before eb ||
+
| c3                  || ret  ||
 
|-
 
|-
| fa || cli || This will clear the interrupt flag in the processor meaning interrupts will not be processed after the flag is set again. This means a high risk - no more keyboard input etc.. So this is a privileged command and may only be executed by the operating system.
+
| cd 10                || int 10 ||
 +
|-
 +
| eb fd                || short jump to executing the byte before eb ||
 +
|-
 +
| fa                   || cli || This will clear the interrupt flag in the processor meaning interrupts will not be processed after the flag is set again. This means a high risk - no more keyboard input etc.. So this is a privileged command and may only be executed by the operating system.
 
|}
 
|}

Revision as of 11:20, 14 December 2014

This shows a mapping of x86 machine language to assembler

x86 machine language assembler command remark
0a .byte 0xa
41 inc cx
54 push rsp
85 c0 test eax,eax
90 NOP
b8 00 00 00 00 mov eax,0x0
c3 ret
cd 10 int 10
eb fd short jump to executing the byte before eb
fa cli This will clear the interrupt flag in the processor meaning interrupts will not be processed after the flag is set again. This means a high risk - no more keyboard input etc.. So this is a privileged command and may only be executed by the operating system.