1
0
mirror of https://github.com/cc65/cc65.git synced 2026-04-19 09:28:25 +00:00
Commit Graph

3519 Commits

Author SHA1 Message Date
Alex Thissen 6cf8ee8eb5 Removed baud rates from 150 and lower.
Fixed tab
Replaced uploader references to SERIAL_INTERRUPT
2024-02-10 23:19:05 +00:00
Alex Thissen 65bce9ecde Implemented mark and space checks. 2024-02-10 23:19:04 +00:00
Alex Thissen 014f85f226 Fixed baud rates 2024-02-10 23:19:04 +00:00
Alex Thissen 788ae82d30 Fixes to serial driver implementation 2024-02-10 23:19:02 +00:00
Bob Andrews a06431a8f9 Merge pull request #2402 from colinleroy/a-bit-of-65c02-optimisations
a BIT of 65C02 optimisations
2024-02-02 21:58:04 +01:00
Bob Andrews eb503cc542 Merge pull request #2390 from colinleroy/implement-shifts-by-7
Implement aslax7/shlax7/asrax7/shrax7
2024-02-02 20:17:48 +01:00
Colin Leroy-Mira 1fab179cb4 a BIT of 65C02 optimisations
Use BIT immediate instead of AND when reloading A is required
afterwards.
Add an fread unit test as the optimisation touches fread.
Sprinkle a few zero page indexed while we're at it.
2024-02-02 19:45:49 +01:00
Colin Leroy-Mira afd8ee627e Remove useless branching code in fgets 2024-01-30 19:52:48 +01:00
Colin Leroy-Mira 2b97735d5d Factorize file pointer check 2024-01-30 19:40:28 +01:00
Colin Leroy-Mira 1a5a7d67a7 Rewrite fputc in assembly
-36 bytes, -12% cycles
2024-01-30 17:19:13 +01:00
Colin Leroy-Mira ba36071022 Rewrite fputs in assembly
-28 bytes, -1% cycles
2024-01-30 17:12:52 +01:00
Colin Leroy-Mira 7d7cf2d1e0 Implement aslax7/shlax7/asrax7/shrax7 2024-01-29 07:59:11 +01:00
Bob Andrews 51b946bf25 Merge pull request #2387 from colinleroy/sim65-implement-remove
Implement __sysremove for sim65
2024-01-28 16:53:29 +01:00
Colin Leroy-Mira 0dd7b0c3a5 Implement __sysremove for sim65
This will allow using unlink()/remove() in sim65 programs
Use it to unlink fgets' test output file
2024-01-28 13:58:57 +01:00
Bob Andrews 8682095f9f Merge pull request #2384 from colinleroy/asm-realloc
Rewrite realloc in asm
2024-01-27 00:28:17 +01:00
Colin Leroy-Mira aa6f850b8d Rewrite gets in assembler
+19 bytes if used alone, because it pulls in fgets, but as code is
factorized, -128 bytes in programs using both fgets and gets.
2024-01-26 20:29:17 +01:00
Colin Leroy-Mira a8b870555e Rewrite realloc in asm
-80 bytes, -39% cycles
2024-01-26 20:25:59 +01:00
Bob Andrews 65937684a0 Merge pull request #2380 from colinleroy/asm-fgetc
Rewrite fgetc in asm
2024-01-26 20:12:41 +01:00
Bob Andrews ba6f9f5d3f Merge pull request #2381 from colinleroy/asm-fgets
Rewrite fgets in asm
2024-01-26 19:36:57 +01:00
Colin Leroy-Mira 476591e8b7 Rewrite fgetc in asm
-82 bytes, -20% cycles
2024-01-25 09:13:39 +01:00
Bob Andrews ee3a542539 Merge pull request #2383 from colinleroy/pmemalign-size-opt
Optimize -36 bytes out of posix_memalign
2024-01-24 21:26:50 +01:00
Bob Andrews a2d722639f Merge pull request #2385 from polluks/master
Fixed comment
2024-01-24 21:17:19 +01:00
Bob Andrews 9ba270d97b Merge pull request #2378 from colinleroy/fix-overflow-in-malloc-and-realloc
Fix malloc and realloc overflow
2024-01-24 21:15:31 +01:00
Stefan 34f37c873e Fixed comment 2024-01-24 16:32:45 +01:00
Bob Andrews ebf43ddb05 Merge pull request #2379 from colinleroy/add-return-minus-1-helper
add a return -1 helper
2024-01-24 15:53:19 +01:00
Colin Leroy-Mira f0b5b02966 Swap in LC before destructors, ROM after 2024-01-24 12:28:57 +01:00
Colin Leroy-Mira b87df9e1c6 Optimize -36 bytes out of posix_memalign
And add a unit test
2024-01-24 10:23:53 +01:00
Colin Leroy-Mira 1f820d0ae8 Rewrite fgets in asm
-104 bytes, -1% cycles
2024-01-24 10:16:26 +01:00
Colin Leroy-Mira 5d49fde788 add a return -1 helper 2024-01-24 09:58:09 +01:00
Colin Leroy-Mira 3e01ac9b04 Fix malloc and realloc overflow
If user requests a size >= 65532, adding the heap admin size
overflows size. Fixes #2358.
2024-01-24 09:54:54 +01:00
Bob Andrews 57e65a6bf6 Merge pull request #2348 from colinleroy/time-functions-pass-2
Convert more time functions to asm
2024-01-23 23:45:10 +01:00
Colin Leroy-Mira 2ba176372e Add beep for apple2 2024-01-23 23:04:50 +01:00
Bob Andrews 7a7e98d799 Merge pull request #2371 from alexthissen/lynx-upload
Lynx upload fixes for IRQ and configuration
2024-01-22 15:50:40 +01:00
Colin Leroy-Mira b23a7ec407 Save two bytes in pushax and popptr1
It's not because Y must equal zero on rts that we should'nt spare one byte
and one cycle.
2024-01-19 21:14:47 +01:00
Alex Thissen ad90a3a421 Replaced references to __BLOCKSIZE__ with __BANK0BLOCKSIZE__ 2024-01-18 18:57:57 +00:00
Alex Thissen 2e56dcc521 Fix for mising import 2024-01-18 18:13:39 +01:00
Alex Thissen acce24fedc Switched to __BANK0BLOCKSIZE__ instead of __BLOCKSIZE__ to make current lynx config files work 2024-01-18 18:13:02 +01:00
Alex Thissen d906748691 Fix uploader implementation to reset IRQ bit for timer 4 (serial) interrupt 2024-01-18 17:37:09 +01:00
Colin Leroy-Mira 166a4b25f7 Apple2: implement sleep using MONWAIT
Also publish detect_iigs(), set_iigs_speed() and get_iigs_speed(). Refactor to only store one ostype variable.
2024-01-18 16:17:10 +01:00
Colin Leroy-Mira 10282a9b74 Rewrite asctime() in assembler (-7 bytes) 2024-01-18 09:09:38 +01:00
Colin Leroy-Mira 03d5e5fba0 Rewrite mktime in assembly
-415 bytes,
-39% cycles,
Unit test expanded to cover more cases (there was a bug in 2100 before!)
2024-01-18 09:09:38 +01:00
Colin Leroy-Mira 348a9048b7 Convert _time_t_to_tm to asm
46 bytes size gain, -8% cycles on the unit tests
2024-01-18 09:09:31 +01:00
Bob Andrews 2127778239 Merge pull request #2336 from colinleroy/optimize-strdup
Optimize strdup
2024-01-08 22:13:43 +01:00
Colin Leroy-Mira df193c0947 Rework time functions a bit
- mktime: Work unsigned as time_t's type implies (shifting Y2K38 bug to 2106)
- mktime: Add unit tests
- gmtime/localtime: factorize
- gmtime/localtime: Add unit tests
- mktime/gmtime/localtime: Size optimisation (-130 bytes wrt master)
- mktime: Speed optimisation (from 23M cycles on the unit test to 2M)
2024-01-08 18:24:13 +01:00
Colin Leroy-Mira 3a439e0e1b Little strdup optimisation
-12 bytes on disk
-20 cycles per strdup
-6 cycles per strlen called from strdup
2024-01-07 14:25:06 +01:00
Colin Leroy-Mira 75461e1319 Apple2: implement stat(2) and statvfs(3) 2024-01-01 19:12:51 +01:00
Colin Leroy-Mira 1093d169ad Fix BSS obliteration by mliparam during exec().
Using mliparam at this time could lead to corruption at the
start of the new executed program if BSS is real full and
mliparam is over $BB00.
The fix is to open the file from the loader stub instead of doing
it before the C library shutdown.
2023-12-14 16:47:33 +01:00
rumbledethumps 3905e43068 style update 2023-11-26 15:12:20 -08:00
rumbledethumps 502e13173a Merge branch 'cc65:master' into master 2023-11-25 19:55:56 -08:00
Colin Leroy-Mira f1b0fbebd5 Remove all indexed accesses to SCC registers
Some IIgs models had issues sending bytes out.
Also make channel tests clearer.
2023-11-24 18:37:43 +01:00