1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-12-12 21:29:30 +00:00
6502bench/SourceGen/RuntimeData/Apple/SOS.sym65
Andy McFadden dfd5bcab1b Optionally treat BRKs as two-byte instructions
Early data sheets listed BRK as one byte, but RTI after a BRK skips
the following byte, effectively making BRK a 2-byte instruction.
Sometimes, such as when diassembling Apple /// SOS code, it's handy
to treat it that way explicitly.

This change makes two-byte BRKs optional, controlled by a checkbox
in the project settings.  In the system definitions it defaults to
true for Apple ///, false for all others.

ACME doesn't allow BRK to have an arg, and cc65 only allows it for
65816 code (?), so it's emitted as a hex blob for those assemblers.
Anyone wishing to target those assemblers should stick to 1-byte mode.

Extension scripts have to switch between formatting one byte of
inline data and formatting an instruction with a one-byte operand.
A helper function has been added to the plugin Util class.

To get some regression test coverage, 2022-extension-scripts has
been configured to use two-byte BRK.

Also, added/corrected some SOS constants.

See also issue #44.
2019-10-09 14:55:56 -07:00

57 lines
1.4 KiB
Plaintext

; Copyright 2018 David Schmidt. All Rights Reserved.
; See the LICENSE.txt file for distribution terms (Apache 2.0).
;
; Source: SOS programmer's guide
; SOS Reference Manual, Volume 2 (Apple 1982)
*SYNOPSIS Apple /// Sophisticated Operating System constants.
; SOS MLI function codes.
*TAG SOS-MLI-Functions
SOS_REQUEST_SEG = $40
SOS_FIND_SEG = $41
SOS_CHANGE_SEG = $42
SOS_GET_SEG_INFO = $43
SOS_GET_SEG_NUM = $44
SOS_RELEASE_SEG = $45
SOS_SET_FENCE = $60
SOS_GET_FENCE = $61
SOS_SET_TIME = $62
SOS_GET_TIME = $63
SOS_GET_ANALOG = $64
; SOS ref: "TERMINATE"
; SOS ref: "No errors are possible. This is an excellent call for beginners."
SOS_QUIT = $65
SOS_READBLOCK = $80
SOS_WRITEBLOCK = $81
SOS_D_STATUS = $82
SOS_D_CONTROL = $83
SOS_GET_DEV_NUM = $84
SOS_D_INFO = $85
SOS_CREATE = $C0
SOS_DESTROY = $C1
SOS_RENAME = $C2
SOS_SET_FILE_INFO = $C3
SOS_GET_FILE_INFO = $C4
SOS_VOLUME = $C5
SOS_SET_PREFIX = $C6
SOS_GET_PREFIX = $C7
SOS_OPEN = $C8
SOS_NEWLINE = $C9
; SOS ref: "READ"
SOS_READFILE = $CA
; SOS ref: "WRITE"
SOS_WRITEFILE = $CB
SOS_CLOSE = $CC
SOS_FLUSH = $CD
SOS_SET_MARK = $CE
SOS_GET_MARK = $CF
SOS_SET_EOF = $D0
SOS_GET_EOF = $D1
SOS_SET_LEVEL = $D2
SOS_GET_LEVEL = $D3