Now its just going crazy its like its skipping everything and going straight to printing that the file was found but it wasn't
Here is the new code:
READ_STAGE2:
Print LOADING_STAGE2_MSG, TEAL
call Print_ln
mov es, [DiskAddressPacket.Segment]
mov di, [DiskAddressPacket.Offset]
xor BX, BX
xor si, si
xor cx, cx
.top3:
add BX, 12
.top:
MOV AL,[ES:DI+BX] ;starting address
cmp AL,BYTE[STAGE2]
je .Done
cmp AL,BYTE[STAGE2]
jne .top3
INC BX
jmp .top
.Done:
Print Found_Possible_FILE, TEAL
call Print_ln
XOR SI, SI;Clear out for use
;INC BX
;INC SI
xor cx, cx;clear out for use as counter
.top2:
xor ax, ax
MOV AL, BYTE[ES:DI+BX]
MOV AH, 0xE
INT 0x010
MOV AL, BYTE [ES:DI+BX]
cmp AL, BYTE[STAGE2+SI]
je .Success
call Print_ln
jmp .top
.Success:
Print Progress_MSG, PURPLE
INC BX
INC SI
INC CX
cmp CX, WORD[STAGE_2_LEN]
jne .top2
;call clear
call Print_ln
Print File_Found, TEAL
call Print_ln
;call clear
SUB BX, 10
ADD DI, BX
;jump to where the file is located and run it
JMP 0x0200:0x00
.FAIL:
call Print_ln
Print FILE_NOT_FOUND, RED
cli
hlt
ret
Here is the output: