Add conditional code for tests.asm (include certain tests or not)

This commit is contained in:
2025-07-05 02:30:18 +02:00
parent 2e9d88ed76
commit a193054304

View File

@@ -11,6 +11,7 @@ extern strlen
section .rodata
TEST_print equ 1
TEST_puts equ 1
TEST_strlen equ 1
; print()
@@ -37,24 +38,30 @@ _start:
;---
;--- print()
;---
%if TEST_print
lea rdi, [rel msgPrint]
call print
%endif
;---
;--- puts()
;---
%if TEST_puts
lea rdi, [rel msgPuts]
call puts
%endif
;---
;--- strlen()
;---
%if TEST_strlen
; TEST 1
lea rdi, [rel strlenStr1]
call strlen
; TEST 2
lea rdi, [rel strlenStr2]
call strlen
%endif
;---
;--- exit()