Sao nó in ra tên sách đến 2 lần vậy ạ?
include \masm32\include\masm32rt.inc
.data
luachon dd ?
tensach dd ?
.code
menu_f proc
print chr$("+------------- menu -----------+",13,10)
print chr$("| |",13,10)
print chr$("| 1. Nhap ten sach |",13,10)
print chr$("| |",13,10)
print chr$("| 2. Hien sach |",13,10)
print chr$("| |",13,10)
print chr$("| 3. thoat |",13,10)
print chr$("| |",13,10)
print chr$("+------------------------------+",13,10)
call enter_f
ret
menu_f endp
enter_f proc
mov luachon, sval(input(" Nhap lua chon cua ban: "))
call ex_f
ret
enter_f endp
ex_f proc
cmp luachon,1
je op1
cmp luachon,2
je op2
cmp luachon,3
je op3
op1:
call addbook_f
op2:
call showbook_f
op3:
jmp thoat
ret
ex_f endp
addbook_f proc
mov tensach,input(" Vui long nhap ten sach: ")
print chr$(13,10)
call showbook_f
ret
addbook_f endp
showbook_f proc
print chr$(" Ten sach ban vua nhap la: ")
print tensach
ret
showbook_f endp
start:
call menu_f
thoat:
exit
end start