]> git.sur5r.net Git - cc65/log
cc65
6 years agoReplaced _systime with clock_gettime.
Oliver Schmidt [Wed, 15 Aug 2018 13:59:11 +0000 (15:59 +0200)]
Replaced _systime with clock_gettime.

We want to add the capability to not only get the time but also set the time, but there's no "setter" for the "getter" time().

The first ones that come into mind are gettimeofday() and settimeofday(). However, they take a struct timezone argument that doesn't make sense - even the man pages says "The use of the timezone structure is obsolete; the tz argument should normally be specified as NULL." And POSIX says "Applications should use the clock_gettime() function instead of the obsolescent gettimeofday() function."

The ...timeofday() functions work with microseconds while the clock_...time() functions work with nanoseconds. Given that we expect our targets to support only 1/10 of seconds the microseconds look preferable at first sight. However, already microseconds require the cc65 data type 'long' so it's not such a relevant difference to nanoseconds. Additionally clock_getres() seems useful.

In order to avoid code duplication clock_gettime() takes over the role of the actual time getter from _systime(). So time() now calls clock_gettime() instead of _systime().

For some reason beyond my understanding _systime() was mentioned in time.h. _systime() worked exactly like e.g. _sysremove() and those _sys...() functions are all considered internal. The only reason I could see would be a performance gain of bypassing the time() wrapper. However, all known _systime() implementations internally called mktime(). And mktime() is implemented in C using an iterative algorithm so I really can't see what would be left to gain here. From that perspective I decided to just remove _systime().

6 years agoRemoved stray /t char.
Oliver Schmidt [Tue, 14 Aug 2018 14:00:09 +0000 (16:00 +0200)]
Removed stray /t char.

6 years agoFixed typo.
Oliver Schmidt [Tue, 14 Aug 2018 13:54:57 +0000 (15:54 +0200)]
Fixed typo.

6 years agoAdded CHKOUT and CLRCHN
Olli Savia [Tue, 14 Aug 2018 18:09:03 +0000 (21:09 +0300)]
Added CHKOUT and CLRCHN

6 years agoMerge pull request #712 from ppelleti/fix-bit
greg-king5 [Sat, 11 Aug 2018 05:48:11 +0000 (01:48 -0400)]
Merge pull request #712 from ppelleti/fix-bit

sim65: Fix "$2C: BIT abs" to access the correct address.

6 years agosim65: Fix "$2C: BIT abs" to access the correct address. 712/head
Patrick Pelletier [Fri, 10 Aug 2018 19:58:48 +0000 (12:58 -0700)]
sim65: Fix "$2C: BIT abs" to access the correct address.

Bug is documented here:
http://forum.6502.org/viewtopic.php?f=2&t=5242

6 years ago"Inverted" time_t value handling.
Oliver Schmidt [Thu, 2 Aug 2018 15:12:12 +0000 (17:12 +0200)]
"Inverted" time_t value handling.

So far time_t values were interpreted as local time values. However, usually time_t values are to be interpreted as "seconds since 1 Jan 1970 in UTC". Therefore all logic handling time_t values has to be changed.

- So far gmtime() called localtime() with an adjusted time_t, now localtime() calls gmtime() with an adjusted time_t.
- mktime() has to do "the opposite" of localtime(), to keep it that way mktime() does now the inverse adjustment made by localtime().
- All currently present time() implementations internally call mktime() so they don't require individual adjustments.

6 years agoIncreased consistency.
Oliver Schmidt [Thu, 2 Aug 2018 13:45:57 +0000 (15:45 +0200)]
Increased consistency.

The test program works as-is only if the timezone isn't set (to something different than UTC). However, using localtime() instead of gmtime() makes it at least consistent in that the original time (given to mktime()) is identical to the time retrieved.

6 years agoAdded code to make the 65816's MVN and MVP instructions handle both immediate (bank...
Greg King [Sun, 29 Jul 2018 07:50:02 +0000 (03:50 -0400)]
Added code to make the 65816's MVN and MVP instructions handle both immediate (bank) and far-address operands.

6 years agoFixed some code, to adapt to register-use changes caused by pull request #652.
Greg King [Fri, 27 Jul 2018 13:07:40 +0000 (09:07 -0400)]
Fixed some code, to adapt to register-use changes caused by pull request #652.

