From 04369588f6c6afe7c2366026555c20a2a4ea80c8 Mon Sep 17 00:00:00 2001 From: yannickreiss Date: Sun, 15 Sep 2024 10:20:09 +0200 Subject: [PATCH] Remove rarely used assembly snippets --- UltiSnips/asm.snippets | 38 ++++---------------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/UltiSnips/asm.snippets b/UltiSnips/asm.snippets index 3d1fb26..2fd4015 100644 --- a/UltiSnips/asm.snippets +++ b/UltiSnips/asm.snippets @@ -1,14 +1,10 @@ -snippet string "Assembler string definition" +snippet string86 "Assembler string definition" ${1:Name} db ${2:"Hello World!"} ; string $1 = $2 len_$1 equ $ - $1 ; length of string $1 $0 endsnippet -snippet \n "Zeilenumbruch" A -", 0x0a, " -endsnippet - -snippet write "write sys_call" +snippet write86 "write sys_call" mov eax, 4 ; write sys_call mov ebx, 1 ; write to stdout mov ecx, ${1:string} ; string to write @@ -17,7 +13,7 @@ int 0x80 ; system interrupt $0 endsnippet -snippet exit "exit sys_call" +snippet exit86 "exit sys_call" mov eax, 1 ; exit sys_call mov ebx, ${1:0} ; exit Code int 0x80 ; system interrupt$0 @@ -40,33 +36,7 @@ $1: $0 endsnippet -snippet read "read sys call" -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 +snippet functionGCC "GCC conform function implementation" b $1: push %ebp mov %esp, %ebp