Remove rarely used assembly snippets
This commit is contained in:
parent
e1a5e7f825
commit
04369588f6
|
@ -1,14 +1,10 @@
|
||||||
snippet string "Assembler string definition"
|
snippet string86 "Assembler string definition"
|
||||||
${1:Name} db ${2:"Hello World!"} ; string $1 = $2
|
${1:Name} db ${2:"Hello World!"} ; string $1 = $2
|
||||||
len_$1 equ $ - $1 ; length of string $1
|
len_$1 equ $ - $1 ; length of string $1
|
||||||
$0
|
$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet \n "Zeilenumbruch" A
|
snippet write86 "write sys_call"
|
||||||
", 0x0a, "
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet write "write sys_call"
|
|
||||||
mov eax, 4 ; write sys_call
|
mov eax, 4 ; write sys_call
|
||||||
mov ebx, 1 ; write to stdout
|
mov ebx, 1 ; write to stdout
|
||||||
mov ecx, ${1:string} ; string to write
|
mov ecx, ${1:string} ; string to write
|
||||||
|
@ -17,7 +13,7 @@ int 0x80 ; system interrupt
|
||||||
$0
|
$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet exit "exit sys_call"
|
snippet exit86 "exit sys_call"
|
||||||
mov eax, 1 ; exit sys_call
|
mov eax, 1 ; exit sys_call
|
||||||
mov ebx, ${1:0} ; exit Code
|
mov ebx, ${1:0} ; exit Code
|
||||||
int 0x80 ; system interrupt$0
|
int 0x80 ; system interrupt$0
|
||||||
|
@ -40,33 +36,7 @@ $1:
|
||||||
$0
|
$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet read "read sys call"
|
snippet functionGCC "GCC conform function implementation" b
|
||||||
mov eax, 3 ; read sys call
|
|
||||||
mov ebx, 2 ; stdin file descriptor
|
|
||||||
mov ecx, ${1: variable} ; read input value in $1
|
|
||||||
mov edx, ${2:5} ; read $2 bytes of data
|
|
||||||
int 0x80 ; system interrupt
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet aprstore "Store all purpose register on stack"
|
|
||||||
; store ap-register
|
|
||||||
push eax
|
|
||||||
push ebx
|
|
||||||
push ecx
|
|
||||||
push edx
|
|
||||||
$0
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet aprload "Load all purpose register from stack"
|
|
||||||
; load ap-register
|
|
||||||
pop eax
|
|
||||||
pop ebx
|
|
||||||
pop ecx
|
|
||||||
pop edx
|
|
||||||
$0
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet gcc_function "GCC conform function implementation" b
|
|
||||||
$1:
|
$1:
|
||||||
push %ebp
|
push %ebp
|
||||||
mov %esp, %ebp
|
mov %esp, %ebp
|
||||||
|
|
Loading…
Reference in New Issue