6 years agoSome minor cleanups.
Oliver Schmidt [Thu, 26 Jul 2018 12:35:26 +0000 (14:35 +0200)]
Some minor cleanups.

6 years agoFixed regression introduced by https://github.com/cc65/cc65/pull/652.
Oliver Schmidt [Thu, 26 Jul 2018 12:31:17 +0000 (14:31 +0200)]
Fixed regression introduced by https://github.com/cc65/cc65/pull/652.

6 years agoUpdated comment.
Oliver Schmidt [Thu, 26 Jul 2018 11:09:21 +0000 (13:09 +0200)]
Updated comment.

6 years agoQuick fix for missing _div() adaptation after 95223be.
IrgendwerA8 [Wed, 25 Jul 2018 20:38:29 +0000 (22:38 +0200)]
Quick fix for missing _div() adaptation after 95223be.

6 years agoAdded test for mktime() and gmtime().
Oliver Schmidt [Tue, 24 Jul 2018 01:25:49 +0000 (03:25 +0200)]
Added test for mktime() and gmtime().

A recent regression makes gmtime()/localtime() fail. So it's obviously desirable to have a test for that code.

6 years agoFixed the order in which the 65816's block-move instructions' operands are written...
Greg King [Fri, 15 Jun 2018 15:01:14 +0000 (11:01 -0400)]
Fixed the order in which the 65816's block-move instructions' operands are written and assembled.

The source bank number is written first; but, assembled second.
The destination bank is written second; but, assembled first.

6 years agoMerge pull request #695 from ops/cbmkernal_imports
Oliver Schmidt [Wed, 4 Jul 2018 21:47:33 +0000 (23:47 +0200)]
Merge pull request #695 from ops/cbmkernal_imports

CBM: Add imports for standard kernal entries

6 years agoAdded a blank line between .include statements and .import/.export statements 695/head
Olli Savia [Wed, 4 Jul 2018 14:40:28 +0000 (17:40 +0300)]
Added a blank line between .include statements and .import/.export statements

6 years agoRemoved .import for std kernal entries. Added .include "cbm.inc"
Olli Savia [Tue, 3 Jul 2018 19:47:42 +0000 (22:47 +0300)]
Removed .import for std kernal entries. Added .include "cbm.inc"

6 years agoAdded .import for std kernal entries
Olli Savia [Tue, 3 Jul 2018 19:44:59 +0000 (22:44 +0300)]
Added .import for std kernal entries

6 years agoMerge pull request #693 from ops/cbmkernal_stage3
Oliver Schmidt [Mon, 2 Jul 2018 08:39:57 +0000 (10:39 +0200)]
Merge pull request #693 from ops/cbmkernal_stage3

cbm_kernal enhancements

6 years agoMoved C128 specific definitions to cbm_kernal.inc 693/head
Olli Savia [Sun, 1 Jul 2018 06:58:39 +0000 (09:58 +0300)]
Moved C128 specific definitions to cbm_kernal.inc

6 years agoUse common include file cbm_kernal.inc
Olli Savia [Sun, 1 Jul 2018 06:56:37 +0000 (09:56 +0300)]
Use common include file cbm_kernal.inc

6 years agoUpdated comment
Olli Savia [Sun, 1 Jul 2018 06:54:39 +0000 (09:54 +0300)]
Updated comment

6 years agoMerge pull request #692 from ops/cbmkernal_stage2
Oliver Schmidt [Sat, 30 Jun 2018 20:26:04 +0000 (22:26 +0200)]
Merge pull request #692 from ops/cbmkernal_stage2

Update library to use cbm_kernal.inc for kernal entry points

6 years agoTAB to space conversion 692/head
Olli Savia [Sat, 30 Jun 2018 13:25:43 +0000 (16:25 +0300)]
TAB to space conversion

6 years agoRemoved RAMTAS
Olli Savia [Fri, 29 Jun 2018 19:59:53 +0000 (22:59 +0300)]
Removed RAMTAS

6 years agoCommon include file is now cbm_kernal.inc
Olli Savia [Fri, 29 Jun 2018 19:58:16 +0000 (22:58 +0300)]
Common include file is now cbm_kernal.inc

6 years agoMerge remote-tracking branch 'upstream/master' into cbmkernal_stage2
Olli Savia [Fri, 29 Jun 2018 19:50:02 +0000 (22:50 +0300)]
Merge remote-tracking branch 'upstream/master' into cbmkernal_stage2

6 years agoMerge pull request #688 from ops/cbmkernalasm
Oliver Schmidt [Fri, 29 Jun 2018 16:59:48 +0000 (18:59 +0200)]
Merge pull request #688 from ops/cbmkernalasm

RFC: Common kernal inc file for Commodore targets

6 years agocbmkernal.inc -> cbm_kernal.inc 688/head
Olli Savia [Fri, 29 Jun 2018 13:14:00 +0000 (16:14 +0300)]
cbmkernal.inc -> cbm_kernal.inc

6 years agoUse common include file cbmkernal.inc
Olli Savia [Wed, 27 Jun 2018 18:39:24 +0000 (21:39 +0300)]
Use common include file cbmkernal.inc

6 years agoMerge pull request #682 from shinra-jp/da65-synclines
Oliver Schmidt [Tue, 26 Jun 2018 08:26:15 +0000 (10:26 +0200)]
Merge pull request #682 from shinra-jp/da65-synclines

Support for preprocessing info file via cpp or m4.

6 years agoStyle fix 682/head
AIDA Shinra [Mon, 25 Jun 2018 14:50:46 +0000 (23:50 +0900)]
Style fix

6 years agoMerge remote-tracking branch 'origin' into da65-synclines
AIDA Shinra [Mon, 25 Jun 2018 14:38:43 +0000 (23:38 +0900)]
Merge remote-tracking branch 'origin' into da65-synclines

6 years agoTAB to space conversion
Olli Savia [Fri, 22 Jun 2018 08:29:03 +0000 (11:29 +0300)]
TAB to space conversion

6 years agoRESTOR and VECTOR moved under own ifdef/endif block
Olli Savia [Fri, 22 Jun 2018 08:21:00 +0000 (11:21 +0300)]
RESTOR and VECTOR moved under own ifdef/endif block

6 years agoMerge pull request #687 from polluks/patch-12
Oliver Schmidt [Thu, 21 Jun 2018 20:37:29 +0000 (22:37 +0200)]
Merge pull request #687 from polluks/patch-12

Smaller driver code

6 years agoRemoved unused label 687/head
Stefan [Thu, 21 Jun 2018 20:30:14 +0000 (20:30 +0000)]
Removed unused label

6 years agoAdded asminc/cbmkernal.inc
Olli Savia [Thu, 21 Jun 2018 15:32:38 +0000 (18:32 +0300)]
Added asminc/cbmkernal.inc

6 years agoMade LINE plot single-point lines correctly.
greg-king5 [Thu, 21 Jun 2018 12:18:53 +0000 (08:18 -0400)]
Made LINE plot single-point lines correctly.

6 years agoSmaller driver code
Stefan [Thu, 21 Jun 2018 00:25:33 +0000 (00:25 +0000)]
Smaller driver code

6 years agoMerge branch 'da65-synclines' of github:shinra-jp/cc65 into da65-synclines
AIDA Shinra [Wed, 13 Jun 2018 17:04:06 +0000 (02:04 +0900)]
Merge branch 'da65-synclines' of github:shinra-jp/cc65 into da65-synclines

6 years agoFollowed the discussions in the Pull request #682.
AIDA Shinra [Mon, 11 Jun 2018 17:06:01 +0000 (02:06 +0900)]
Followed the discussions in the Pull request #682.

* Fixed a misspelling
* Fixed styles
* Added sample codes

6 years agoSupport for preprocessing info file via cpp or m4.
AIDA Shinra [Sun, 10 Jun 2018 16:53:35 +0000 (01:53 +0900)]
Support for preprocessing info file via cpp or m4.

6 years agoMerge pull request #681 from shinra-jp/voperand
Oliver Schmidt [Wed, 13 Jun 2018 12:41:24 +0000 (14:41 +0200)]
Merge pull request #681 from shinra-jp/voperand

Support for "inline parameters" of subroutines

