BASIC Interpreter from MikeOS is functioning
This commit is contained in:
@@ -10,7 +10,7 @@ bdb_bytes_per_sector: dw 200h ; = 512d
|
||||
bdb_sectors_per_cluster: db 01h ; sector = cluster
|
||||
bdb_reserved_sectors: dw 01h
|
||||
bdb_fat_count: db 02h ; We've got a fat1 and fat2
|
||||
bdb_dir_entries_count: dw 0E0h ; Maximum number of root directory entries
|
||||
bdb_dir_entries_count: dw 0E0h ; = 224d Maximum number of root directory entries
|
||||
bdb_total_sectors: dw 0B40h ; = 2880d
|
||||
bdb_media_descriptor_type: db 0F0h ; ignore
|
||||
bdb_sectors_per_fat: dw 09h
|
||||
@@ -68,7 +68,7 @@ main:
|
||||
shl ax,5 ; ax *= 32 (shifting 5 times)
|
||||
xor dx,dx ; Clear dx (remainder)
|
||||
div word [bdb_bytes_per_sector] ;(32*num of entries)/bytes per sector = total number of sectors we need to read
|
||||
test dx,dx ; See if there's a remainder
|
||||
test dx,dx ; See if there's a remainder, ie the root directory doesn't take up a whole number of sectors
|
||||
jz root_dir_after
|
||||
inc ax ; Add one if there's a remainder (this is like rounding up)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user