2
Software & Sourcecode
Navigation
Portal
Index
Online Projects
Download
Galerie
Libary

Main
back
[*]registerValues
al = byte = db = 8bit = sbyte mit VZ
ax = word = dw = 16bit = sword
eax = dword = dd = 32 bit = sdword
qword = dq = 64 bit

[*]radix
h: hexidezimal
o: octal
b: bin?r
r: encoded real
ohne radix: dezimal

[*]cmp
cmp al,bl
JG >
JL <
JE =
JNE not=

[*]umwandlung
mov eax,0h
mov ax,0h
mov ah,0h
movsx eax,al al zu eax
movzx eax,al eax zu al

[*]segment
mov ax,var1
mov es,ax
mov ax,es
mov ebx,offset var1
mov ax,word ptr es:[ebx]

[*]add/sub
mov al,3
mov bl,2
add al,bl
sub al,bl

[*]mul
mov eax,0
mov ebx,0
mov ax,10
mov bl,6
mul bl

[*]div
mov ax,20
mov bl,6
div bl
cmp ah,0
JE keinRest
cmp ah,0
JNE mitRest
keinRest:
printf("Ergebniss: %x ... kein Restn",ax)
jmp toExit
mitRest:
printf("Ergebniss: %x",ah)
printf(" ... Rest: %x n",eax)
jmp toExit

[*]variabelntyp string
.data
txt0 db "gib was ein: ",0
buffer1 db 100 dup(?),0
singleValue db 0
ein dd 0
myRegister db 1,2
.code
main:
invoke StdIn, addr buffer1,100
invoke locate, 0, 1
mov al,byte ptr[buffer1 + 0]
---
invoke StdIn,addr singleValue,1
mov[ein],sval(input("eingabe : "))
mov di,0
mov al,myRegister[di]
mov al,myRegistery+0

[*]subProc
p1 proc
...
ret
p1 endp
call p1

[*]Makro
m1 macro param1,param2
mov cx,param1
...
endm
m1 1,2

[*]JMP
mov edi,0
jmp m1m1:
add edi,1
cmp edi,3
JL m1
cmp edi,3
JE m2
m2: exit

[*]stack
mov eax,0
push eax
push eax
mov eax,3
push eax
push ebp
mov ebp,esp
mov eax,[ebp+4]

[*]rotation/schiebebefehle
mov eax,10110b ;
22d :> 44d 101100b 2ch
shl eax,1
<- shl[max] = 0
22d :> 11d 01011b bh
shr eax,1
-> shr[0] = 0
22d :> 11d 01011b bh
sar eax,1
-> sar[0] = sar[1]
22d :> 45d 101101b 2dh
rol eax,1
<- rol[max] = rol[1]
22d :> 11d 01011b bh
ror eax,1
-> ror[0] = ror[max]
22d :> 45d+C 10110Cb 2dh+C
rcl eax,1
<- rcl[max] = c
22d :> 11d C1011b bh+C
rcl eax,1
-> rcl[0] = c

[*]dynamische Stackabfrage
.code
m1 macro
mov edi,0
jmp loop1
loop1:
add edi,1
mov ax,4
movzx edi,di mov bx,di movzx bx,bl
mul bl
movsx eax,ax
add eax,ebp
mov ebx,[eax] printf("--%x n",ebx)
cmp edi,6
JL loop1
endm
main:
push 0
push 0
push 1
push ebp
mov ebp,esp
m1

[*]countStack
.data
txt0 db "text eingeben",0
buffer1 db 100 dup(0),0
count db 0
.code
m1 macro
mov edi,0
jmp loop1
loop1:
mov al,byte ptr[buffer1+edi]
cmp al,0 JE subExit
add edi,1
cmp edi,100 JL loop1
subExit:
endm
main:
invoke StdOut,addr txt0
invoke locate,0,1
invoke StdIn,addr buffer1,100
invoke locate,0,2
m1
mov eax,edi
movzx eax,al
mov count,al
printf("al: %x n",al)