I'm trying to make a floppy disk operating system, which right now is in its beta. I tried reserving 2 sectors for configuration, and loaded the data into 0x7100. But even though I made sure the values are 1, it still returns 0. This is the code I'm trying to use to read the variable:
MOV AL, BYTE [0x7101]
CMP AL, 1
JE insertfunctionnamehere
Please note that this process is after I jump out of bootloader code.
This is the code I used in the bootloader to put the values in 0x7100:
MOV AX, 0x7100
MOV ES, AX
MOV CL, 17
MOV BX, 0
MOV DH, 0
MOV CH, 0
MOV AL, 2
MOV DL, BYTE [0x7FFF]
MOV AH, 02h
INT 0x13
JC error1
CMP AL, 2
JNE error3
I don't know why some values work, but others don't. I tried changing the locations of the stored memory but to no avail. Does anyone know how to help me? I'm using NASM 16-bit if that helps.