I thought the differences were due to the extra clocks used for memory references, but I was wrong! can't understand this thing myself
instruction type example cycles
==================================================== ==================
ADD reg,reg add ax,bx 1 ADD mem,reg add total, cx 3 ADD reg,mem add cx,incr 2 ADD reg,immed add bx,6 1 ADD mem,immed add pointers[bx][si],6 3 ADD accum,immed add ax,10 1 INC reg inc bx 1 INC mem inc vpage 3 MOV reg,reg mov bp,sp 1 MOV mem,reg mov array[di],bx 1 MOV reg,mem mov bx,pointer 1 MOV mem,immed mov [bx],15 1 MOV reg,immed mov cx,256 1 MOV mem,accum mov total,ax 1 MOV accum,mem mov al,string 1 MOV segreg,reg16 mov ds,ax 2, 3 MOV segreg,mem16 mov es,psp 2, 3 MOV reg16,segreg mov ax,ds 1 MOV mem16,segreg mov stack_save,ss 1 MOV reg32,controlreg mov eax,cr0 22 mov eax,cr2 12 mov eax,cr3 21, 46 mov eax,cr4 14 MOV controlreg,reg32 mov cr0,eax 4 MOV reg32,debugreg mov edx,dr0 DR0-DR3,DR6,DR7=11; DR4,DR5=12 MOV debugreg,reg32 mov dr0,ecx DR0-DR3,DR6,DR7=11; DR4,DR5=12
source: http://turkish_rational.tripod.com/trdos/pentium.txt
instructions can be translated as:
;for i = i+1 ; cycles mov ax, [i] ; 1 add ax, 1 ; 1 mov [i], ax ; 1 ;for i += 1 ; dunno the syntax of instruction. it should be the pointers one :S ;for i++ inc i ; 3 ;or mov ax, [i] ; 1 inc ax ; 1 mov [i], ax ; 1 ;for ++i mov ax, [i] ; 1 ;do stuff ; matters not inc ax ; 1 mov [i], ax ; 1
everyone turns out to be the same: S its just some data that may be useful. please comment!