Skip to content
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

Touch command attempt #23

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

shivas
Copy link

@shivas shivas commented Jan 23, 2024

Can you point me to what would be the cause that the returned error code is not printed, it's 0xEE (looking at the emulator)

@shivas shivas changed the title WIP version Touch command attempt Jan 23, 2024
@Zeal8bit
Copy link
Owner

The OPEN syscall returns the negated error on failure (As documented here https://github.com/Zeal8bit/Zeal-8-bit-OS/blob/main/kernel_headers/z88dk-z80asm/zos_sys.asm#L208)

So in your case you should use neg instruction in your label _touch_error. As such when it returns 0xEE, the returned error is ERR_READ_ONLY (0x18).

Seems like you tried to use touch on a file on the romdisk 😉

@shivas
Copy link
Author

shivas commented Jan 25, 2024

ok, then it's expected, as I was indeed doing that on romdisk

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.

2 participants