1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-28 03:29:39 +00:00
cc65 - a freeware C compiler for 6502 based systems
Go to file
Marcus Rowe 67cd0c2197 Added .asize and .isize pseudo variables
These pseudo variables will return the size of the accumulator/index
in bits.

For the 65816 instruction set .ASIZE/.ISIZE will return either 8 or 16,
depending on the current size of the operand in immediate addressing
mode.

For all other CPU instruction sets, .ASIZE/.ISIZE will always return 8.

For example:

	; Reverse Subtract with Accumulator
	; A = memory - A
	.macro rsb param
		.if .asize = 8
			eor	#$ff
		.else
			eor	#$ffff
		.endif
		sec
		adc	param
	.endmacro
2015-10-20 09:30:25 +10:00
asminc Adapted, to the c64 target, the INIT-segment overlay scheme from the apple2 targets. 2015-10-05 05:47:43 -04:00
cfg Adjusted current working directory initialization on Apple and Atari. 2015-10-15 00:15:38 +02:00
doc Added .asize and .isize pseudo variables 2015-10-20 09:30:25 +10:00
include Keep low level VIC sprite stuff out of user code. 2015-10-09 18:33:35 +02:00
libsrc Adjusted current working directory initialization on Apple and Atari. 2015-10-15 00:15:38 +02:00
samples Added missing parentheses. 2015-10-17 12:09:06 -04:00
src Added .asize and .isize pseudo variables 2015-10-20 09:30:25 +10:00
test Merge pull request #197 from greg-king5/static 2015-08-15 06:53:40 +02:00
testcode fix gregs complaints :) 2015-09-04 14:14:17 +02:00
util Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
.gitignore use 'testwrk' dir for bdiff 2014-11-25 12:56:45 +01:00
.travis.yml Run the regression tests _before_ replacing the built binaries with Win32 cross-builds. 2015-06-27 00:43:41 +02:00
LICENSE Simplified license. 2015-05-05 21:56:23 +02:00
Makefile Create zip file. 2014-03-09 00:20:17 +01:00
Makefile.travis Fixed file name of Windows binary snapshot. 2015-01-20 21:00:44 +01:00
README.md Update README.md 2015-09-24 10:16:46 +02:00

Windows Snapshot

Documentation

Wiki

Build Status

cc65 is a complete cross development package for 65(C)02 systems, including a powerful macro assembler, a C compiler, linker, librarian and several other tools.

cc65 has C and runtime library support for many of the old 6502 machines, including

  • the following Commodore machines:
    • VIC20
    • C16/C116 and Plus/4
    • C64
    • C128
    • CBM 510 (aka P500)
    • the 600/700 family
    • newer PET machines (not 2001).
  • the Apple ][+ and successors.
  • the Atari 8 bit machines.
  • the Atari 5200 console.
  • GEOS for the C64, C128 and Apple //e.
  • the NEC PC-Engine (aka TurboGrafx-16).
  • the Nintendo Entertainment System (NES) console.
  • the Supervision console.
  • the Oric Atmos.
  • the Lynx console.
  • the Ohio Scientific Challenger 1P

The libraries are fairly portable, so creating a version for other 6502s shouldn't be too much work.