6 years agoStyle and alignment fixes. 681/head
AIDA Shinra [Wed, 13 Jun 2018 12:24:34 +0000 (21:24 +0900)]
Style and alignment fixes.

6 years agoChanged the wording of the doc/da65.sgml.
AIDA Shinra [Tue, 12 Jun 2018 16:23:01 +0000 (01:23 +0900)]
Changed the wording of the doc/da65.sgml.

6 years agoFollowed the discussions in the Pull request #682.
AIDA Shinra [Mon, 11 Jun 2018 17:06:01 +0000 (02:06 +0900)]
Followed the discussions in the Pull request #682.

* Fixed a misspelling
* Fixed styles
* Added sample codes

6 years agoFollowed discussions in the Pull reequest #681.
AIDA Shinra [Mon, 11 Jun 2018 15:18:11 +0000 (00:18 +0900)]
Followed discussions in the Pull reequest #681.
In particular, renamed "virtual operands" to "inline parameters".

6 years agoSupport for preprocessing info file via cpp or m4.
AIDA Shinra [Sun, 10 Jun 2018 16:53:35 +0000 (01:53 +0900)]
Support for preprocessing info file via cpp or m4.

6 years agoSupport --print-target-path with spaces.
Oliver Schmidt [Sun, 10 Jun 2018 16:12:09 +0000 (18:12 +0200)]
Support --print-target-path with spaces.

Don't try this at home ;-))

6 years agoSupport for "virtual operands" of subroutines like this:
AIDA Shinra [Sun, 10 Jun 2018 09:09:11 +0000 (18:09 +0900)]
Support for "virtual operands" of subroutines like this:

jsr SomeProc
.byte $00, $01 ; argument to SomeProc
; return here from SomeProc
bit $3F

6 years agoAllow spaces in path names.
Oliver Schmidt [Fri, 8 Jun 2018 17:16:18 +0000 (19:16 +0200)]
Allow spaces in path names.

The Microsoft C Library needs to have spawnvp() parameters with spaces quoted manually. We do this only if actually necessary to limit issues with parameters already containing double quotes.

6 years agoUse --print-target-path only as last resort.
Oliver Schmidt [Fri, 8 Jun 2018 16:58:36 +0000 (18:58 +0200)]
Use --print-target-path only as last resort.

--print-target-path may return a path with (escaped) spaces. We'll use that path with $(wildcard ...), that's fine. But then we use the outcome with $(foreach ...) and there things fail badly and there's nothing to do about it.

Therefore we a) try to avoid --print-target-path in the first place and b) explicitly bail out if we end up with spaces.

6 years agoEscape spaces in target path.
Oliver Schmidt [Thu, 7 Jun 2018 15:10:33 +0000 (17:10 +0200)]
Escape spaces in target path.

cc65 escapes spaces in paths it writes to dependency files (see WriteEscaped() in cc65/input.c). Given that the output of OptPrintTargetPath() is supposed to be used in Makefiles in pretty much the same way it is appropriate to escape spaces here too.

6 years agoMerge pull request #673 from bengdahl/master
Oliver Schmidt [Thu, 7 Jun 2018 15:01:42 +0000 (17:01 +0200)]
Merge pull request #673 from bengdahl/master

Fix `make` failing in parent directories containing spaces

6 years agoMerge pull request #676 from Fabrizio-Caruso/master
Oliver Schmidt [Wed, 6 Jun 2018 19:37:13 +0000 (21:37 +0200)]
Merge pull request #676 from Fabrizio-Caruso/master

Fix joystick for the Supervision target

6 years agospaces instead of tab 676/head
Fabrizio Caruso [Wed, 6 Jun 2018 19:18:47 +0000 (21:18 +0200)]
spaces instead of tab

6 years agoFix joystick for the Supervision target
Fabrizio Caruso [Wed, 6 Jun 2018 19:11:17 +0000 (21:11 +0200)]
Fix joystick for the Supervision target

6 years agoFixed usage indentation.
Oliver Schmidt [Wed, 6 Jun 2018 16:59:25 +0000 (18:59 +0200)]
Fixed usage indentation.

6 years agoUpdate Makefile 673/head
existensialMemory [Tue, 5 Jun 2018 02:17:25 +0000 (22:17 -0400)]
Update Makefile

