Added 'sim6502' and 'sim65C02' targets.
The targets allow to run cc65 programs in the sim65 exection einvironment. As there are no "real" i/o facilities there's no need for header files. Paravirtualized entry points are mapped to $FFF0 ff. There's a large cc65 progam area from $0200-$FFEF. The binary format includes a one-byte header indicating the required execution environment: The value 0 means 6502 and the value 1 means 65C02. The load adress for the binary is fixed to $0200. Note: Running sim65C02 programs currently doesn't work bcause sim65 doesn't actually implement 65C02 opcodes.
This commit is contained in:
16
libsrc/sim6502/paravirt.s
Normal file
16
libsrc/sim6502/paravirt.s
Normal file
@@ -0,0 +1,16 @@
|
||||
;
|
||||
; Oliver Schmidt, 2013-05-16
|
||||
;
|
||||
; int open (const char* name, int flags, ...);
|
||||
; int __fastcall__ close (int fd);
|
||||
; int __fastcall__ read (int fd, void* buf, unsigned count);
|
||||
; int __fastcall__ write (int fd, const void* buf, unsigned count);
|
||||
;
|
||||
|
||||
.export exit, _open, _close, _read, _write
|
||||
|
||||
exit := $FFF0
|
||||
_open := $FFF1
|
||||
_close := $FFF2
|
||||
_read := $FFF3
|
||||
_write := $FFF4
|
||||
Reference in New Issue
Block a user