Greetings
Here is a pretty intriguing post for review today. I have been practicing the BIOS functions and now the program itself is as compact as I could get it. I'm mainly looking at program segmentation for file management. The good thing is that I've learned how to run files larger than the typical 512 b environment. Right now the program uses the built-in 13h disk function but the new design only gets through the first 18 sections. I've tried changing each of the other variable but I can't get it to run the code. Here is a copy of the main boot file.
; ReTimerOS
; Copyright (C) 2022,2023 Christopher Hoy
;
; This file is part of ReTimerOS
; ReTimerOS is free software: you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation, either version 3 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <https://www.gnu.org/licenses/>.
[org 0x7c00]
[bits 16]
mov cx,0
mov ds,cx
mov es,cx
cld
mov si,msgString
call kprint
disk_read:
mov cx,0
mov ds,cx
mov es,cx
mov bx,0x0000_e600
mov cl,0x24
mov bx,msgString
mov bx,0x0000_e600
mov cl,0x24
mov al,1
call read_section2
mov cx,0xe60
mov es,cx
mov bx,0
mov cx,00000h
mov cl,0x24
;mov bx,0x0000_8000
mov al,1
call read_section2
;mov bx,0x0000_7e00
mov bx,0x0000_8400
;mov bx,0x0000_A000
mov cl,5
mov bx,msgString
mov bx,0x0000_8400
;mov bx,0x0000_9000
;mov bx,0x0000_A000
mov cl,5
mov al,0x30
call read_section
mov cx,0x840
;mov cx,0x900
;mov cx,0xA00
mov es,cx
mov bx,0
mov cx,00000h
;mov al,1
mov cl,5
;mov bx,0x0000_8000
mov al,0x30
call read_section
mov bx,0x0000_8000
mov cl,3
mov bx,msgString
mov bx,0x0000_8000
mov cl,3
mov al,2
call read_section
mov cx,0x800
mov es,cx
mov bx,0
mov cx,00000h
mov cl,3
;mov bx,0x0000_8000
mov al,2
call read_section
;mov bx,0x0000_7e00
mov bx,0x0000_7e00
mov cl,2
mov bx,msgString
mov bx,0x0000_7e00
mov cl,2
mov al,1
call read_section
mov cx,0x7e0
mov es,cx
mov bx,0
mov cx,00000h
mov cl,2
;mov bx,0x0000_8000
mov al,1
call read_section
mov bx,0x0000_7e00
;mov cx,0
;mov es,cx
pusha
jmp 0x7e00
;jmp 0x9200
;jmp 0xD000
;jmp 0x11000
;jmp 0x0000_7e0:0x0000
;jmp 0x7e0:0x0000
;jmp 0x900:0x0000
;jmp 0xfc0:0x0000
jmp $
kprint:
cld
mov ah,0x0E
kstring:
lodsb
int 0x10
cmp al,0x00
jnz kstring
ret
read_section:
mov ah,0x02
; mov al,1
mov ch,0
mov dh,0
int 0x13
jc disk_check
;mov si,checkString2
;call kprint
;lea si,[checkString]
;call printstr
ret
read_section2:
mov ah,0x02
; mov al,1
mov ch,0
mov dh,1
int 0x13
jc disk_check
ret
disk_check:
;lea si,[checkString]
;call printstr
mov si,checkString
call kprint
jmp $
.done:
ret
;section .data
align 4
BOOT_DRIVE: db 0
msgString: db 'Game platform premier',10,13,0
checkString: db 'section incomplete',10,13,0
checkString2: db 'disk complete',10,13,0
times 510 -($-$$) db 0
dw 0xaa55
As I mentioned earlier you can notice the other disk read here (read_section2). Most of the configurations I reference say that each of the drive variables uses 18 sections however anytime I try to change this I get no changes on my screen. I really hope I'm not the only one that has been around this type of configuration and would really appreciate correspondence on this here.
The code is based on my most previous posts and while I believe most of disk reading is contained inside the boot file you can let me know if anyone else would like another copy of the source code for review.