Added build script and continued to lesson 10
This commit is contained in:
+27
-1
@@ -1,4 +1,6 @@
|
||||
|
||||
;------------------------------------------
|
||||
; int slen(String message)
|
||||
; String length calculation function
|
||||
slen:
|
||||
push ebx
|
||||
mov ebx, eax
|
||||
@@ -16,6 +18,9 @@ ret
|
||||
|
||||
|
||||
|
||||
;------------------------------------------
|
||||
; void sprint(String message)
|
||||
; String printing function
|
||||
sprint:
|
||||
push edx
|
||||
push ecx
|
||||
@@ -38,6 +43,27 @@ ret
|
||||
|
||||
|
||||
|
||||
;------------------------------------------
|
||||
; void sprintLF(String message)
|
||||
; String printing with line feed function
|
||||
sprintLF:
|
||||
call sprint
|
||||
|
||||
push eax
|
||||
mov eax, 0Ah
|
||||
push eax
|
||||
|
||||
mov eax, esp
|
||||
call sprint
|
||||
pop eax
|
||||
pop eax
|
||||
ret
|
||||
|
||||
|
||||
|
||||
;------------------------------------------
|
||||
; void exit()
|
||||
; Exit program and restore resources
|
||||
quit:
|
||||
mov ebx, 0
|
||||
mov eax, 1
|
||||
|
||||
Reference in New Issue
Block a user