Irmen de Jong
a3fa527378
move shared cbm diskio to its own file (c64/c128) so that pet/atari/neo targets give better error message when trying to import non existing diskio module there
2024-11-10 15:35:36 +01:00
Irmen de Jong
300d1a871c
c128 banks out basic, added banks() and getbanks()
2024-11-09 15:44:08 +01:00
Irmen de Jong
a50400b7d1
initial neo6502 target
2024-11-08 19:04:49 +01:00
Irmen de Jong
9864abd393
romsub keyword is now extsub
2024-11-06 22:14:53 +01:00
Irmen de Jong
a5c7393561
tweaking program startup and cleanup stuff
2024-11-05 21:12:27 +01:00
Irmen de Jong
459e9f8f3b
jsrfar stuff
2024-11-05 01:06:06 +01:00
Irmen de Jong
155896c4c7
added @rombank and @rambank bank number tags on romsubs
...
on cx16 and c128 targets the compiler then automatically inserts a CALLFAR instead of a regular JSR to automatically do the bank switching.
2024-11-03 18:19:31 +01:00
Irmen de Jong
570b574b93
added sys.memcmp
2024-10-28 00:41:26 +01:00
Irmen de Jong
4b4af9b527
no longer silently add RTS to asmsubs that don't have one
2024-10-27 13:49:00 +01:00
Irmen de Jong
fea531be9a
add sys.sizeof_bool, _ubyte, _uword constants
2024-10-07 20:45:13 +02:00
Irmen de Jong
ae669af904
add sys.sizeof_byte, _word, _float constants
...
because Antlr doesn't allow the grammar to contain a sizeof(typename) rule to override the sizeof(identifier) rule
2024-10-07 19:17:37 +02:00
Irmen de Jong
1541ad2160
fix variable init order mistake in program startup
...
reset multiply bit at end of verafx.muls
2024-09-28 19:17:45 +02:00
Irmen de Jong
ddb8346711
added txt.cls() as a shorter alternative to clear_screen().
...
cx16: added new character encodings, and routines in textio to enable the character sets for them.
cx16: added txt.chrout_lit() and txt.print_lit() to always print the literal characters and never as control codes
2024-04-07 19:32:44 +02:00
Irmen de Jong
66a6659a6e
cbm.STOP2() and cbm.GETIN2() convenience routines
2024-04-06 02:16:21 +02:00
Irmen de Jong
34f3169dda
tweak library routines for multiple return values.
...
cbm:
MEMTOP changed (now also returns nr of banks in A)
STOP2 removed (just use STOP)
RDTIM_safe() added TEST IRQ ENABLE
RDTIM16 changed (internally) TEST IRQ ENABLE
cx16:
screen_mode changed (now also returns width and height in X,Y)
kbdbuf_peek2 removed (just use kbdbuf_peek)
joystick_get changed (presence now returned as bool in Y)
joystick_get2 removed (just use joystick_get)
mouse_pos changed (now properly returns x and y position in R0 and R1)
set_led_brightness changed into set_led_state, with only a boolean on/off argument. There is no variable brightness.
sys.set_leds_brightness() removed. Use cx16.set_led_brightness().
2024-04-04 01:39:19 +02:00
Irmen de Jong
b93fa75377
consolidate cbm textio routines
2024-03-28 00:39:58 +01:00
Irmen de Jong
5a0524ff4d
various fixes
2024-03-16 18:48:06 +01:00
Irmen de Jong
1818738fc8
fixed potential bug in cx16.kbdbuf_clear() is and it is now cbm.kbdbuf_clear() and is available on all cbm like targets
2024-03-14 22:12:29 +01:00
Irmen de Jong
80f39e8097
Merge branch 'booleans'
...
# Conflicts:
# compiler/res/prog8lib/cx16/monogfx.p8
# compiler/res/prog8lib/virtual/monogfx.p8
# compiler/src/prog8/compiler/astprocessing/BoolRemover.kt
# compiler/test/TestTypecasts.kt
# docs/source/todo.rst
# examples/cx16/highresbitmap.p8
# examples/test.p8
# httpCompilerService/src/prog8/http/TestHttp.kt
2024-03-11 01:00:48 +01:00
Irmen de Jong
f739e679e4
added sys.exit2 and sys.exit3 to set more result registers at program exit
...
todo
2024-03-09 03:30:05 +01:00
Irmen de Jong
c532e28841
fix several remaining bool return values in library routines
2024-03-02 23:19:39 +01:00
Irmen de Jong
d4b087ea3f
added txt.bell() to make terminal beep/bell sound on most systems
2024-02-21 17:35:37 +01:00
Irmen de Jong
88458f5355
faster array copy and fix for length 256
2024-02-11 23:57:38 +01:00
Irmen de Jong
d33aed4ed5
added txt.petscii2scr() and txt.petscii2scr_str()
2024-02-07 22:36:43 +01:00
Irmen de Jong
a14c192ea3
also other targets
2024-01-18 22:31:34 +01:00
Irmen de Jong
19a2110ba2
fix exit() now actually correctly setting the return code in A
...
also, moved some cleanup stuff such as CLRCHN from exit() to the cleanup routine that is always called.
finally, also call the cleanup routine when %option no_sysinit is used
2024-01-04 00:43:35 +01:00
Irmen de Jong
2b8f613a00
added %option ignore_unused to suppress warnings about unused vars and subs in that module/block.
...
Also improved error for invalid directive.
2023-12-26 23:37:59 +01:00
Irmen de Jong
0d44492086
push,pushw,pop and popw are no longer built-in functions but regular routines in sys
2023-12-26 14:47:31 +01:00
Irmen de Jong
38a22fbc99
allow %option no_symbol_prefixing also on module scope
2023-12-26 12:31:18 +01:00
Irmen de Jong
997288fa03
added cbm.CLEARST() to reset ST to 0
2023-12-18 01:20:24 +01:00
Irmen de Jong
1b2296ad5b
move cx16 irq examples to new API, fix some bugs in the handler
2023-11-22 23:25:39 +01:00
Irmen de Jong
08ac459a41
breaking change: sys.set_irq() and sys.set_rasterirq() no longer have useKernal parameter! The irq handler routine must return a boolean instead in the A register.
...
When it returns true it means run the system IRQ handler afterwards. When it returns false, the system handler is NOT ran afterwards.
2023-11-21 23:22:53 +01:00
Irmen de Jong
a83e9d9a0a
added sys.save_prog8_internals() and restore_prog8_internals()
2023-11-21 22:00:43 +01:00
Irmen de Jong
8e2c304b3c
txt.waitkey() now returns the key that was pressed
2023-11-17 20:31:19 +01:00
markjreed
ff324955dd
Feature/read cursor position ( #111 )
...
* feat: add ability to read cursor position on CBM machines
* feat: implement plot()/column() for atari target; add get_cursor(), get_column(), row(), and get_row()
* feat: implement wait_key() for Commodore targets; add get_cursor(), get_column(), row(), get_row()
* feat: really implement waitkey() on CBM targets
* fix: make waitkey void for compatibility with atari
2023-11-07 22:19:16 +01:00
Irmen de Jong
31177a2b1b
added sys.disable_caseswitch() and sys.enable_caseswitch()
2023-11-07 00:27:34 +01:00
Irmen de Jong
4de012fc49
added notes to textio about PETSCII vs Screencode encoding.
2023-11-06 23:18:24 +01:00
Irmen de Jong
e1835b5775
removed dysfunctional c128.graphics library module
2023-10-05 21:03:47 +02:00
Irmen de Jong
2d7ebff8e9
fix shadowing warnings in asm and library code
2023-08-29 11:00:53 +02:00
Irmen de Jong
c7b7dcfd03
made pet textio more compatible with the other platforms by putting the (dummy) color arguments back
2023-08-14 13:51:15 +02:00
Irmen de Jong
151a206617
experimental Commodore PET target
2023-08-12 23:25:07 +02:00
Irmen de Jong
41af63b333
remove even more X register save/restore code
2023-07-15 22:26:54 +02:00
Irmen de Jong
3933bf5c1a
remove eval stack references from p8 code
2023-07-15 22:24:22 +02:00
Irmen de Jong
84925ab69c
remove eval stack options
2023-07-15 22:24:19 +02:00
Irmen de Jong
cad18b8a3a
uniform symbol prefixing with p8_
2023-07-02 06:15:02 +02:00
Irmen de Jong
e9163aa3a7
added cx16.save_virtual_registers() and cx16.restore_virtual_registers()
2023-06-24 21:04:47 +02:00
Irmen de Jong
8bffd7672d
added sys.irqsafe_set_irqd()/irqsafe_clear_irqd()
2023-05-22 21:13:20 +02:00
Irmen de Jong
bd2bcb6994
Merge branch 'master' into version_9
...
# Conflicts:
# codeGenIntermediate/src/prog8/codegen/intermediate/AssignmentGen.kt
# compiler/res/prog8lib/c128/syslib.p8
# compiler/res/prog8lib/c64/syslib.p8
# compiler/res/prog8lib/cx16/syslib.p8
# docs/source/todo.rst
# examples/test.p8
# intermediate/src/prog8/intermediate/IRInstructions.kt
2023-05-08 23:17:52 +02:00
Irmen de Jong
8cbfe64f19
optimize some carry flag assembly
2023-05-07 23:27:49 +02:00
Irmen de Jong
fd1e9971e4
asmsub Pc params and returnvalue must be boolean
2023-05-07 22:59:30 +02:00