6 years agoFix `make` failing in parent directories containing spaces
Ben [Tue, 5 Jun 2018 01:27:04 +0000 (21:27 -0400)]
Fix `make` failing in parent directories containing spaces

6 years agoMerge pull request #670 from greg-king5/string-pointer-break
Oliver Schmidt [Fri, 1 Jun 2018 11:15:52 +0000 (13:15 +0200)]
Merge pull request #670 from greg-king5/string-pointer-break

Fix strpbrk() problems.

6 years agoFixed strpbrk(). 670/head
Greg King [Tue, 29 May 2018 18:29:50 +0000 (14:29 -0400)]
Fixed strpbrk().

Added its prototype.  Documented it.

6 years agoMerge pull request #668 from IrgendwerA8/mul_second_thoughts
Oliver Schmidt [Tue, 29 May 2018 07:01:34 +0000 (09:01 +0200)]
Merge pull request #668 from IrgendwerA8/mul_second_thoughts

Mul second thoughts

6 years agoFree 2 bytes again. 668/head
IrgendwerA8 [Mon, 28 May 2018 23:47:04 +0000 (01:47 +0200)]
Free 2 bytes again.

6 years ago1 byte code size donation for Fabrizio ;)
IrgendwerA8 [Mon, 28 May 2018 23:12:51 +0000 (01:12 +0200)]
1 byte code size donation for Fabrizio ;)

6 years agoMerge pull request #666 from IrgendwerA8/1_byte_donation_for_fabrizio
Oliver Schmidt [Sun, 27 May 2018 10:17:52 +0000 (12:17 +0200)]
Merge pull request #666 from IrgendwerA8/1_byte_donation_for_fabrizio

1 byte donation for Fabrizio ;)

6 years agoSave the three bytes for the plus4 too. 666/head
IrgendwerA8 [Sat, 26 May 2018 22:10:58 +0000 (00:10 +0200)]
Save the three bytes for the plus4 too.

6 years agoSaved 3 bytes for the C16 target.
IrgendwerA8 [Sat, 26 May 2018 18:25:51 +0000 (20:25 +0200)]
Saved 3 bytes for the C16 target.

6 years agoSaved even one more byte.
IrgendwerA8 [Sat, 26 May 2018 17:53:44 +0000 (19:53 +0200)]
Saved even one more byte.

6 years ago1 byte donation for Fabrizio ;)
IrgendwerA8 [Sat, 26 May 2018 14:37:03 +0000 (16:37 +0200)]
1 byte donation for Fabrizio ;)

6 years ago1 byte code size donation for Fabrizio ;)
IrgendwerA8 [Sat, 26 May 2018 14:33:19 +0000 (16:33 +0200)]
1 byte code size donation for Fabrizio ;)

6 years agoMerge pull request #663 from IrgendwerA8/more_popptr1_adaptations
Oliver Schmidt [Sat, 26 May 2018 11:01:27 +0000 (13:01 +0200)]
Merge pull request #663 from IrgendwerA8/more_popptr1_adaptations

Adapted div & mod for popptr1.

6 years agoReestablished entry state of signed operation and optimized that (again). 663/head
IrgendwerA8 [Fri, 25 May 2018 21:18:26 +0000 (23:18 +0200)]
Reestablished entry state of signed operation and optimized that (again).

6 years agoFixed first letter of comments (should be upper case).
IrgendwerA8 [Fri, 25 May 2018 14:10:16 +0000 (16:10 +0200)]
Fixed first letter of comments (should be upper case).

6 years agoUpdate symbols.txt
Oliver Schmidt [Fri, 25 May 2018 12:48:20 +0000 (14:48 +0200)]
Update symbols.txt

6 years agoMerge pull request #662 from Compyx/master
Oliver Schmidt [Fri, 25 May 2018 12:00:36 +0000 (14:00 +0200)]
Merge pull request #662 from Compyx/master

