65X-DOS/include/65c816.h

38 lines
531 B
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// SPDX-License-Identifier: MIT
//
// boot/w65c816s.h
// Defines for the 65C816 architecture
//
// Copyright © 2024 Kyle J Cardoza <Kyle.Cardoza@icloud.com>
#ifdef __CALYPSI_ASSEMBLER__
#define native_mode \
clc \
xce
#define long_a rep #0x20
#define short_a sep #0x20
#define long_i rep #0x10
#define short_i sep #0x10
#define save_registers \
php \
long_a \
long_i \
pha \
phx \
phy
#define restore_registers \
long_a \
long_i \
ply \
plx \
pla \
plp
#endif