there is always an warning message and also when I type in the right student number it always show access denied

.model small
.stack 64
.data

.data
username_buffer DB 20 DUP(?) ; Buffer to store the username
prompt_username DB “Enter your username: $”
msg_wrong_username DB “Wrong username entered. Access denied.$”
correct_username DB ‘A21-31312$’

fullname label byte 
maxfullname db 50     
curfullname db ?
fullnamefield db 50 dup(?)

cors label byte 
maxcors db 50
curcors db ?
corsfield db 50 dup(?) 

newline db 13, 10, "$"

msg_header db "Manuel S. Enverga University Foundation",13,10,"$"
msg_header2 db "Lucena City",13,10,"$"
msg_fullname db "Name: $"
msg_studnum db "Student Number: $"
msg_cors db "Course/ Year: $"

menu db "MAIN MENU",13,10,"$"
mission db "[M]ission", 13,10,"$"
vision db "[V]ision", 13,10,"$"
goal db "[G]oal", 13,10,"$"
core_values db "[C]ore Values", 13,10, "$"
resume db "[R]esume", 13,10,"$"
msg_exit db "[E]xit", 13,10,"$"
choice db "Enter your choice: $"

passwordd db "Password:",13,10,"$"
accept db "Code Accepted:",13,10,"$"
denied db "Error Message: ",13,10,"$"
denied2 db "***Unauthorized User***$",13,10,"$"
invalid_choice db "Invalid choice, try again.", 13, 10, "$"
invalid_studnum db "Invalid Student Number. Please try again.", 13, 10, "$"

mission_msg db "Mission: In 2030, the Manuel S. Enverga University Foundation is a globally competitive university with high concentrations of talent, excellent teaching environment, rigorous program quality, sufficient resources, and a culture of collaboration.", 13, 10, "Press R to resume", 13, 10, "$"
vision_msg db "Vision: The Manuel S. Enverga University Foundation is a private, non-stock, non-profit, non-sectarian educational foundation with a three-fold function – instruction, research and community service – offering responsive and alternative programs supportive of national development goals and standards of global excellence.", 13, 10, "Press R to resume", 13, 10, "$"
goal_msg db "Goal: The Manuel S. Enverga University Foundation shall produce graduates who have research-based knowledge, leadership and managerial skills, and professionalism.", 13, 10, "Press R to resume", 13, 10, "$"
core_values_msg db "Core Values: MINDFULNESS, SERVICE, EXCELLENCE, UNITY, FORTITUDE", 13, 10, "Press R to resume", 13, 10, "$"

.code
begin:
mov ax, @data
mov ds, ax

start:
call clrs

mov ah, 02h     ;aligning
mov bh, 00
mov dh, 11
mov dl, 27
int 10h

; Display prompt for username
MOV AH, 09h
MOV DX, OFFSET prompt_username
INT 21h

; Read username characters
MOV SI, OFFSET username_buffer  ; Initialize SI to point to the username buffer
MOV CX, 20                      ; Set CX to the maximum number of characters to read

read_username:
MOV AH, 01h ; Read a single character input
INT 21h
CMP AL, 0Dh ; Check for carriage return
JE end_username ; Exit loop if carriage return is encountered
MOV [SI], AL ; Store the input character in the buffer
INC SI ; Move to the next position in the buffer
LOOP read_username ; Repeat until all characters are read

end_username:
; Compare entered username with correct username
MOV SI, OFFSET username_buffer ; Initialize SI to point to the entered username
MOV DI, OFFSET correct_username ; Initialize DI to point to the correct username

compare_username:
MOV AL, [SI] ; Load a byte from the entered username
CMP AL, [DI] ; Compare it with the corresponding byte in the correct username
JNE wrong_username ; Jump if they don’t match
INC SI ; Move to the next character in the entered username
INC DI ; Move to the next character in the correct username
CMP AL, ‘$’ ; Check if end of entered username is reached
JE username_correct ; Jump if end of entered username is reached
JMP compare_username ; Repeat until end of entered username is reached

username_correct:

JMP password
; Jump to password input section
; You can add the password input section here

; Exit program
MOV AH, 4Ch
INT 21h

wrong_username:
call clrs
; Display wrong username message
mov ah, 02h ;aligning
mov bh, 00
mov dh, 12
mov dl, 20
int 10h

mov ah, 09h
mov dx, offset msg_wrong_username
int 21h

mov ah, 07h                 
int 21h

cmp al, "1"
mov ah, 02h
mov dl, " "
int 21h
jmp right1
jne wrong1

jmp start

wrong1:
jmp start
right1:
jmp start

password:

mov ah, 02h     ;aligning
mov bh, 00
mov dh, 12
mov dl, 27
int 10h

mov ah, 09h
mov dx, offset passwordd
int 21h

mov ah, 02h     ;aligning
mov bh, 00
mov dh, 12
mov dl, 36
int 10h

mov ah, 07h         ;ask input
int 21h

cmp al, "1"
mov ah, 02h
mov dl, "*"
int 21h

mov ah, 07h
int 21h

cmp al, "2"
mov ah, 02h
mov dl, "*"
int 21h

mov ah, 07h
int 21h

cmp al, "3"
mov ah, 02h
mov dl, "*"
int 21h

mov ah, 07h
int 21h

cmp al, "4"
mov ah, 02h
mov dl, "*"
int 21h

jne incorrect
jmp correct

incorrect:

call clrs
mov ah, 02h     ;aligning
mov bh, 00
mov dh, 11
mov dl, 21
int 10h

mov ah, 09h
mov dx, offset denied
int 21h

mov ah, 02h     ;aligning
mov bh, 00
mov dh, 12
mov dl, 20
int 10h

