Commit Graph

669 Commits

Author SHA1 Message Date
Irmen de Jong
b5331d821c fix string encoding for escaped characters 2022-03-25 00:17:41 +01:00
Irmen de Jong
27f6d47efa working on vm codegen 2022-03-24 23:26:57 +01:00
Irmen de Jong
fd581ffc37 moved pattern_match() from prog8_lib to string module 2022-03-21 21:32:10 +01:00
Irmen de Jong
9b16d7c786 working on vm 2022-03-20 15:06:29 +01:00
Irmen de Jong
7d2bf892b1 added start of virtual machine compilation target 2022-03-19 00:57:35 +01:00
Irmen de Jong
a03c4c3659 working on symbol table 2022-03-04 22:26:46 +01:00
Irmen de Jong
2812736ae5 preparing version 7.9 2022-03-03 00:42:53 +01:00
Irmen de Jong
c5504c6657 added ATASCII encoding table for atari 2022-02-25 23:48:39 +01:00
Freddy
ad9933f0f6 fixed chrout for atari and added two examples 2022-02-23 16:42:22 +01:00
Irmen de Jong
406658a10f reimplemented sys.memcopy and sys.memset on cx16 to work without kernal too 2022-02-22 21:07:19 +01:00
Irmen de Jong
6a0551cea1 added 'atari' compiler target beginnings (Atari 800 XL)
also default char and string encoding now taken from compiler target
2022-02-22 00:52:35 +01:00
Irmen de Jong
af0e7f7187 searching names in inlined assembly now ignores source comments 2022-02-13 13:41:12 +01:00
Irmen de Jong
a3a6812608 version 7.8 2022-02-12 17:40:32 +01:00
Irmen de Jong
343f01d5e1 re-enabled unused variable removal from library modules (+fixed some @shared vars in libraries) 2022-02-10 03:10:47 +01:00
Irmen de Jong
08bacdd090 temp vars are now dynamically added to AST as needed 2022-02-10 02:52:47 +01:00
Irmen de Jong
8c2e6971fc start using vars instead of callgraph (2) 2022-02-08 21:09:00 +01:00
Irmen de Jong
1903990f30 start using vars instead of callgraph 2022-02-08 20:40:10 +01:00
Irmen de Jong
7d67005709 more rewrite variable allocation 2022-02-08 20:40:10 +01:00
Irmen de Jong
72dfb0bda3 fix: undefined sys.memcopy when initializing array on cx16 2022-02-08 20:29:47 +01:00
Natt Akuma
49d37c016e Optimize strcmp_mem 2022-02-04 22:07:03 +07:00
Natt Akuma
73dfb5f443 Optimize sign extension to AY 2022-02-04 00:59:44 +07:00
Irmen de Jong
fa48746ba9 increase internal buffer for diskio.list_files to be able to list larger directories 2022-01-26 03:17:33 +01:00
Irmen de Jong
46f9fab140 library API change: string.find now returns index of character + carry bit status (instead of substring address) 2022-01-24 21:37:04 +01:00
Irmen de Jong
b7d06f2c0a API change: added alignment parameter to memory() function 2022-01-24 18:58:57 +01:00
Irmen de Jong
118196a0bf library API change: moved cx16.vload() to cx16diskio module 2022-01-24 18:31:18 +01:00
Irmen de Jong
adb979df38 tweak comment 2022-01-23 22:34:05 +01:00
Irmen de Jong
3401cb5b4a fixed compiler recursion crash when returning certain typecasted value 2022-01-23 19:13:20 +01:00
Irmen de Jong
c8bd57cd4d fixed signature of mouse_get(): it returns the buttonstatus in A. Added convenience cx16.mouse_pos() routine. 2022-01-21 22:06:17 +01:00
Irmen de Jong
6b02f2eea0 implement iso encoding and new string encoding syntax, fixes #38 2022-01-19 21:21:32 +01:00
Irmen de Jong
5237e55326 added txt.iso() to enable iso-charset on cx16 2022-01-18 21:35:29 +01:00
Irmen de Jong
d916027e75 labels no longer start with '_' fixes #62 2022-01-17 22:03:53 +01:00
Irmen de Jong
8966d2aa06 comments and prepare new version 7.7 2022-01-16 23:03:00 +01:00
Irmen de Jong
50c16fe6de code size optimization: don't copy floats with inlined copy code but use copy_float routine 2022-01-09 16:18:13 +01:00
Irmen de Jong
c1a39c269e optimized code for stack eval comparisons with zero 2022-01-09 03:19:49 +01:00
Irmen de Jong
8f3df3039a added pipe operator `|>` 2022-01-06 22:54:18 +01:00
Irmen de Jong
c57ef7725e preparing v7.6 2022-01-04 20:40:35 +01:00
Irmen de Jong
96225efd96 library doc tweaks 2022-01-03 23:15:34 +01:00
Irmen de Jong
05a1ddad05 Merge branch 'master' into c128target
# Conflicts:
#	examples/test.p8
2021-12-29 18:14:24 +01:00
Irmen de Jong
de6ce4a46e add "X in [1,2,3]" expression (efficient containment check) 2021-12-29 17:26:00 +01:00
Irmen de Jong
d4153da8b9 setup float routine addresses for c128 2021-12-25 02:34:52 +01:00
Irmen de Jong
fc33ab8905 shuffled some system functions back to c64 block to remain compatible with existing code, added missing float and graphics library stubs 2021-12-24 00:08:32 +01:00
Irmen de Jong
8fa84de28e fix c128 clearscreen and bdmusic sound issue 2021-12-22 22:59:36 +01:00
Irmen de Jong
3e3da38de1 correctly disable charset switching 2021-12-22 21:47:41 +01:00
Irmen de Jong
cabf1e82e8 some shadow registers added to make uppercase()/lowercase() work 2021-12-22 21:20:34 +01:00
Irmen de Jong
836d40072f c128 evalstack corrections 2021-12-22 00:07:05 +01:00
Irmen de Jong
431401d90e c128 corrections 2021-12-21 23:37:15 +01:00
Irmen de Jong
6da83e2bd7 first steps to add C128 compiler target 2021-12-21 19:08:33 +01:00
Irmen de Jong
890327b381 the returnvalue of the diskio.load() function family now is just the last load address+1 (like kernal's LOAD routine).
This fixes the inconsistent attempt to calculate a size, just let the caller do this if required.
Added a small helper function in cx16diskio to do this for loads that span multiple banks.
2021-12-14 23:54:42 +01:00
Irmen de Jong
5df623bd2e doc 2021-12-14 22:40:03 +01:00
Irmen de Jong
02010170ce fix compiler crash when attempting to call a non-function 2021-12-11 13:20:13 +01:00
Irmen de Jong
35998142fe version 7.5 2021-12-10 20:18:17 +01:00
Irmen de Jong
d901a1531f added missing vectors to syslib 2021-12-09 21:38:00 +01:00
Irmen de Jong
d8d56b195f comments 2021-12-09 21:13:13 +01:00
Irmen de Jong
900cdd3fa1 added cx16diskio with load() and load_raw() that are HIMEM bank-aware 2021-12-05 02:20:48 +01:00
Irmen de Jong
20401b99d8 added cx16.getrambank() / getrombank() to retrieve the current ram and rom bank numbers. 2021-12-04 15:27:54 +01:00
Irmen de Jong
9a68864b67 version 7.5-dev 2021-12-04 00:18:44 +01:00
Irmen de Jong
72d7178762 added diskio.load_raw() to load headerless files 2021-12-04 00:07:21 +01:00
Irmen de Jong
b7fffbb6df release 7.4.1 - oops, funcion call arg count validation was broken 2021-12-01 21:44:03 +01:00
Irmen de Jong
1f346230e3 release 7.4 2021-11-30 22:50:12 +01:00
Irmen de Jong
7748c261da rsave/rrestore moved from sys to builtin function to solve the stack related problem when calling it as a regular subroutine 2021-11-29 23:13:04 +01:00
Irmen de Jong
56dc6d7f1e comment 2021-11-29 01:10:11 +01:00
Irmen de Jong
45b8762188 use inc/ina instead of adc 2021-11-29 00:07:15 +01:00
Irmen de Jong
e8f4686430 undid failed attempt of using sys.push/sys.pop for stack args - now using new push(), pushw(), pop(), popw() builtin functions 2021-11-28 01:22:40 +01:00
Irmen de Jong
02348924d0 failed attempt of using sys.push/pop for stack args 2021-11-27 23:52:47 +01:00
Irmen de Jong
8b4ac7801f fix sys.push() signature for c64 2021-11-27 20:18:41 +01:00
Irmen de Jong
e8e25c6fd6 added sys.push() and sys.pop() to put values on cpu stack. Added missing builtin functions to syntax-files. 2021-11-27 18:09:15 +01:00
Irmen de Jong
54025d2bf5 small refactor and spelling fixes 2021-11-27 14:49:18 +01:00
Irmen de Jong
0a53bd4956 fix parameter name conflict 2021-11-26 01:01:59 +01:00
Irmen de Jong
0c2f30fd45 links to 6502 bresenham line algorithms 2021-11-23 21:51:18 +01:00
Irmen de Jong
e08871c637 oops! replace phx/plx 65C02 (cx16) instructions by 6502 (c64) compatible alternative.
Couldn't assemble code that used some of the routines in conv on c64 before...
2021-11-22 21:02:43 +01:00
Irmen de Jong
dde4c751da version 7.4-dev 2021-11-21 03:28:13 +01:00
Irmen de Jong
fa11a6e18b removed faulty and too aggressive assembly optimization of double-store 2021-11-18 01:43:22 +01:00
Irmen de Jong
5fd83f2757 version 7.3 2021-11-14 22:55:13 +01:00
Irmen de Jong
53e1729e2f introduce option to use internal scratch variables via prog8_lib definitions (ony for compiler, not for user code!) 2021-11-14 16:01:54 +01:00
Irmen de Jong
00c6f74481 tweak temp float 2021-11-13 12:56:59 +01:00
Irmen de Jong
2177ba0ed2 added signed versions of the cx16 virtual registers 2021-11-13 02:42:21 +01:00
Irmen de Jong
8df3da11e3 add cosr8, sinr8, cosr16 and sinr16 builtin functions that take a degree 0..179 (= 0..358 in 2 degree steps)
to more easily scale halves/quarters etc of a circle than possible with the ones that take 0..255 'degrees'.
2021-11-09 23:39:26 +01:00
Irmen de Jong
857724c7e6 attempt to make if-statement not use stack eval anymore 2021-11-08 19:07:36 +01:00
Irmen de Jong
f4c4ee78d9 re-use global returnvalue temp var instead of duplicating it in every subroutine that needs it 2021-11-07 14:19:21 +01:00
Irmen de Jong
72a7e61fd0 version 7.2 2021-11-06 23:42:13 +01:00
Irmen de Jong
1605791f1b float swap() no longer uses evaluation stack but a single temp var instead + FAC1 2021-11-06 03:36:14 +01:00
Irmen de Jong
3410aea788 fix regression: don't add 0 initializer when variable is assigned to anyway (or is loopvar in a for-loop) 2021-11-02 21:23:59 +01:00
Irmen de Jong
14aad2358f version 7.2 started 2021-10-16 18:46:08 +02:00
Irmen de Jong
07132a2c42 removed unreliable inlining of non-asmsub subroutines. Fixes #60 2021-10-08 23:09:38 +02:00
Irmen de Jong
b3107cfad0 Merge branch 'master' into v7.1 2021-10-04 22:38:53 +02:00
Irmen de Jong
06b3bf27b5 slightly improve sys.waitvsync() on c64 2021-10-03 21:35:12 +02:00
Irmen de Jong
3aeca0a770 Merge branch 'master' into v7.1 2021-09-28 23:15:06 +02:00
Irmen de Jong
4bd4733e52 fix index calc bug in palette.set_color 2021-09-28 23:12:59 +02:00
Irmen de Jong
fd1f30f92b removed %target directive (didn't add much, too confusing, only supported single target) 2021-09-04 15:01:16 +02:00
Irmen de Jong
9bd3a6758a improve testability: use error returnvalues instead of using exitProcess() 2021-07-02 00:11:21 +02:00
Irmen de Jong
f53848b4b9 wording and version 2021-06-24 21:25:35 +02:00
Irmen de Jong
73863acc12 version bump 2021-06-06 10:50:05 +02:00
Irmen de Jong
e145d2255e added palette.set_all_black() and set_all_white() 2021-05-26 21:33:18 +02:00
Irmen de Jong
d7f83f8df2 version bump 2021-05-20 23:38:41 +02:00
Irmen de Jong
e4fb5946dd optimize cx16 sys.wait and sys.waitvsync to use WAI instruction 2021-05-17 18:44:42 +02:00
Irmen de Jong
0416aacbbd fix %asminclude by removing scopelabel argument and improving docs to remove false promise about labels 2021-05-16 00:14:57 +02:00
Irmen de Jong
e2f5752d9a add f_open_w, f_write, f_close_w to diskio to be able to save parts of memory sequentially 2021-05-01 19:13:56 +02:00
Irmen de Jong
1a59019fc8 add generic error in diskio.status() if drive status can't be read 2021-05-01 15:39:39 +02:00
Irmen de Jong
0a5b30e21c added fast code for x*640 2021-04-30 22:30:21 +02:00
Irmen de Jong
5ee36c897d todo 2021-04-29 00:57:32 +02:00
Irmen de Jong
ed7479c854 version 7 due to removal of structs and v39 cx16 support changes 2021-04-29 00:15:54 +02:00
Irmen de Jong
1bde7c7718 ver 2021-04-28 20:05:56 +02:00
Irmen de Jong
17068130bb removed PROG8_LIBDIR env variables and replaced with -libdirs command line option 2021-04-28 20:04:23 +02:00
Irmen de Jong
81a91d62cb improved horizontal_line in highres 4c 2021-04-28 02:55:49 +02:00
Irmen de Jong
2575263438 optimized gfx2.plot() for hires-4c 2021-04-28 02:49:25 +02:00
Irmen de Jong
7f0e25cb50 optimized gfx2.plot() for hires-monochrome 2021-04-28 02:32:11 +02:00
Irmen de Jong
a1e4e9c50f optimized gfx2.plot() for lores-256c 2021-04-28 02:22:21 +02:00
Irmen de Jong
98eff2701b optimized gfx2.plot() for lores-monochrome 2021-04-28 02:15:07 +02:00
Irmen de Jong
8b84f87217 removed fastrnd8() because it was hilariously bad, just use rnd() 2021-04-28 01:53:12 +02:00
Irmen de Jong
306a1b7bc2 optimized gfx2.vertical_line for hires monochrome mode 2021-04-28 01:19:10 +02:00
Irmen de Jong
481214c46e optimized gfx2.vertical_line for lores monochrome mode 2021-04-28 01:02:29 +02:00
Irmen de Jong
a5961cbeab optimized gfx2.vertical_line for highres 4c mode 2021-04-28 00:29:21 +02:00
Irmen de Jong
ee1c43ca91 improved scanning for return statement in routines that should return a value. 2021-04-21 20:31:29 +02:00
Irmen de Jong
1c2e6f9e4c lower() and upper() now also return the lenght of the processed string. 2021-04-21 20:21:58 +02:00
Irmen de Jong
3d956ef554 fix wrong values for register used in array indexing expressions
added the L/H byte parts of the cx16 virtual registers
2021-04-18 13:53:02 +02:00
Irmen de Jong
e680de05ea workaround for the joystick_get() irq problem 2021-04-15 22:56:52 +02:00
Irmen de Jong
8d567f6b06 added cx16.joystick_get2() for convenience api 2021-04-12 01:07:46 +02:00
Irmen de Jong
3dda29781e changed MEMTOP2 into cx16.numbanks() to query the number of RAM banks installed 2021-04-08 01:05:38 +02:00
Irmen de Jong
d116eb7655 paranoid, be sure to not kill carry 2021-04-06 23:55:20 +02:00
Irmen de Jong
bc726c6334 optimized slow evaluation of byte-to-wordarray assignment 2021-04-06 22:50:16 +02:00
Irmen de Jong
123473dfc8 cleanup 2021-04-06 00:16:29 +02:00
Irmen de Jong
5b890847e5 make sure BASIC rom is banked in again when program exits 2021-04-05 23:12:10 +02:00
Irmen de Jong
64c85b9617 fix cx16 rom v39 float changes 2021-04-05 22:54:40 +02:00
Irmen de Jong
3f30d3aa89 added sys.waitrastborder() for c64 2021-04-01 18:53:16 +02:00
Irmen de Jong
129e17b33a added sys.waitvsync() + missing documentation 2021-04-01 18:31:33 +02:00
Irmen de Jong
bf2d8c3f4b update kotlin plugin to 1.4.32 2021-03-31 20:52:05 +02:00
Irmen de Jong
ec60cad8bb commander-x16 prototype board #2 (rom v39+) address changes 2021-03-27 22:20:46 +01:00
Irmen de Jong
4cae2c56ec implemented last remaining codegen for word-byte division and remainders. 2021-03-25 22:03:36 +01:00
Irmen de Jong
ca868ae19e added cx16.vload() (like the VLOAD basic instruction) 2021-03-20 02:39:53 +01:00
Irmen de Jong
b30b8b7368 fix bug in float < and > comparisons 2021-03-18 01:41:54 +01:00
Irmen de Jong
b5523c7077 don't optimize with inlining too aggressively (code bloat) 2021-03-16 00:33:15 +01:00
Irmen de Jong
eb3594b18c revert to just using comparison expressions in graphics code (we're optimizing these now!) 2021-03-16 00:11:55 +01:00
Irmen de Jong
852d85d010 improve uword '<' and '>' codegen 2021-03-16 00:03:51 +01:00
Irmen de Jong
496a3b0d2c todo 2021-03-15 18:56:25 +01:00
Irmen de Jong
1c1da8e38e additional optimization to the bresenham line routines 2021-03-10 18:49:40 +01:00
Irmen de Jong
6995ee2d17 fix cx16 bresenham line inaccuracy 2021-03-09 22:04:19 +01:00
Irmen de Jong
6c60ea9cac allocate even more c64 zeropage locations for floats 2021-03-09 21:47:36 +01:00
Irmen de Jong
6bd205c02a fix c64 bresenham line inaccuracy 2021-03-09 21:07:55 +01:00
Irmen de Jong
62ec77e148 ver 2021-03-08 23:35:52 +01:00
Irmen de Jong
9120e1de88 fix ubyte/uword to float conversion crashes on Commander X16 2021-03-08 23:21:52 +01:00
Irmen de Jong
60e169bd87 added optimized integer square (x*x) routine 2021-03-08 23:08:47 +01:00
Irmen de Jong
e4bca5fe47 version 2021-03-06 23:07:30 +01:00
Irmen de Jong
a1729b65ab fix min(), max(), sum(), abs() 2021-03-06 22:57:22 +01:00
Irmen de Jong
de04bd8cfa added more convenient number-to-string functions to conv library 2021-03-06 13:47:27 +01:00
Irmen de Jong
076a547f91 added more convenient number-to-string functions to conv library 2021-03-06 13:34:57 +01:00
Irmen de Jong
dffd0a2706 added fastrnd8() with the old rnd() generator code in it, new code for rnd() uses the much better rndw() generator now. 2021-03-05 22:49:14 +01:00
Irmen de Jong
96ba9f5902 spelling correction 2021-03-04 01:31:29 +01:00
Irmen de Jong
7e3e18a5c7 deal with 'bra' better on 65c02 2021-02-28 16:20:03 +01:00
Irmen de Jong
8e3ebc84f0 readme 2021-02-28 15:40:04 +01:00
Irmen de Jong
2b435fe6a5 vtui example updated to vtui 0.6 2021-02-27 03:30:21 +01:00