Skip to content

Commit

Permalink
Merge pull request #8 from TomHarte/Wrapround
Browse files Browse the repository at this point in the history
Don't overwrite main BIOS call when installing jump vectors.
  • Loading branch information
TomHarte authored Dec 30, 2018
2 parents 9c40ab7 + dfbe846 commit f97535b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CPM for OS X/BDOS/BDOS.m
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ - (id)initWithContentsOfURL:(NSURL *)URL terminalView:(CPMTerminalView *)termina
// configure the bios trapping to occur as late as it can while
// still having room for a full BIOS jump table and obeying the
// CP/M rule that it be 256-byte aligned
uint16_t biosAddress = 0xff00;
const uint16_t biosAddress = 0xff00;
_processor.biosAddress = biosAddress;

// we'll be the delegate, in order to trap all that stuff
Expand Down Expand Up @@ -121,7 +121,7 @@ - (id)initWithContentsOfURL:(NSURL *)URL terminalView:(CPMTerminalView *)termina
// to actual program code; some CP/M programs read the addresses and
// use other means to get into the BIOS. So we need to set up appropriate
// jump statments
for(int c = biosAddress; c < 65536; c += 3)
for(int c = biosAddress; c <= 65536 - 3; c += 3)
{
[_memory setValue:0xc3 atAddress:(uint16_t)c];
[_memory setValue:(uint8_t)(c&0xff) atAddress:(uint16_t)(c+1)];
Expand Down
2 changes: 1 addition & 1 deletion CPM for OS X/CPM for OS X-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.7.0</string>
<string>0.7.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down

0 comments on commit f97535b

Please sign in to comment.