-
Notifications
You must be signed in to change notification settings - Fork 32
Add minimal CP/M 2.2 BIOS implementation and BDOS support #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
ericTheEchidna
commented
Nov 25, 2025
- Introduced a basic BIOS for the emulator, providing console I/O and stubs for disk routines.
- Implemented a jump table for standard CP/M functions.
- Added necessary data structures and constants for BIOS operations.
- Created a new BDOS symbol file with function addresses and constants.
- Updated CCP symbol file with relevant constants and addresses.
- Introduced a basic BIOS for the emulator, providing console I/O and stubs for disk routines. - Implemented a jump table for standard CP/M functions. - Added necessary data structures and constants for BIOS operations. - Created a new BDOS symbol file with function addresses and constants. - Updated CCP symbol file with relevant constants and addresses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a minimal CP/M 2.2 BIOS implementation and BDOS support for the emulator, establishing a fixed memory layout with BDOS at 0xE000, CCP at 0xE900, and BIOS at 0xF200.
- Replaced dynamic origin calculations with explicit address constants for predictable CP/M memory layout
- Converted assembly syntax from 8080 mnemonics to Z80 equivalents throughout CCP and BDOS modules
- Created a minimal BIOS with console I/O via port 0 and stub disk routines that return success without actual disk operations
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| bios.asm | New minimal BIOS implementation with console I/O, disk stubs, and jump table at 0xF200 |
| bios.sym | Symbol file for BIOS entry points and data addresses |
| bdos.asm | Converted to Z80 syntax and fixed BDOS address at 0xE000, removed conditional ORG logic |
| bdos.sym | Symbol file with BDOS function addresses and constants |
| ccp.asm | Converted to Z80 syntax and fixed CCP address at 0xE900, removed origin calculation |
| ccp.sym | Symbol file with CCP addresses and constants |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| settrkf equ bios+3*10 ;EQU track function | ||
| setsecf equ bios+3*11 ;EQU sector function | ||
| setdmaf equ bios+3*12 ;EQU dma function |
Copilot
AI
Nov 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent comment style: "EQU" is used instead of "set" in comments. Lines 52-54 use "EQU" (uppercase) in comments like ";EQU track function" which is confusing since EQU is an assembler directive. These should be ";set track function" or ";settrkf function" to match the naming convention.
| settrkf equ bios+3*10 ;EQU track function | |
| setsecf equ bios+3*11 ;EQU sector function | |
| setdmaf equ bios+3*12 ;EQU dma function | |
| settrkf equ bios+3*10 ;set track function | |
| setsecf equ bios+3*11 ;set sector function | |
| setdmaf equ bios+3*12 ;set dma function |
| @@ -2969,5 +2943,8 @@ dptr: ds byte ;directory pointer 0,1,2,3 | |||
| dcnt: ds word ;directory counter 0,1,...,dirmax | |||
| drec: ds word ;directory record 0,1,...,dirmax/4 | |||
|
|
|||
| bios equ ($ & 0ff00h)+100h ;next module | |||
| bios equ 0C000h;next module | |||
Copilot
AI
Nov 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space after "equ" directive. The line should be bios equ 0C000h ;next module (with a tab before the comment) to match the spacing convention used elsewhere in the file.
| bios equ 0C000h;next module | |
| bios equ 0C000h ;next module |