1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-30 16:29:58 +00:00
Commit Graph

3505 Commits

Author SHA1 Message Date
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
rumbledethumps
564c85235f style update and add rp6502 doc 2023-11-17 11:08:51 -08:00
rumbledethumps
b17c4d3434 add rp6502 target 2023-11-16 18:46:16 -08:00
Colin Leroy-Mira
86d498b7b3 Implement SER_HS_NONE on Apple IIgs serial driver 2023-11-10 21:56:43 +01:00
Colin Leroy-Mira
fe115fb621 Revert "Apple 2 SSC: Handle SER_HS_NONE with no performance impact"
This reverts commit 0eafb6d1d5.
This was buggy, as we sta Stopped when asserting flow, and this stops
SER_GET.
2023-11-05 11:34:51 +01:00
Colin Leroy-Mira
8a797095c1 Apple 2 SSC: Handle SER_HS_NONE with no performance impact 2023-11-05 11:34:51 +01:00
Colin Leroy-Mira
94239525ca Apple2 SSC: Implement no flow control 2023-11-05 11:34:51 +01:00
Oliver Schmidt
3c864fc7d8
Minimal style adjustment 2023-10-15 17:00:15 +02:00
Colin Leroy-Mira
882f6fd103 Fix ACIA check so we don't enable RX/TX with IRQs on 2023-10-15 16:58:59 +02:00
Colin Leroy-Mira
3107f34ec9 Put back 6551 test as a last verification 2023-10-15 16:58:59 +02:00
Colin Leroy-Mira
6e035c864e Apple2 SSC: on IIgs, verify slot mode
If the slot is not in "Your Card" mode, there's no way it is an SSC
2023-10-15 16:58:59 +02:00
Colin Leroy-Mira
96e893795b Better check for 6551 2023-10-15 16:58:59 +02:00
Colin Leroy-Mira
e138403727 Move cli in common out path 2023-10-14 14:36:09 +02:00
Colin Leroy-Mira
6e0bbb00ee Fix logic error on parameters checks 2023-10-14 14:36:09 +02:00
Colin Leroy-Mira
c7db08b4e3 Move hardware check to ser_install 2023-10-14 14:36:09 +02:00