Updated lib label scopes and continued to lesson 18
This commit is contained in:
Executable
BIN
Binary file not shown.
@@ -0,0 +1,44 @@
|
||||
|
||||
; %include '../lib/fl.asm' ; local
|
||||
%include 'lib/fl.asm' ; build.sh
|
||||
|
||||
SECTION .data
|
||||
msg1 db 'Jumping to finished label.', 0h
|
||||
msg2 db 'Inside subroutine number: ', 0h
|
||||
msg3 db 'Inside subroutine "finished".', 0h
|
||||
|
||||
SECTION .text
|
||||
global _start
|
||||
|
||||
_start:
|
||||
subroutineOne:
|
||||
mov eax, msg1
|
||||
call sprintLF
|
||||
jmp .finished
|
||||
|
||||
.finished:
|
||||
mov eax, msg2
|
||||
call sprint
|
||||
mov eax, 1
|
||||
call iprintLF
|
||||
|
||||
subroutineTwo:
|
||||
mov eax, msg1
|
||||
call sprintLF
|
||||
jmp .finished
|
||||
|
||||
.finished:
|
||||
mov eax, msg2
|
||||
call sprint
|
||||
mov eax, 2
|
||||
call iprintLF
|
||||
|
||||
mov eax, msg1
|
||||
call sprintLF
|
||||
jmp finished
|
||||
|
||||
finished:
|
||||
mov eax, msg3
|
||||
call sprintLF
|
||||
call quit
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user