mov ah, 09h
mov dx, offset denied2
int 21h

mov ah, 07h                 
int 21h

cmp al, "1"
mov ah, 02h
mov dl, " "
int 21h
jmp right
jne wrong

jmp start

wrong:
jmp start
right:
jmp start

correct:
call clrs

mov ah, 02h     ;aligning
mov bh, 00
mov dh, 11
mov dl, 27
int 10h

mov ah , 9h             ;for Name
mov dx, offset msg_fullname
int 21h
mov ah, 0ah 
mov dx, offset fullname
int 21h
mov bx, 0 
mov bl, curfullname
mov fullnamefield[bx],"$"


mov ah, 02h     ;aligning
mov bh, 00
mov dh, 12
mov dl, 27
int 10h

mov ah , 9h             ;for cors
mov dx, offset msg_cors
int 21h
mov ah, 0ah 
mov dx, offset cors
int 21h
mov bx, 0 
mov bl, curcors
mov corsfield[bx],"$"

main_menu:
call clrs

mov ah, 02h                 ; HEADER!!!
mov bh, 00
mov dh, 05
mov dl, 23
int 10h

mov ah, 9h
mov dx, offset msg_header
int 21h 

mov ah, 02h             ;aligning
mov bh, 00
mov dh, 06
mov dl, 35
int 10h
    
mov ah, 9h 
mov dx, offset msg_header2
int 21h


mov ah, 02h             ;aligning
mov bh, 00
mov dh, 08
mov dl, 55
int 10h

mov ah, 9h
mov dx, offset msg_studnum
int 21h
mov ah, 9h
mov dx, offset username_buffer
int 21h

mov ah, 02h             ;aligning
mov bh, 00
mov dh, 09
mov dl, 00
int 10h

mov ah, 9h
mov dx, offset msg_fullname
int 21h
mov ah, 9h
mov dx, offset fullnamefield
int 21h

mov ah, 9h
mov dx, offset newline
int 21h 

mov ah, 9h
mov dx, offset msg_cors
int 21h
mov ah, 9h
mov dx, offset corsfield
int 21h    

mov ah, 02h             ;aligning
mov bh, 00
mov dh, 13
mov dl, 34
int 10h

mov ah, 9h
mov dx, offset menu
int 21h 

mov ah, 02h             ;aligning
mov bh, 00
mov dh, 14
mov dl, 31
int 10h

mov ah, 9h
mov dx, offset mission
int 21h 

mov ah, 02h             ;aligning
mov bh, 00
mov dh, 15
mov dl, 31
int 10h

mov ah, 9h
mov dx, offset vision
int 21h 

mov ah, 02h             ;aligning
mov bh, 00
mov dh, 16
mov dl, 31
int 10h

mov ah, 9h
mov dx, offset goal
int 21h 

mov ah, 02h             ;aligning
mov bh, 00
mov dh, 17
mov dl, 31
int 10h

mov ah, 9h
mov dx, offset core_values
int 21h 

mov ah, 02h             ;aligning
mov bh, 00
mov dh, 18
mov dl, 31
int 10h

mov ah, 9h
mov dx, offset resume
int 21h 

mov ah, 02h             ;aligning
mov bh, 00
mov dh, 19
mov dl, 31
int 10h

mov ah, 9h
mov dx, offset msg_exit
int 21h 

mov ah, 02h             ;aligning
mov bh, 00
mov dh, 20
mov dl, 31
int 10h

mov ah, 9h
mov dx, offset choice
int 21h 

; Get user input and handle choices
mov ah, 07h
int 21h
cmp al, 'm'
je show_mission
cmp al, 'M'
je show_mission
cmp al, 'v'
je show_vision
cmp al, 'V'
je show_vision
cmp al, 'g'
je show_goal
cmp al, 'G'
je show_goal
cmp al, 'c'
je show_core_values
cmp al, 'C'
je show_core_values
cmp al, 'r'
je show_resume
cmp al, 'R'
je show_resume
cmp al, 'e'
je exit_program
cmp al, 'E'
je exit_program
jmp invalid_selection

show_mission:
call clrs
mov ah, 02h ;aligning
mov bh, 00
mov dh, 11
mov dl, 00
int 10h
mov ah, 09h
mov dx, offset mission_msg
int 21h
call wait_for_exit
jmp main_menu

show_vision:
call clrs
mov ah, 02h ;aligning
mov bh, 00
mov dh, 11
mov dl, 00
int 10h
mov ah, 09h
mov dx, offset vision_msg
int 21h
call wait_for_exit
jmp main_menu

show_goal:
call clrs
mov ah, 02h ;aligning
mov bh, 00
mov dh, 11
mov dl, 00
int 10h
mov ah, 09h
mov dx, offset goal_msg
int 21h
call wait_for_exit
jmp main_menu

show_core_values:
call clrs
mov ah, 02h ;aligning
mov bh, 00
mov dh, 11
mov dl, 00
int 10h
mov ah, 09h
mov dx, offset core_values_msg
int 21h
call wait_for_exit
jmp main_menu

show_resume:
call clrs
; Display resume information here
call wait_for_exit
jmp main_menu

exit_program:
mov ah, 4ch
int 21h

invalid_selection:
call clrs
mov ah, 09h
mov dx, offset invalid_choice
int 21h
jmp main_menu

wait_for_exit proc
mov ah, 07h
wait_loop:
int 21h
cmp al, ‘R’
jne wait_loop
ret
wait_for_exit endp

clrs proc
mov ax, 0600h
mov bh, 07h
mov cx, 0000h
mov dx, 184fh
int 10h
ret
clrs endp

end begin

New contributor

Johnny Afable is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật