indigodarkwolf / box16

A fork of the official X16 emulator, converted to C++20 and with a bunch of features tweaked and added.
MIT License
41 stars 18 forks source link

Add check for return value of hypercall MACPTR() #112

Closed cnelson20 closed 6 months ago

cnelson20 commented 6 months ago

This PR fixes the issue where LOAD'ing files from HostFS using SA 2 or 3 would cause the KERNAL to never return control to the user if the file wasn't actually present. ( Closes #111 )

It adds a check for the return value of the MACPTR() hypercall so that if MACPTR() returns -3 to represent it is unsupported, it sets the carry flag as appropriate. image

indigodarkwolf commented 6 months ago

Looks great! Thanks for fixing this!