Add CBM kernal call SECOND to CBM library (see issue #525)

6 years agoAdd __fastcall__ to cbm_k_second() documentation 662/head
Bas Wassink [Fri, 25 May 2018 11:17:12 +0000 (13:17 +0200)]
Add __fastcall__ to cbm_k_second() documentation

6 years agoChanged the name of the file too.
IrgendwerA8 [Thu, 24 May 2018 09:37:17 +0000 (11:37 +0200)]
Changed the name of the file too.

6 years agoChanged naming absvaludiv -> absvaludiv16.
IrgendwerA8 [Thu, 24 May 2018 09:31:43 +0000 (11:31 +0200)]
Changed naming absvaludiv -> absvaludiv16.

6 years agoAdapted div & mod for popptr1.
IrgendwerA8 [Thu, 24 May 2018 01:55:40 +0000 (03:55 +0200)]
Adapted div & mod for popptr1.

6 years agoCBM kernal call SECOND, update cbm.h
compyx [Wed, 23 May 2018 15:37:48 +0000 (17:37 +0200)]
CBM kernal call SECOND, update cbm.h

6 years agoAdd CBM kernal call SECOND to CBM library (see issue #525)
compyx [Wed, 23 May 2018 15:32:02 +0000 (17:32 +0200)]
Add CBM kernal call SECOND to CBM library (see issue #525)

6 years agoMerge pull request #658 from polluks/patch-9
Oliver Schmidt [Wed, 23 May 2018 15:05:12 +0000 (17:05 +0200)]
Merge pull request #658 from polluks/patch-9

Indicate a dummy outtext & some clean-up

6 years agoMerge pull request #659 from polluks/patch-10
Oliver Schmidt [Wed, 23 May 2018 13:51:25 +0000 (15:51 +0200)]
Merge pull request #659 from polluks/patch-10

Fixed typos and added references for #655

6 years agoMerge pull request #660 from polluks/patch-11
Oliver Schmidt [Wed, 23 May 2018 13:48:43 +0000 (15:48 +0200)]
Merge pull request #660 from polluks/patch-11

More references

6 years agoUpdate funcref.sgml 659/head
Stefan [Wed, 23 May 2018 13:40:14 +0000 (13:40 +0000)]
Update funcref.sgml

6 years agoUpdate tgi.sgml 660/head
Stefan [Wed, 23 May 2018 13:34:37 +0000 (13:34 +0000)]
Update tgi.sgml

6 years agoUpdate funcref.sgml
Stefan [Wed, 23 May 2018 13:32:17 +0000 (13:32 +0000)]
Update funcref.sgml

6 years agoUpdate funcref.sgml
Stefan [Wed, 23 May 2018 13:30:57 +0000 (13:30 +0000)]
Update funcref.sgml

6 years agoMerge pull request #656 from Compyx/master
Oliver Schmidt [Wed, 23 May 2018 07:47:41 +0000 (09:47 +0200)]
Merge pull request #656 from Compyx/master

Add CBM kernal call TKSA to CBM library (see issue #525)

6 years agoMerge pull request #657 from IrgendwerA8/VariousSpeedSizeOptimizations
Oliver Schmidt [Wed, 23 May 2018 07:46:30 +0000 (09:46 +0200)]
Merge pull request #657 from IrgendwerA8/VariousSpeedSizeOptimizations

Various speed size optimizations

6 years agoMore references
Stefan [Wed, 23 May 2018 04:51:32 +0000 (04:51 +0000)]
More references

6 years agoMerge pull request #653 from IrgendwerA8/cbm_rw_popptr1
greg-king5 [Wed, 23 May 2018 04:31:53 +0000 (00:31 -0400)]
Merge pull request #653 from IrgendwerA8/cbm_rw_popptr1

* Saved 6 bytes by using popptr1.

* Fix typo for import.

* Beautified comment.

6 years agoAdded documentation of cbm_k_untlk
Stefan [Wed, 23 May 2018 04:27:05 +0000 (04:27 +0000)]
Added documentation of cbm_k_untlk

6 years agoFixed typos and added references for #655
Stefan [Wed, 23 May 2018 01:51:54 +0000 (01:51 +0000)]
Fixed typos and added references for #655

6 years agoClean-up because of tgidrv_line.inc 658/head
Stefan [Tue, 22 May 2018 22:32:50 +0000 (22:32 +0000)]
Clean-up because of tgidrv_line.inc

6 years agoIndicate a dummy outtext
Stefan [Tue, 22 May 2018 21:18:10 +0000 (21:18 +0000)]
Indicate a dummy outtext