Skip to content

Conversation

@ericTheEchidna
Copy link

  • 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.
Copy link

Copilot AI left a 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.

Comment on lines +52 to +54
settrkf equ bios+3*10 ;EQU track function
setsecf equ bios+3*11 ;EQU sector function
setdmaf equ bios+3*12 ;EQU dma function
Copy link

Copilot AI Nov 25, 2025

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
@@ -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
Copy link

Copilot AI Nov 25, 2025

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.

Suggested change
bios equ 0C000h;next module
bios equ 0C000h ;next module

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant