migrated to ACME assembler

commit 145d64aa6e78838ed07cefed372f0ad6a4687e97
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 20 20:16:57 2020 +0200

    ACME adaptation

commit 885209d7822286744ea53232ae7461472a01d5d6
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 20 19:57:25 2020 +0200

    ACME adaptation

commit 334d84486bc603551887e7cbeb59d329f2224cc7
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 20 18:29:15 2020 +0200

    ACME adaptation

commit b5966f49bcd8f0ca79cbec93819a31238924707e
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 20 18:09:31 2020 +0200

    ACME adaptation

commit 786536a93a5eab5e676fca99625b4eb094a554e7
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 20 17:24:48 2020 +0200

    ACME adaptation

commit 704c70dfb1f5d68775d6f3da220803b8a3990f56
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 20 15:07:12 2020 +0200

    ACME adaptation

commit 136874964c9083b375f151475310f9636871fc72
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 20 14:45:14 2020 +0200

    ACME adaptation

commit 8eca0d5700b72d04336e72c5cd3a68e18b85f96d
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 20 14:06:52 2020 +0200

    ACME adaptation

commit 11d29eb7ee318239d782f85498b6d0524624d5c4
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 20 13:56:45 2020 +0200

    ACME apaptation

commit c9b5e5e04cceb92c66bc027e6440bc0f7c5a499f
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 20 13:49:04 2020 +0200

    ACME adaptation

commit f5cc254cbc921f07863807468cb3fe26b410b409
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 20 13:01:18 2020 +0200

    ACME adaptation

commit e135a27bf9c30cc0965379c954564e06406303b1
Author: FeralChild64 <you@example.com>
Date:   Sat Sep 19 21:55:01 2020 +0200

    ACME adaptation

commit e9dfddf90d9e2795e88b7da40ae050d733faeb56
Author: FeralChild64 <you@example.com>
Date:   Sat Sep 19 21:48:47 2020 +0200

    Makefile fix

commit 07030104c65cf5e5beeacf6d629ccb9245e58657
Author: FeralChild64 <you@example.com>
Date:   Sat Sep 19 21:42:00 2020 +0200

    ACME adaptation

commit f824362ee5bcfbffca86c430b57773b2ffd65655
Author: FeralChild64 <you@example.com>
Date:   Sat Sep 19 20:14:56 2020 +0200

    ACME adaptation

commit 3a3c59007dcd4940d89b8669f34ca56b61c25fdf
Author: FeralChild64 <you@example.com>
Date:   Fri Sep 18 21:51:45 2020 +0200

    ACME adaptation

commit 6790ef7bc88a41de2881c69b7524dd4ab8c74b5d
Author: FeralChild64 <you@example.com>
Date:   Fri Sep 18 20:35:23 2020 +0200

    ACME adaptation

commit 38ad18b90e9ec713aa7ca49576b3388ce1733357
Author: FeralChild64 <you@example.com>
Date:   Fri Sep 18 18:46:20 2020 +0200

    ACME adaptation

commit 541340371122a9702f7b2d9771c298223cffd0e9
Author: FeralChild64 <you@example.com>
Date:   Fri Sep 18 16:49:46 2020 +0200

    ACME adaptation

commit 25cfd5e186459be1a260d3eb8cfff767838de370
Author: FeralChild64 <you@example.com>
Date:   Thu Sep 17 20:13:33 2020 +0200

    ACME adaptation

commit f61599444d5b1d03d8fd8e4a6a7c3b85069bedb3
Author: FeralChild64 <you@example.com>
Date:   Thu Sep 17 19:29:23 2020 +0200

    ACME adaptation

commit b290be31ec7bb2e5723607697da1bbc621c84429
Author: FeralChild64 <you@example.com>
Date:   Thu Sep 17 17:20:14 2020 +0200

    ACME adaptation

commit 877be9e856880d98fd4bcb25b42aaaacda9dc463
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 16 21:47:38 2020 +0200

    ACME adaptation

commit bb20edaf85d386e41d5c2f715b745b68fbd3362e
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 16 21:31:30 2020 +0200

    ACME adaptation

commit c5d31bd8685abce37c8e254d15aac20bd1570d9f
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 16 18:40:49 2020 +0200

    ACME adaptation

commit 29349826b38f8a89649171559dc8cf24c560aff1
Author: FeralChild64 <you@example.com>
Date:   Mon Sep 14 23:35:47 2020 +0200

    ACME adaptation

commit 8bcd6a621c4b11766d0cf34f79858ba90a67248e
Author: FeralChild64 <you@example.com>
Date:   Mon Sep 14 22:52:25 2020 +0200

    ACME adaptation

commit e87a69edc2ce4bfcc460c31e08dcc352a985f88d
Author: FeralChild64 <you@example.com>
Date:   Mon Sep 14 22:43:27 2020 +0200

    ACME adaptation

commit f49a097bd52e96d00b866c02bda7121e4543233c
Author: FeralChild64 <you@example.com>
Date:   Mon Sep 14 19:02:07 2020 +0200

    ACME adaptation

commit fa0e9214a633b8e8f867cc70925b390940dcd426
Author: FeralChild64 <you@example.com>
Date:   Mon Sep 14 17:47:19 2020 +0200

    ACME adaptation

commit 1b763b91e7a03e426227129c7f22f0ce57a4c197
Author: FeralChild64 <you@example.com>
Date:   Mon Sep 14 17:17:10 2020 +0200

    ACME adaptation

commit e92a4b57b232cd85eb1e71090b8a89c7c8461ebc
Author: FeralChild64 <you@example.com>
Date:   Mon Sep 14 17:15:37 2020 +0200

    ACME adaptation

commit de3c693e8a7e73ea5289198946058e3240894e6a
Author: FeralChild64 <you@example.com>
Date:   Mon Sep 14 17:10:05 2020 +0200

    ACME adaptation

commit f9bd7ae0f04e932d613be9ed5cb19af9be5d338e
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 13 14:34:44 2020 +0200

    ACME adaptation

commit 694dee52555dbfc2b1f7f452a9671ff51106c057
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 13 14:16:14 2020 +0200

    ACME adaptation

commit 0af2c55edfcd22942d9f25417eb0d35f55b71604
Author: FeralChild64 <you@example.com>
Date:   Fri Sep 11 17:38:09 2020 +0200

    ACME adaptation

commit 2015e17334bd56a1e8a13a5abc098d9c2e7ea44f
Author: FeralChild64 <you@example.com>
Date:   Fri Sep 11 16:46:05 2020 +0200

    ACME adaptation

commit b1e972162798d60f4483cd6cc261e856c20c2c8c
Author: FeralChild64 <you@example.com>
Date:   Fri Sep 11 16:24:31 2020 +0200

    ACME adaptation

commit 9d027e868466901ba53bf074a79ec8cf16273021
Author: FeralChild64 <you@example.com>
Date:   Fri Sep 11 15:04:31 2020 +0200

    ACME adaptation

commit 957186deddd1aa4f3b4f1aa1f421e4239a584e57
Author: FeralChild64 <you@example.com>
Date:   Thu Sep 10 22:49:07 2020 +0200

    ACME adaptation

commit b8060f67a455cfac109f08d96b62c360d693b931
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 23:07:28 2020 +0200

    ACME adaptation

commit e54d004568f44bbfe5c070ef1d7cf3544112e497
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 22:58:20 2020 +0200

    ACME adaptation

commit f90b77f073c5a605cb31c6ee451f65c8a8aff7d8
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 22:12:09 2020 +0200

    ACME adaptation

commit b211bb4afcd9c58fe1f5c92f3007717d611cd531
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 22:01:40 2020 +0200

    ACME adaptation

commit 8d7ea343b07e9e08e5f77f3c414758a6cffd0440
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 21:38:34 2020 +0200

    ACME adaptation

commit 46413eb0d92d6400aba0ff8dfe556e61e8a44d78
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 21:07:47 2020 +0200

    ACME adaptation

commit 9f98f69ecc21f7b74a5eb89e247f5a2c6fcb655d
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 20:05:03 2020 +0200

    ACME adaptation

commit 7bb9f1cadc682c7e0a4a6796739d860d473ca110
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 19:55:12 2020 +0200

    ACME adaptation

commit 5fc115392b5bdca6b56f67ad866b1884d2d2bdf8
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 19:31:10 2020 +0200

    ACME adaptation

commit b7940fc60e568d859df9e3156f6bacc6d685b2cc
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 19:16:09 2020 +0200

    ACME adaptation

commit 56288cb97197561afa0816b29c134ec1190e8eab
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 18:48:23 2020 +0200

    ACME adaptation

commit 10401a60fc7922a53d782120ef6795d889140218
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 16:34:16 2020 +0200

    ACME adaptation

commit 8ce76e4d2b56837a691ae84b1a412a2ae32a157b
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 16:20:44 2020 +0200

    ACME adaptation

commit 33fade899fa6172ea6b5b5f6683bb61f544429fd
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 15:28:46 2020 +0200

    ACME adaptation

commit a416f04734402fcfbc57a933731376df2e0180a1
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 12:40:03 2020 +0200

    ACME adaptation

commit f8daee005b1d29f6912723be2ac94bc5fbeb0508
Author: FeralChild64 <you@example.com>
Date:   Mon Sep 7 23:29:54 2020 +0200

    ACME adaptation

commit 83fe6bdd0b08a44fdbfc6eefe323a4b194ccaf5b
Author: FeralChild64 <you@example.com>
Date:   Mon Sep 7 22:23:16 2020 +0200

    ACME adaptation

commit cb1f75620b9c83000a15c9c7f7acefdfee79a979
Author: FeralChild64 <you@example.com>
Date:   Mon Sep 7 19:23:12 2020 +0200

    ACME adaptation

commit e524d517c933ae1f0aeb49764d307fadb4845025
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 6 08:24:25 2020 +0200

    ACME adaptation - replaced comments

commit 2ab572c3a21f4a78a7312d0e684bc11d91d1717a
Author: FeralChild64 <you@example.com>
Date:   Sat Sep 5 17:59:10 2020 +0200

    ACME adaptation - replaced the assembler
This commit is contained in:
FeralChild64 committed 2020-09-20 20:22:36 +02:00
1 parent bfc8291e41
commit c8d255130c
685 files changed
+15835 -16296

No files matched your search

-13
View File
@@ -1,13 +0,0 @@
//
// Helper aliases to make the code more readable
// Always use double underscore in label names
// to allow automatic VICE label conflict prevention
//
// Temporary variables for various routines
.label __tokenise_work1 = $07 // CHARAC
.label __tokenise_work2 = $08 // ENDCHR
.label __tokenise_work3 = $0B // COUNT
.label __tokenise_work4 = $0F // GARBFL
.label __tokenise_work5 = $0C // DIMFLG
+39
View File
@@ -0,0 +1,39 @@
;
; Aliases for memory locations for memory block copy routines
;
!addr memmove__src = INDEX+2
!addr memmove__dst = RESHO+0
!addr memmove__size = RESHO+2
!addr memmove__tmp = RESHO+4
;
; Helper aliases to make the code more readable
; Always use double underscore in label names
; to allow automatic VICE label conflict prevention
;
!addr __tokenise_work1 = $07 ; CHARAC
!addr __tokenise_work2 = $08 ; ENDCHR
!addr __tokenise_work3 = $0B ; COUNT
!addr __tokenise_work4 = $0F ; GARBFL
!addr __tokenise_work5 = $0C ; DIMFLG
;
; Aliases for the tokeniser - reuse the CPU stack
;
!addr tk__offset = $100 ; offset into string
!addr tk__length = __tokenise_work1 ; length of the raw string
!addr tk__len_unpacked = $101 ; length of unpacked data; it could replace 'tk__nibble_flag', but at the cost of code size/performance
!addr tk__shorten_bits = $102 ; 2 bytes for quick shortening of packed candidate
!addr tk__nibble_flag = $104 ; $00 = start from new byte, $FF = start from high nibble
!addr tk__byte_offset = $105 ; offset of the current byte (to place new data) in tk__packed
!addr tk__packed = $106 ; packed candidate, 25 bytes is enough for worst case - a 16 byte keyword
+27 -51
View File
@@ -1,63 +1,39 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# M65 BASIC_0 #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# M65 BASIC_0 #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * * #IGNORE
;; #IMPORT# KERNAL_0 = KERNAL_combined.sym KERNAL_0_combined.sym
// Routines imported from Kernal - our private API
;
; Routines imported from Kernal - our private API
;
#if ROM_LAYOUT_STD
#import "KERNAL_combined.sym"
#else
#import "KERNAL_0_combined.sym"
#endif
;; #ALIAS# panic = KERNAL_0.panic
;; #ALIAS# vector_reset = KERNAL_0.vector_reset
;; #ALIAS# hw_entry_reset = KERNAL_0.hw_entry_reset
.function KERNAL()
{
#if ROM_LAYOUT_STD
.return KERNAL
#else
.return KERNAL_0
#endif
}
;; #ALIAS# clear_screen = KERNAL_0.clear_screen
;; #ALIAS# printf = KERNAL_0.printf
#if ROM_LAYOUT_M65
.label map_end = KERNAL().map_end
.label map_NORMAL = KERNAL().map_NORMAL
#endif
;; #ALIAS# plot_set = KERNAL_0.plot_set
;; #ALIAS# print_hex_byte = KERNAL_0.print_hex_byte
;; #ALIAS# print_return = KERNAL_0.print_return
;; #ALIAS# print_space = KERNAL_0.print_space
#if CONFIG_PANIC_SCREEN
.label panic = KERNAL().panic
#endif
;; #ALIAS# tape_head_align = KERNAL_0.tape_head_align
.label vector_reset = KERNAL().vector_reset
.label hw_entry_reset = KERNAL().hw_entry_reset
;; #ALIAS# filename_any = KERNAL_0.filename_any
.label clear_screen = KERNAL().clear_screen
;; #ALIAS# SELDEV = KERNAL_0.SELDEV
#if CONFIG_DBG_PRINTF
.label printf = KERNAL().printf
#endif
;; #ALIAS# map_end = KERNAL_0.map_end
;; #ALIAS# map_NORMAL = KERNAL_0.map_NORMAL
.label plot_set = KERNAL().plot_set
.label print_hex_byte = KERNAL().print_hex_byte
.label print_return = KERNAL().print_return
.label print_space = KERNAL().print_space
#if CONFIG_TAPE_HEAD_ALIGN
.label tape_head_align = KERNAL().tape_head_align
#endif
.label filename_any = KERNAL().filename_any
.label SELDEV = KERNAL().SELDEV
#if ROM_LAYOUT_M65
.label M65_MODEGET = KERNAL().M65_MODEGET
.label M65_MODESET = KERNAL().M65_MODESET
.label M65_SLOW = KERNAL().M65_SLOW
.label M65_FAST = KERNAL().M65_FAST
.label M65_SETWIN_Y = KERNAL().M65_SETWIN_Y
#endif
;; #ALIAS# M65_MODEGET = KERNAL_0.M65_MODEGET
;; #ALIAS# M65_MODESET = KERNAL_0.M65_MODESET
;; #ALIAS# M65_SLOW = KERNAL_0.M65_SLOW
;; #ALIAS# M65_FAST = KERNAL_0.M65_FAST
;; #ALIAS# M65_SETWIN_Y = KERNAL_0.M65_SETWIN_Y
+7 -6
View File
@@ -1,10 +1,11 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
// XXX provide documentation and implementation
; XXX provide documentation and implementation
REASON:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+6 -6
View File
@@ -1,9 +1,9 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
// XXX provide documentation and implementation
; XXX provide documentation and implementation
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+13 -13
View File
@@ -1,16 +1,16 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Official BASIC routine, described in:
//
// - [RG64] C64 Programmers Reference Guide - XXX
// - [CM64] Computes Mapping the Commodore 64 - page 69, XXX
//
// CPU registers that has to be preserved (see [RG64]): XXX
//
;
; Official BASIC routine, described in:
;
; - [RG64] C64 Programmers Reference Guide - XXX
; - [CM64] Computes Mapping the Commodore 64 - page 69, XXX
;
; CPU registers that has to be preserved (see [RG64]): XXX
;
MAIN:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+14 -13
View File
@@ -1,17 +1,18 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Official BASIC routine, described in:
//
// - [RG64] C64 Programmers Reference Guide - XXX
// - [CM64] Computes Mapping the Commodore 64 - page 69, XXX
//
// CPU registers that has to be preserved (see [RG64]): XXX
//
;
; Official BASIC routine, described in:
;
; - [RG64] C64 Programmers Reference Guide - XXX
; - [CM64] Computes Mapping the Commodore 64 - page 69, XXX
;
; CPU registers that has to be preserved (see [RG64]): XXX
;
CHRNCH:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+7 -6
View File
@@ -1,10 +1,11 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
// XXX provide documentation and real implementation
; XXX provide documentation and real implementation
new:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+9 -8
View File
@@ -1,12 +1,13 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
// XXX provide documentation and implementation
// see: https://www.lemon64.com/forum/viewtopic.php?t=64721&sid=bc400a5a6d404f8f092e4d32a92f5de7
// https://www.lemon64.com/forum/viewtopic.php?t=70680&sid=3ff66caf7f5fdf2a3c2ff2ee31fc3fd8
; XXX provide documentation and implementation
; see: https://www.lemon64.com/forum/viewtopic.php?t=64721&sid=bc400a5a6d404f8f092e4d32a92f5de7
; https://www.lemon64.com/forum/viewtopic.php?t=70680&sid=3ff66caf7f5fdf2a3c2ff2ee31fc3fd8
setcharptr:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+14 -13
View File
@@ -1,17 +1,18 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Official BASIC routine, described in:
//
// - [RG64] C64 Programmers Reference Guide - XXX
// - [CM64] Computes Mapping the Commodore 64 - page 69, XXX
//
// CPU registers that has to be preserved (see [RG64]): XXX
//
;
; Official BASIC routine, described in:
;
; - [RG64] C64 Programmers Reference Guide - XXX
; - [CM64] Computes Mapping the Commodore 64 - page 69, XXX
;
; CPU registers that has to be preserved (see [RG64]): XXX
;
QPLOP:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+14 -13
View File
@@ -1,17 +1,18 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Official BASIC routine, described in:
//
// - [RG64] C64 Programmers Reference Guide - XXX
// - [CM64] Computes Mapping the Commodore 64 - page 70, XXX
//
// CPU registers that has to be preserved (see [RG64]): XXX
//
;
; Official BASIC routine, described in:
;
; - [RG64] C64 Programmers Reference Guide - XXX
; - [CM64] Computes Mapping the Commodore 64 - page 70, XXX
;
; CPU registers that has to be preserved (see [RG64]): XXX
;
GONE:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+14 -13
View File
@@ -1,17 +1,18 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Official BASIC routine, described in:
//
// - [RG64] C64 Programmers Reference Guide - XXX
// - [CM64] Computes Mapping the Commodore 64 - page 70, XXX
//
// CPU registers that has to be preserved (see [RG64]): XXX
//
;
; Official BASIC routine, described in:
;
; - [RG64] C64 Programmers Reference Guide - XXX
; - [CM64] Computes Mapping the Commodore 64 - page 70, XXX
;
; CPU registers that has to be preserved (see [RG64]): XXX
;
EVAL:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+6 -5
View File
@@ -1,9 +1,10 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
// XXX provide documentation and implementation
; XXX provide documentation and implementation
basic_adray1:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+6 -5
View File
@@ -1,8 +1,9 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
// XXX provide documentation and implementation
; XXX provide documentation and implementation
basic_adray2:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+13 -12
View File
@@ -1,16 +1,17 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Official BASIC routine, described in:
//
// - [RG64] C64 Programmers Reference Guide - XXX
// - [CM64] Computes Mapping the Commodore 64 - page 69, XXX
//
// CPU registers that has to be preserved (see [RG64]): XXX
//
;
; Official BASIC routine, described in:
;
; - [RG64] C64 Programmers Reference Guide - XXX
; - [CM64] Computes Mapping the Commodore 64 - page 69, XXX
;
; CPU registers that has to be preserved (see [RG64]): XXX
;
ERROR:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+6 -5
View File
@@ -1,9 +1,10 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
// XXX provide documentation and implementation
; XXX provide documentation and implementation
INIT:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+6 -5
View File
@@ -1,9 +1,10 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
// XXX provide documentation and implementation
; XXX provide documentation and implementation
RVECT:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
@@ -1,22 +1,22 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - subtract FAC1 to integer in memory
//
// Output:
// - integer pointed by $49/$4A
//
// See also:
// - https://sta.c64.org/cbm64basconv.html
// - https://www.c64-wiki.com/wiki/BASIC-ROM
//
;
; Math package - subtract FAC1 to integer in memory
;
; Output:
; - integer pointed by $49/$4A
;
; See also:
; - https://sta.c64.org/cbm64basconv.html
; - https://www.c64-wiki.com/wiki/BASIC-ROM
;
// XXX implement, test
; XXX implement, test
convert_FAC1_to_INT:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+12 -12
View File
@@ -1,18 +1,18 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - print FAC1 value
//
// See also:
// - https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
//
;
; Math package - print FAC1 value
;
; See also:
; - https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
;
// XXX implement, test
; XXX implement, test
print_FAC1:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+12 -12
View File
@@ -1,17 +1,17 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - compute TI value
//
// See also:
// - https://www.c64-wiki.com/wiki/BASIC-ROM
//
;
; Math package - compute TI value
;
; See also:
; - https://www.c64-wiki.com/wiki/BASIC-ROM
;
// XXX implement, test
; XXX implement, test
compute_TI:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+12 -12
View File
@@ -1,15 +1,15 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - sets mantissa to 00yyxxaa
//
// See also:
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
;
; Math package - sets mantissa to 00yyxxaa
;
; See also:
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
;
// XXX add name, label, implement, test
; XXX add name, label, implement, test
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+12 -12
View File
@@ -1,15 +1,15 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - set rest of FAC1 and JMP to $b8d2
//
// See also:
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
;
; Math package - set rest of FAC1 and JMP to $b8d2
;
; See also:
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
;
// XXX add name, label, implement, test
; XXX add name, label, implement, test
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+12 -12
View File
@@ -1,17 +1,17 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - compute ST value
//
// See also:
// - https://www.c64-wiki.com/wiki/BASIC-ROM
//
;
; Math package - compute ST value
;
; See also:
; - https://www.c64-wiki.com/wiki/BASIC-ROM
;
// XXX implement, test
; XXX implement, test
compute_ST:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+18 -17
View File
@@ -1,21 +1,22 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - convert FAC1 to 16-bit signed integer
//
// Input:
// - .A - address low byte
// - .Y - address high byte
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 105
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
//
;
; Math package - convert FAC1 to 16-bit signed integer
;
; Input:
; - .A - address low byte
; - .Y - address high byte
;
; See also:
; - [CM64] Computes Mapping the Commodore 64 - page 105
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
;
// XXX provide implementation
; XXX provide implementation
FACINX:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
@@ -1,17 +1,17 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - XXX
//
// See also:
// - https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
//
;
; Math package - XXX
;
; See also:
; - https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
;
// XXX implement, test
; XXX implement, test
convert_FAC1_to_s16:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+18 -17
View File
@@ -1,21 +1,22 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - 16-bit signed integer to FAC1
//
// Output:
// - .A - address high byte (XXX really, not the opposite?)
// - .Y - address low byte
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 107
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
//
;
; Math package - 16-bit signed integer to FAC1
;
; Output:
; - .A - address high byte (XXX really, not the opposite?)
; - .Y - address low byte
;
; See also:
; - [CM64] Computes Mapping the Commodore 64 - page 107
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
;
// XXX provide implementation
; XXX provide implementation
GIVAYF:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+14 -14
View File
@@ -1,16 +1,16 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - XXX
//
// - https://www.c64-wiki.com/wiki/BASIC-ROM
// - https://sta.c64.org/cbm64basconv.html
// - https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
// XXX add name, label, documentation, implement, test
;
; Math package - XXX
;
; - https://www.c64-wiki.com/wiki/BASIC-ROM
; - https://sta.c64.org/cbm64basconv.html
; - https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
;
; XXX add name, label, documentation, implement, test
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+11 -11
View File
@@ -1,13 +1,13 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - XXX
//
// - https://sta.c64.org/cbm64basconv.html
//
// XXX add name, label, documentation, implement, test
;
; Math package - XXX
;
; - https://sta.c64.org/cbm64basconv.html
;
; XXX add name, label, documentation, implement, test
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+16 -16
View File
@@ -1,20 +1,20 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - imports string to FAC1 - XXX: what about spaces?
//
// Input:
// - .A needs to be loaded with string length
// - string address in $22/$23
//
// See also:
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
//
;
; Math package - imports string to FAC1 - XXX: what about spaces?
;
; Input:
; - .A needs to be loaded with string length
; - string address in $22/$23
;
; See also:
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
;
// XXX provide implementation
; XXX provide implementation
STRVAL:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
@@ -1,20 +1,20 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - subtract FAC1 to memory address at $14/$15 and Y/A
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 112
// - https://sta.c64.org/cbm64basconv.html
// - https://www.c64-wiki.com/wiki/BASIC-ROM
//
;
; Math package - subtract FAC1 to memory address at $14/$15 and Y/A
;
; See also:
; - [CM64] Computes Mapping the Commodore 64 - page 112
; - https://sta.c64.org/cbm64basconv.html
; - https://www.c64-wiki.com/wiki/BASIC-ROM
;
// XXX implement, test
; XXX implement, test
convert_FAC1_to_ADDR:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+14 -14
View File
@@ -1,20 +1,20 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - invert FAC1 mantissa
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 113
// - https://www.c64-wiki.com/wiki/BASIC-ROM
// - https://sta.c64.org/cbm64basconv.html
//
;
; Math package - invert FAC1 mantissa
;
; See also:
; - [CM64] Computes Mapping the Commodore 64 - page 113
; - https://www.c64-wiki.com/wiki/BASIC-ROM
; - https://sta.c64.org/cbm64basconv.html
;
// XXX implement, test
; XXX implement, test
inv_FAC1_mantissa:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+16 -15
View File
@@ -1,19 +1,20 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - natural logarigthm
//
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 113
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
;
; Math package - natural logarigthm
;
;
; See also:
; - [CM64] Computes Mapping the Commodore 64 - page 113
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
;
// XXX provide implementation
; XXX provide implementation
log_FAC1:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+12 -12
View File
@@ -1,17 +1,17 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - XXX
//
// See also:
// - https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
//
;
; Math package - XXX
;
; See also:
; - https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
;
// XXX implement, test
; XXX implement, test
get_FAC2_via_INDEX:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+12 -12
View File
@@ -1,17 +1,17 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - XXX
//
// See also:
// - https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
//
;
; Math package - XXX
;
; See also:
; - https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
;
// XXX implement, test
; XXX implement, test
get_FAC1_via_INDEX:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+17 -17
View File
@@ -1,21 +1,21 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - evaluate FAC1 sign, to FAC1
//
// Output:
// - FAC1 - 0 for FAC1 equal 0, 1 for FAC1 > 0, -1 for FAC1 < 0
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 115
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
;
; Math package - evaluate FAC1 sign, to FAC1
;
; Output:
; - FAC1 - 0 for FAC1 equal 0, 1 for FAC1 > 0, -1 for FAC1 < 0
;
; See also:
; - [CM64] Computes Mapping the Commodore 64 - page 115
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
;
// XXX provide implementation
; XXX provide implementation
sgn_FAC1:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+12 -12
View File
@@ -1,14 +1,14 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - XXX
//
// - https://codebase64.org/doku.php?id=base:asm_include_file_for_basic_routines
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
// XXX add name, label, documentation, implement, test
;
; Math package - XXX
;
; - https://codebase64.org/doku.php?id=base:asm_include_file_for_basic_routines
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
;
; XXX add name, label, documentation, implement, test
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
@@ -1,13 +1,13 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - XXX
//
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
// XXX add name, label, documentation, implement, test
;
; Math package - XXX
;
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
;
; XXX add name, label, documentation, implement, test
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+15 -14
View File
@@ -1,18 +1,19 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - absolute value
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 115
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
;
; Math package - absolute value
;
; See also:
; - [CM64] Computes Mapping the Commodore 64 - page 115
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
;
// XXX provide implementation
; XXX provide implementation
abs_FAC1:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+26 -25
View File
@@ -1,29 +1,30 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - compare FAC1 with RAM location
//
// Input:
// - .A - address low byte
// - .Y - address high byte
//
// Output:
// - .A - $00 for equal, $01 for FAC1 > RAM, $FF for FAC1 < RAM
// - flags N/Z, depending on whether FAC1 is 0, positive, or negative
//
// Notes:
// - uses vector at $24, leaves FAC1 and FAC2 unchanged (Codebase64)
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 115
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
;
; Math package - compare FAC1 with RAM location
;
; Input:
; - .A - address low byte
; - .Y - address high byte
;
; Output:
; - .A - $00 for equal, $01 for FAC1 > RAM, $FF for FAC1 < RAM
; - flags N/Z, depending on whether FAC1 is 0, positive, or negative
;
; Notes:
; - uses vector at $24, leaves FAC1 and FAC2 unchanged (Codebase64)
;
; See also:
; - [CM64] Computes Mapping the Commodore 64 - page 115
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
;
// XXX provide implementation
; XXX provide implementation
FCOMP:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+17 -16
View File
@@ -1,20 +1,21 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - convert FAC1 to 32 bit signed integer
//
// Output:
// - $62-$65, big-endian order
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 115
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
//
;
; Math package - convert FAC1 to 32 bit signed integer
;
; Output:
; - $62-$65, big-endian order
;
; See also:
; - [CM64] Computes Mapping the Commodore 64 - page 115
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
;
// XXX provide implementation
; XXX provide implementation
QINT:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+15 -14
View File
@@ -1,18 +1,19 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - rounds away the decimal to make an integer
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 116
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
;
; Math package - rounds away the decimal to make an integer
;
; See also:
; - [CM64] Computes Mapping the Commodore 64 - page 116
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
;
// XXX provide implementation
; XXX provide implementation
int_FAC1:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+21 -20
View File
@@ -1,24 +1,25 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - imports string to FAC1, ignores spaces
//
//
// Input:
// - .A needs to be loaded with first char of the string
// - Carry flag must be clear
// - string address in $7A/$7B
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 116
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
;
; Math package - imports string to FAC1, ignores spaces
;
;
; Input:
; - .A needs to be loaded with first char of the string
; - Carry flag must be clear
; - string address in $7A/$7B
;
; See also:
; - [CM64] Computes Mapping the Commodore 64 - page 116
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
;
// XXX provide implementation
; XXX provide implementation
FIN:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+12 -12
View File
@@ -1,18 +1,18 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - add an ASCII digit that has been converted to a signed integer to FAC1
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 113
//
;
; Math package - add an ASCII digit that has been converted to a signed integer to FAC1
;
; See also:
; - [CM64] Computes Mapping the Commodore 64 - page 113
;
// XXX implement, test
; XXX implement, test
FINLOG:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+19 -18
View File
@@ -1,22 +1,23 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - outputs FAC1 to string at $0100
//
// Output:
// - .A - address low byte
// - .Y - address high byte
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 116
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
;
; Math package - outputs FAC1 to string at $0100
;
; Output:
; - .A - address low byte
; - .Y - address high byte
;
; See also:
; - [CM64] Computes Mapping the Commodore 64 - page 116
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
;
// XXX provide implementation
; XXX provide implementation
FOUT:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+18 -17
View File
@@ -1,21 +1,22 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - square root of FAC2
//
// Note:
// - loads .5 into FAC1 and falling through to the exponentiation routine
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 117
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
;
; Math package - square root of FAC2
;
; Note:
; - loads .5 into FAC1 and falling through to the exponentiation routine
;
; See also:
; - [CM64] Computes Mapping the Commodore 64 - page 117
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
;
// XXX provide implementation
; XXX provide implementation
sqr_FAC2:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+22 -21
View File
@@ -1,25 +1,26 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - set FAC1 as FAC2 raised to the power of FAC1
//
// Input:
// - .A - must load FAC1 exponent ($61) beforehand to set the zero flag
//
// Note:
// - load FAC2 after FAC1, or mimic the Kernals sign comparison (XXX do we need it?)
// - uses exp(x*log(y)) formula to calculate y^x; slow and inaccurate
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 117
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
;
; Math package - set FAC1 as FAC2 raised to the power of FAC1
;
; Input:
; - .A - must load FAC1 exponent ($61) beforehand to set the zero flag
;
; Note:
; - load FAC2 after FAC1, or mimic the Kernals sign comparison (XXX do we need it?)
; - uses exp(x*log(y)) formula to calculate y^x; slow and inaccurate
;
; See also:
; - [CM64] Computes Mapping the Commodore 64 - page 117
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
;
// XXX provide implementation
; XXX provide implementation
pwr_FAC2_FAC1:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+16 -15
View File
@@ -1,19 +1,20 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - exponential function, e raised to FAC1 power
//
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 117
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
;
; Math package - exponential function, e raised to FAC1 power
;
;
; See also:
; - [CM64] Computes Mapping the Commodore 64 - page 117
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
;
// XXX provide implementation
; XXX provide implementation
exp_FAC1:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+24 -23
View File
@@ -1,27 +1,28 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - evaluate polynomial with odd powers only for FAC1 value
//
// Input:
// - .A - table address low byte
// - .Y - table address low byte
// - table format:
// - polynomial degree (8 bit integer)
// - oefficients (floats), starting from highest degree, times 1+degree
//
// Notes:
// - calls POLY2(table, X*X)*X
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 206
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
// - https://www.c64-wiki.com/wiki/POLY1
//
;
; Math package - evaluate polynomial with odd powers only for FAC1 value
;
; Input:
; - .A - table address low byte
; - .Y - table address low byte
; - table format:
; - polynomial degree (8 bit integer)
; - oefficients (floats), starting from highest degree, times 1+degree
;
; Notes:
; - calls POLY2(table, X*X)*X
;
; See also:
; - [CM64] Computes Mapping the Commodore 64 - page 206
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
; - https://www.c64-wiki.com/wiki/POLY1
;
// XXX provide implementation
; XXX provide implementation
poly1_FAC1:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+24 -23
View File
@@ -1,27 +1,28 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - evaluate polynomial with odd and even powers for FAC1 value
//
// Input:
// - .A - table address low byte
// - .Y - table address low byte
// - table format:
// - polynomial degree (8 bit integer)
// - oefficients (floats), starting from highest degree, times 1+degree
//
// Notes:
// - uses Horner method
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 207
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
// - https://www.c64-wiki.com/wiki/POLY1
//
;
; Math package - evaluate polynomial with odd and even powers for FAC1 value
;
; Input:
; - .A - table address low byte
; - .Y - table address low byte
; - table format:
; - polynomial degree (8 bit integer)
; - oefficients (floats), starting from highest degree, times 1+degree
;
; Notes:
; - uses Horner method
;
; See also:
; - [CM64] Computes Mapping the Commodore 64 - page 207
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
; - https://www.c64-wiki.com/wiki/POLY1
;
// XXX provide implementation
; XXX provide implementation
poly2_FAC1:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+14 -13
View File
@@ -1,17 +1,18 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - cosine of FAC1 in radians
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 210
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
;
; Math package - cosine of FAC1 in radians
;
; See also:
; - [CM64] Computes Mapping the Commodore 64 - page 210
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
;
// XXX provide implementation
; XXX provide implementation
COS:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+21 -20
View File
@@ -1,28 +1,29 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - sine of FAC1 in radians
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 210 - XXX address does not match
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
;
; Math package - sine of FAC1 in radians
;
; See also:
; - [CM64] Computes Mapping the Commodore 64 - page 210 - XXX address does not match
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
;
// XXX provide implementation
; XXX provide implementation
sin_FAC1:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
poly_sin:
.byte $05 // series length - 1
!byte $05 ; series length - 1
put_const_POLY_SIN_1()
put_const_POLY_SIN_2()
put_const_POLY_SIN_3()
put_const_POLY_SIN_4()
put_const_POLY_SIN_5()
put_const_POLY_SIN_6()
+PUT_CONST_POLY_SIN_1
+PUT_CONST_POLY_SIN_2
+PUT_CONST_POLY_SIN_3
+PUT_CONST_POLY_SIN_4
+PUT_CONST_POLY_SIN_5
+PUT_CONST_POLY_SIN_6
+14 -13
View File
@@ -1,17 +1,18 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - tangent of FAC1 in radians
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 210
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
;
; Math package - tangent of FAC1 in radians
;
; See also:
; - [CM64] Computes Mapping the Commodore 64 - page 210
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
;
// XXX provide implementation
; XXX provide implementation
tan_FAC1:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+14 -13
View File
@@ -1,17 +1,18 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Math package - arc tangent of FAC1
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 211
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
;
; Math package - arc tangent of FAC1
;
; See also:
; - [CM64] Computes Mapping the Commodore 64 - page 211
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
;
// XXX provide implementation
; XXX provide implementation
atn_FAC1:
STUB_IMPLEMENTATION()
+STUB_IMPLEMENTATION
+15 -15
View File
@@ -1,23 +1,23 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
// Well-known BASIC routine, described in:
//
// - [CM64] Computes Mapping the Commodore 64 - page 97
// - https://www.c64-wiki.com/wiki/BASIC-ROM
// - https://csdb.dk/forums/?roomid=11&topicid=137233
//
; Well-known BASIC routine, described in:
;
; - [CM64] Computes Mapping the Commodore 64 - page 97
; - https://www.c64-wiki.com/wiki/BASIC-ROM
; - https://csdb.dk/forums/?roomid=11&topicid=137233
;
// XXX use this routine to initialize TXTPTR
; XXX use this routine to initialize TXTPTR
RUNC:
// According to WIKI, we should load $7A/$7B with $2B-1/$2C-1), this does not makes sense.
// But CSDB claims, that it should 'set current character pointer to start of basic - 1' - this
// looks sane, also checked that the original BASIC routine does this (short test program)
; According to WIKI, we should load $7A/$7B with $2B-1/$2C-1), this does not makes sense.
; But CSDB claims, that it should 'set current character pointer to start of basic - 1' - this
; looks sane, also checked that the original BASIC routine does this (short test program)
// Lets initialize TXTPTR using TXTTAB
; Lets initialize TXTPTR using TXTTAB
lda TXTTAB+0
sec
+15 -15
View File
@@ -1,22 +1,22 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
// Well-known BASIC routine, described in:
//
// - [CM64] Computes Mapping the Commodore 64 - page 97
// - https://www.lemon64.com/forum/viewtopic.php?t=64721&sid=bc400a5a6d404f8f092e4d32a92f5de7
// - https://www.lemon64.com/forum/viewtopic.php?t=70680&sid=3ff66caf7f5fdf2a3c2ff2ee31fc3fd8
// - https://codebase64.org/doku.php?id=base:assembling_your_own_cart_rom_image
; Well-known BASIC routine, described in:
;
; - [CM64] Computes Mapping the Commodore 64 - page 97
; - https://www.lemon64.com/forum/viewtopic.php?t=64721&sid=bc400a5a6d404f8f092e4d32a92f5de7
; - https://www.lemon64.com/forum/viewtopic.php?t=70680&sid=3ff66caf7f5fdf2a3c2ff2ee31fc3fd8
; - https://codebase64.org/doku.php?id=base:assembling_your_own_cart_rom_image
NEWSTT:
// XXX Real implementation is more complicated, it iss actually a part
// of the BASIC main loop. It is, however, often called by various
// utilities to simply run the software which was just loaded or
// uncompressed.
; XXX Real implementation is more complicated, it iss actually a part
; of the BASIC main loop. It is, however, often called by various
; utilities to simply run the software which was just loaded or
; uncompressed.
// For now, lets cheat a little - this should provide some compatibility:
; For now, lets cheat a little - this should provide some compatibility:
jmp cmd_run
+17 -17
View File
@@ -1,31 +1,31 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# M65 BASIC_1 #TAKE-FLOAT
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# M65 BASIC_1 #TAKE-FLOAT
;; #LAYOUT# * * #IGNORE
// Print string at $YYAA
// Computes Mapping the 64 p101
; Print string at $YYAA
; Computes Mapping the 64 p101
// print string routine
; print string routine
STROUT:
// Setup pointer
; Setup pointer
sty FRESPC+1
sta FRESPC+0
phx_trash_a
+phx_trash_a
// Get offset ready
; Get offset ready
ldy #$00
!:
// Save Y in X, since X is preserved by chrout, but Y is not
@1:
; Save Y in X, since X is preserved by chrout, but Y is not
tya
tax
lda (FRESPC),y
beq !+
beq @2
jsr JCHROUT
@@ -33,8 +33,8 @@ STROUT:
tay
iny
bne !-
!:
pla // XXX can we use plx_trash_a here?
bne @1
@2:
pla ; XXX can we use plx_trash_a here?
tax
rts
+17 -17
View File
@@ -1,24 +1,24 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Default values for BASIC vectors - described in:
//
// - [RG64] C64 Programmers Reference Guide - pages 68-70
// - [CM64] Computes Mapping the Commodore 64 - page 318
//
;
; Default values for BASIC vectors - described in:
;
; - [RG64] C64 Programmers Reference Guide - pages 68-70
; - [CM64] Computes Mapping the Commodore 64 - page 318
;
basic_vector_defaults_1:
.word ERROR // IERROR
.word MAIN // IMAIN
.word CHRNCH // ICHRNCH
.word QPLOP // IQPLOP
.word GONE // IGONE
.word EVAL // IEVAL
!word ERROR ; IERROR
!word MAIN ; IMAIN
!word CHRNCH ; ICHRNCH
!word QPLOP ; IQPLOP
!word GONE ; IGONE
!word EVAL ; IEVAL
basic_vector_defaults_2:
.word basic_adray1 // ADRAY1
.word basic_adray2 // ADRAY2
!word basic_adray1 ; ADRAY1
!word basic_adray2 ; ADRAY2
+6 -6
View File
@@ -1,9 +1,9 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 * #IGNORE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 * #IGNORE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
// Skip the gap between $C000-$DFFF
; Skip the gap between $C000-$DFFF
.fill $2000, $00
!fill $2000, $00
+5 -5
View File
@@ -1,9 +1,9 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# M65 BASIC_1 #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# M65 BASIC_1 #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
packed_as_1n:
put_packed_as_1n()
+PUT_PACKED_AS_1N
+5 -5
View File
@@ -1,9 +1,9 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# M65 BASIC_1 #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# M65 BASIC_1 #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
packed_as_3n:
put_packed_as_3n()
+PUT_PACKED_AS_3N
+7 -8
View File
@@ -1,13 +1,12 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# M65 BASIC_1 #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# M65 BASIC_1 #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
#if CONFIG_COMPRESSION_LVL_2
!ifdef CONFIG_COMPRESSION_LVL_2 {
packed_dictionary:
put_packed_freq_DICTIONARY()
#endif
+PUT_PACKED_FREQ_dictionary
}
+9 -9
View File
@@ -1,19 +1,19 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# M65 BASIC_1 #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# M65 BASIC_1 #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
#if CONFIG_COMPRESSION_LVL_2
!ifdef CONFIG_COMPRESSION_LVL_2 {
packed_dict_errors:
put_packed_dict_errors()
+PUT_PACKED_DICT_errors
#else
} else {
packed_freq_errors:
put_packed_freq_errors()
+PUT_PACKED_FREQ_errors
#endif
}
+5 -5
View File
@@ -1,9 +1,9 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# M65 BASIC_1 #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# M65 BASIC_1 #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
packed_freq_keywords_V2:
put_packed_freq_keywords_V2()
+PUT_PACKED_FREQ_keywords_V2
+5 -5
View File
@@ -1,9 +1,9 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# M65 BASIC_1 #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# M65 BASIC_1 #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
packed_freq_keywords_01:
put_packed_freq_keywords_01()
+PUT_PACKED_FREQ_keywords_01
+7 -8
View File
@@ -1,12 +1,11 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# M65 BASIC_1 #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# M65 BASIC_1 #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
#if !HAS_SMALL_BASIC
!ifndef HAS_SMALL_BASIC {
packed_freq_keywords_02:
put_packed_freq_keywords_02()
#endif
+PUT_PACKED_FREQ_keywords_02
}
+7 -7
View File
@@ -1,12 +1,12 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# M65 BASIC_1 #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# M65 BASIC_1 #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
#if ROM_LAYOUT_M65
!ifdef CONFIG_MB_M65 {
packed_freq_keywords_03:
put_packed_freq_keywords_03()
+PUT_PACKED_FREQ_keywords_03
#endif
}
+9 -10
View File
@@ -1,19 +1,18 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# M65 BASIC_1 #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# M65 BASIC_1 #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
#if CONFIG_COMPRESSION_LVL_2
!ifdef CONFIG_COMPRESSION_LVL_2 {
packed_dict_misc:
put_packed_dict_misc()
+PUT_PACKED_DICT_misc
#else
} else {
packed_freq_misc:
put_packed_freq_misc()
#endif
+PUT_PACKED_FREQ_misc
}
+35 -39
View File
@@ -1,56 +1,52 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# X16 BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Startup banner, to be displayed during cold start
//
.encoding "petscii_upper"
;
; Startup banner, to be displayed during cold start
;
.macro BANNER_TEXT() {
!macro BANNER_TEXT {
#if CONFIG_BRAND_CUSTOM_BUILD
.text "OPEN ROMS "
.text CONFIG_CUSTOM_BRAND
#elif CONFIG_BRAND_GENERIC
.text "OPEN ROMS GENERIC BUILD"
#elif CONFIG_BRAND_TESTING
.text "OPEN ROMS TESTING BUILD"
#elif CONFIG_BRAND_ULTIMATE_64
.text "OPEN ROMS FOR ULTIMATE 64"
#endif
!ifdef CONFIG_BRAND_CUSTOM_BUILD {
!pet "open roms "
+CONFIG_CUSTOM_BRAND
} else ifdef CONFIG_BRAND_GENERIC {
!pet "open roms generic build"
} else ifdef CONFIG_BRAND_TESTING {
!pet "open roms testing build"
} else ifdef CONFIG_BRAND_ULTIMATE_64 {
!pet "open roms for ultimate 64"
}
}
startup_banner:
#if CONFIG_BANNER_SIMPLE
!ifdef CONFIG_BANNER_SIMPLE {
.text " "
BANNER_TEXT()
.byte $00
!pet " "
+BANNER_TEXT
!byte $00
#elif CONFIG_BANNER_FANCY
} else ifdef CONFIG_BANNER_FANCY {
BANNER_TEXT()
.byte $00
+BANNER_TEXT
!byte $00
rainbow_logo:
{
.var SET_COLOR_0 = $05
.var SET_COLOR_1 = $1C
.var SET_COLOR_2 = $9E
.var SET_COLOR_3 = $1E
.var SET_COLOR_4 = $9F
!set SET_COLOR_0 = $05
!set SET_COLOR_1 = $1C
!set SET_COLOR_2 = $9E
!set SET_COLOR_3 = $1E
!set SET_COLOR_4 = $9F
!byte SET_COLOR_1, $12, $A4, $A4, $A4, $A4, $A4, $A4, $A4, $0D
!byte SET_COLOR_2, $12, $A4, $A4, $A4, $A4, $A4, $A4, $0D
!byte SET_COLOR_3, $12, $A4, $A4, $A4, $A4, $A4, $0D
!byte SET_COLOR_4, $12, $A4, $A4, $A4, $A4, $92
!byte SET_COLOR_0, $00
.byte SET_COLOR_1, $12, $A4, $A4, $A4, $A4, $A4, $A4, $A4, $0D
.byte SET_COLOR_2, $12, $A4, $A4, $A4, $A4, $A4, $A4, $0D
.byte SET_COLOR_3, $12, $A4, $A4, $A4, $A4, $A4, $0D
.byte SET_COLOR_4, $12, $A4, $A4, $A4, $A4, $92
.byte SET_COLOR_0, $00
}
#endif
+57 -62
View File
@@ -1,71 +1,66 @@
// #LAYOUT# M65 BASIC_1 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# M65 BASIC_1 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Startup banner, to be displayed during cold start
//
.encoding "petscii_upper"
;
; Startup banner, to be displayed during cold start
;
startup_banner:
// Fancy MEGA65 banner - from Retrofan, slightly tweaked
; Fancy MEGA65 banner - from Retrofan, slightly tweaked
// remove unneeded $1F's (blue) and $9A's (light blue)
!byte $9A, $12, $20, $20, $7F, $A9, $20, $20, $92, $20, $12, $20, $20, $20, $20, $92
!byte $20, $12, $A9, $20, $20, $20, $92, $A1, $20, $12, $A9, $20, $20, $20, $7F, $92
!byte $20, $20, $12, $A3, $A3, $A3, $A3, $A3, $A3, $A3
!byte $0D
!byte $9A, $12, $20, $20, $20, $20, $20
!byte $20, $92, $20, $12, $20, $20, $92, $A2, $BB, $92, $20, $12, $20, $20, $92, $AC
!byte $A2, $A2, $20, $9A, $12, $20, $20, $92, $20, $12, $20, $20, $92, $20, $20, $12
!byte $1E, $A3, $A3, $A3, $A3, $A3, $A3
!byte $0D
!byte $9A, $12, $20, $20, $92, $7F, $A9, $12, $20, $20, $92, $20, $12, $20, $20, $A2
!byte $92, $BE, $92, $20, $12, $20, $20, $92, $BC, $12, $20, $20, $92, $20, $12, $20
!byte $20, $20, $20, $20, $92, $20, $20, $12, $9E, $A3, $A3, $A3, $A3, $A3
!byte $0D
!byte $9A, $12, $20, $20, $92, $20, $20, $12, $20, $20, $92, $20, $12, $20, $20, $20
!byte $20, $92, $20, $12, $20, $20, $20, $20, $20, $92, $20, $12, $20, $20, $92, $20
!byte $12, $20, $20, $92, $20, $20, $12, $96, $A3, $A3, $A3, $A3, $1F, $92
!byte $0D, $0D, $05, $00
; Fancy MEGA65 banner - from Retrofan
;
; !byte $9a, $12, $20, $20, $7f, $a9, $20, $20, $1f, $20, $9a, $20, $20, $20
; !byte $20, $1f, $20, $9a, $a9, $20, $20, $20, $92, $a1, $1f, $12, $20, $9a, $a9, $20
; !byte $20, $20, $7f, $1f, $20, $20, $9a, $a3, $a3, $a3, $a3, $a3, $a3, $a3, $1f, $20
; !byte $20, $20, $20, $05, $92, $4d, $45, $47, $41, $9a, $12, $20, $20, $20, $20, $20
; !byte $20, $1f, $20, $9a, $20, $20, $92, $a2, $bb, $1f, $12, $20, $9a, $20, $20, $92
; !byte $ac, $a2, $a2, $1f, $12, $20, $9a, $20, $20, $1f, $20, $9a, $20, $20, $1f, $20
; !byte $20, $1e, $a3, $a3, $a3, $a3, $a3, $a3, $1f, $20, $20, $20, $20, $05, $92, $42
; !byte $41, $53, $49, $43, $9a, $12, $20, $20, $92, $7f, $a9, $12, $20, $20, $1f, $20
; !byte $9a, $20, $20, $a2, $92, $be, $1f, $12, $20, $9a, $20, $20, $92, $bc, $12, $20
; !byte $20, $1f, $20, $9a, $20, $20, $20, $20, $20, $1f, $20, $20, $9e, $a3, $a3, $a3
; !byte $a3, $a3, $1f, $20, $20, $20, $20, $05, $92, $2d, $2d, $2d, $2d, $2d, $2d, $9a
; !byte $12, $20, $20, $1f, $20, $20, $9a, $20, $20, $1f, $20, $9a, $20, $20, $20, $20
; !byte $1f, $20, $9a, $20, $20, $20, $20, $20, $1f, $20, $9a, $20, $20, $1f, $20, $9a
; !byte $20, $20, $1f, $20, $20, $96, $a3, $a3, $a3, $a3, $1f
; !byte $92, $0D, $0D, $05, $00
.byte $9A, $12, $20, $20, $7F, $A9, $20, $20, $92, $20, $12, $20, $20, $20, $20, $92
.byte $20, $12, $A9, $20, $20, $20, $92, $A1, $20, $12, $A9, $20, $20, $20, $7F, $92
.byte $20, $20, $12, $A3, $A3, $A3, $A3, $A3, $A3, $A3
.byte $0D
.byte $9A, $12, $20, $20, $20, $20, $20
.byte $20, $92, $20, $12, $20, $20, $92, $A2, $BB, $92, $20, $12, $20, $20, $92, $AC
.byte $A2, $A2, $20, $9A, $12, $20, $20, $92, $20, $12, $20, $20, $92, $20, $20, $12
.byte $1E, $A3, $A3, $A3, $A3, $A3, $A3
.byte $0D
.byte $9A, $12, $20, $20, $92, $7F, $A9, $12, $20, $20, $92, $20, $12, $20, $20, $A2
.byte $92, $BE, $92, $20, $12, $20, $20, $92, $BC, $12, $20, $20, $92, $20, $12, $20
.byte $20, $20, $20, $20, $92, $20, $20, $12, $9E, $A3, $A3, $A3, $A3, $A3
.byte $0D
.byte $9A, $12, $20, $20, $92, $20, $20, $12, $20, $20, $92, $20, $12, $20, $20, $20
.byte $20, $92, $20, $12, $20, $20, $20, $20, $20, $92, $20, $12, $20, $20, $92, $20
.byte $12, $20, $20, $92, $20, $20, $12, $96, $A3, $A3, $A3, $A3, $1F, $92
.byte $0D, $0D, $05, $00
// Fancy MEGA65 banner - from Retrofan
//
// .byte $9a, $12, $20, $20, $7f, $a9, $20, $20, $1f, $20, $9a, $20, $20, $20
// .byte $20, $1f, $20, $9a, $a9, $20, $20, $20, $92, $a1, $1f, $12, $20, $9a, $a9, $20
// .byte $20, $20, $7f, $1f, $20, $20, $9a, $a3, $a3, $a3, $a3, $a3, $a3, $a3, $1f, $20
// .byte $20, $20, $20, $05, $92, $4d, $45, $47, $41, $9a, $12, $20, $20, $20, $20, $20
// .byte $20, $1f, $20, $9a, $20, $20, $92, $a2, $bb, $1f, $12, $20, $9a, $20, $20, $92
// .byte $ac, $a2, $a2, $1f, $12, $20, $9a, $20, $20, $1f, $20, $9a, $20, $20, $1f, $20
// .byte $20, $1e, $a3, $a3, $a3, $a3, $a3, $a3, $1f, $20, $20, $20, $20, $05, $92, $42
// .byte $41, $53, $49, $43, $9a, $12, $20, $20, $92, $7f, $a9, $12, $20, $20, $1f, $20
// .byte $9a, $20, $20, $a2, $92, $be, $1f, $12, $20, $9a, $20, $20, $92, $bc, $12, $20
// .byte $20, $1f, $20, $9a, $20, $20, $20, $20, $20, $1f, $20, $20, $9e, $a3, $a3, $a3
// .byte $a3, $a3, $1f, $20, $20, $20, $20, $05, $92, $2d, $2d, $2d, $2d, $2d, $2d, $9a
// .byte $12, $20, $20, $1f, $20, $20, $9a, $20, $20, $1f, $20, $9a, $20, $20, $20, $20
// .byte $1f, $20, $9a, $20, $20, $20, $20, $20, $1f, $20, $9a, $20, $20, $1f, $20, $9a
// .byte $20, $20, $1f, $20, $20, $96, $a3, $a3, $a3, $a3, $1f
// .byte $92, $0D, $0D, $05, $00
// Original MEGA65 banner - supplied by Deft
//
// .byte $9A,$12,$A3,$A3,$A3,$A3,$A3,$A3,$DF,$9B,$92,$20,$05,$12,$A0,$A0
// .byte $DF,$9B,$92,$20,$05,$12,$A0,$A0,$DF,$9B,$92,$20,$05,$12,$A0,$A0
// .byte $DF,$9B,$92,$20,$05,$12,$A0,$A0,$DF,$9A,$92,$20,$05,$20,$20,$20
// .byte $4D,$20,$45,$20,$47,$20,$41,$0D,$99,$12,$A3,$A3,$A3,$A3,$A3,$A3
// .byte $A3,$DF,$92,$7F,$12,$CD,$CD,$DF,$92,$7F,$12,$DF,$05,$92,$20,$20
// .byte $99,$7F,$12,$DF,$05,$92,$20,$20,$99,$7F,$12,$DF,$92,$7F,$12,$DF
// .byte $05,$92,$20,$20,$99,$42,$20,$41,$20,$53,$20,$49,$20,$43,$0D,$9E
// .byte $12,$A3,$A3,$A3,$A3,$A3,$A3,$A3,$A3,$DF,$9B,$92,$7F,$12,$DF,$92
// .byte $7F,$12,$DF,$92,$7F,$12,$CD,$05,$92,$20,$20,$9B,$7F,$12,$CD,$92
// .byte $7F,$12,$DF,$92,$7F,$12,$CD,$92,$7F,$12,$DF,$9A,$92,$20,$05,$20
// .byte $9A,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$0D,$96,$12,$A3,$A3,$A3,$A3,$A3
// .byte $A3,$A3,$A3,$A3,$DF,$9A,$92,$7F,$12,$DF,$92,$7F,$9B,$20,$9A,$7F
// .byte $12,$A0,$A0,$9B,$92,$20,$9A,$7F,$12,$A0,$A0,$9B,$92,$20,$9A,$7F
// .byte $12,$DF,$92,$7F,$9B,$20,$9A,$20,$9B,"0.2.0.0",$0D
// .byte $0D,$05,$92,$00
; Original MEGA65 banner - supplied by Deft
;
; !byte $9A,$12,$A3,$A3,$A3,$A3,$A3,$A3,$DF,$9B,$92,$20,$05,$12,$A0,$A0
; !byte $DF,$9B,$92,$20,$05,$12,$A0,$A0,$DF,$9B,$92,$20,$05,$12,$A0,$A0
; !byte $DF,$9B,$92,$20,$05,$12,$A0,$A0,$DF,$9A,$92,$20,$05,$20,$20,$20
; !byte $4D,$20,$45,$20,$47,$20,$41,$0D,$99,$12,$A3,$A3,$A3,$A3,$A3,$A3
; !byte $A3,$DF,$92,$7F,$12,$CD,$CD,$DF,$92,$7F,$12,$DF,$05,$92,$20,$20
; !byte $99,$7F,$12,$DF,$05,$92,$20,$20,$99,$7F,$12,$DF,$92,$7F,$12,$DF
; !byte $05,$92,$20,$20,$99,$42,$20,$41,$20,$53,$20,$49,$20,$43,$0D,$9E
; !byte $12,$A3,$A3,$A3,$A3,$A3,$A3,$A3,$A3,$DF,$9B,$92,$7F,$12,$DF,$92
; !byte $7F,$12,$DF,$92,$7F,$12,$CD,$05,$92,$20,$20,$9B,$7F,$12,$CD,$92
; !byte $7F,$12,$DF,$92,$7F,$12,$CD,$92,$7F,$12,$DF,$9A,$92,$20,$05,$20
; !byte $9A,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$0D,$96,$12,$A3,$A3,$A3,$A3,$A3
; !byte $A3,$A3,$A3,$A3,$DF,$9A,$92,$7F,$12,$DF,$92,$7F,$9B,$20,$9A,$7F
; !byte $12,$A0,$A0,$9B,$92,$20,$9A,$7F,$12,$A0,$A0,$9B,$92,$20,$9A,$7F
; !byte $12,$DF,$92,$7F,$9B,$20,$9A,$20,$9B,"0.2.0.0",$0D
; !byte $0D,$05,$92,$00
+5 -5
View File
@@ -1,9 +1,9 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
// String - question mark in reverse
; String - question mark in reverse
str_rev_question:
.byte $12, $3F, $92, $00
!byte $12, $3F, $92, $00
+21 -21
View File
@@ -1,29 +1,29 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Table to TI$ special variable support
//
;
; Table to TI$ special variable support
;
table_TI_hi:
#if !CONFIG_RS232_UP9600
!ifndef CONFIG_RS232_UP9600 {
.byte $20 // 10 hours = 2169000 ticks
.byte $03 // 1 hour = 216000 ticks
.byte $00 // 10 minutes = 36000 ticks
.byte $00 // 1 minute = 3600 ticks
.byte $00 // 10 seconds = 600 ticks
.byte $00 // 1 second = 60 ticks
!byte $20 ; 10 hours = 2169000 ticks
!byte $03 ; 1 hour = 216000 ticks
!byte $00 ; 10 minutes = 36000 ticks
!byte $00 ; 1 minute = 3600 ticks
!byte $00 ; 10 seconds = 600 ticks
!byte $00 ; 1 second = 60 ticks
#else
} else {
.byte $23 // 10 hours = 2304000 ticks
.byte $03 // 1 hour = 230400 ticks
.byte $00 // 10 minutes = 38400 ticks
.byte $00 // 1 minute = 3840 ticks
.byte $00 // 10 seconds = 640 ticks
.byte $00 // 1 second = 64 ticks
!byte $23 ; 10 hours = 2304000 ticks
!byte $03 ; 1 hour = 230400 ticks
!byte $00 ; 10 minutes = 38400 ticks
!byte $00 ; 1 minute = 3840 ticks
!byte $00 ; 10 seconds = 640 ticks
!byte $00 ; 1 second = 64 ticks
#endif
}
+21 -21
View File
@@ -1,29 +1,29 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Table to TI$ special variable support
//
;
; Table to TI$ special variable support
;
table_TI_lo:
#if !CONFIG_RS232_UP9600
!ifndef CONFIG_RS232_UP9600 {
.byte $80 // 10 hours = 2169000 ticks
.byte $C0 // 1 hour = 216000 ticks
.byte $A0 // 10 minutes = 36000 ticks
.byte $10 // 1 minute = 3600 ticks
.byte $58 // 10 seconds = 600 ticks
.byte $3C // 1 second = 60 ticks
!byte $80 ; 10 hours = 2169000 ticks
!byte $C0 ; 1 hour = 216000 ticks
!byte $A0 ; 10 minutes = 36000 ticks
!byte $10 ; 1 minute = 3600 ticks
!byte $58 ; 10 seconds = 600 ticks
!byte $3C ; 1 second = 60 ticks
#else
} else {
.byte $00 // 10 hours = 2304000 ticks
.byte $00 // 1 hour = 230400 ticks
.byte $00 // 10 minutes = 38400 ticks
.byte $00 // 1 minute = 3840 ticks
.byte $80 // 10 seconds = 640 ticks
.byte $40 // 1 second = 64 ticks
!byte $00 ; 10 hours = 2304000 ticks
!byte $00 ; 1 hour = 230400 ticks
!byte $00 ; 10 minutes = 38400 ticks
!byte $00 ; 1 minute = 3840 ticks
!byte $80 ; 10 seconds = 640 ticks
!byte $40 ; 1 second = 64 ticks
#endif
}
+21 -21
View File
@@ -1,29 +1,29 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Table to TI$ special variable support
//
;
; Table to TI$ special variable support
;
table_TI_mid:
#if !CONFIG_RS232_UP9600
!ifndef CONFIG_RS232_UP9600 {
.byte $F5 // 10 hours = 2169000 ticks
.byte $4B // 1 hour = 216000 ticks
.byte $8C // 10 minutes = 36000 ticks
.byte $0E // 1 minute = 3600 ticks
.byte $02 // 10 seconds = 600 ticks
.byte $00 // 1 second = 60 ticks
!byte $F5 ; 10 hours = 2169000 ticks
!byte $4B ; 1 hour = 216000 ticks
!byte $8C ; 10 minutes = 36000 ticks
!byte $0E ; 1 minute = 3600 ticks
!byte $02 ; 10 seconds = 600 ticks
!byte $00 ; 1 second = 60 ticks
#else
} else {
.byte $28 // 10 hours = 2304000 ticks
.byte $84 // 1 hour = 230400 ticks
.byte $96 // 10 minutes = 38400 ticks
.byte $0F // 1 minute = 3840 ticks
.byte $02 // 10 seconds = 640 ticks
.byte $00 // 1 second = 64 ticks
!byte $28 ; 10 hours = 2304000 ticks
!byte $84 ; 1 hour = 230400 ticks
!byte $96 ; 10 minutes = 38400 ticks
!byte $0F ; 1 minute = 3840 ticks
!byte $02 ; 10 seconds = 640 ticks
!byte $00 ; 1 second = 64 ticks
#endif
}
+67 -77
View File
@@ -1,96 +1,86 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Jumptable for BASIC V2 dialect commands
//
;
; Jumptable for BASIC V2 dialect commands
;
!set ITEM_80 = cmd_end
!set ITEM_81 = cmd_for
!set ITEM_82 = cmd_next
!set ITEM_83 = cmd_data
!set ITEM_84 = cmd_inputhash
!set ITEM_85 = cmd_input
!set ITEM_86 = array_create ; cmd_dim
!set ITEM_87 = cmd_read
!set ITEM_88 = assign_variable ; cmd_let
!set ITEM_89 = cmd_goto
!set ITEM_8A = cmd_run
!set ITEM_8B = cmd_if
!set ITEM_8C = do_restore ; cmd_restore
!set ITEM_8D = cmd_gosub
!set ITEM_8E = cmd_return
!set ITEM_8F = cmd_rem
.const command_list = List().add(
!set ITEM_90 = cmd_stop
!set ITEM_91 = cmd_on
!set ITEM_92 = cmd_wait
!set ITEM_93 = cmd_load
!set ITEM_94 = cmd_save
!set ITEM_95 = cmd_verify
!set ITEM_96 = cmd_def
!set ITEM_97 = cmd_poke
!set ITEM_98 = cmd_printhash
!set ITEM_99 = cmd_print
!set ITEM_9A = cmd_cont
!set ITEM_9B = cmd_list
!set ITEM_9C = do_clr ; cmd_clr
!set ITEM_9D = cmd_cmd
!set ITEM_9E = cmd_sys
!set ITEM_9F = cmd_open
// $80 - $8F
cmd_end,
cmd_for,
cmd_next,
cmd_data,
cmd_inputhash,
cmd_input,
array_create, // cmd_dim
cmd_read,
assign_variable, // cmd_let
cmd_goto,
cmd_run,
cmd_if,
do_restore, // cmd_restore
cmd_gosub,
cmd_return,
cmd_rem,
// $90-$9F
cmd_stop,
cmd_on,
cmd_wait,
cmd_load,
cmd_save,
cmd_verify,
cmd_def,
cmd_poke,
cmd_printhash,
cmd_print,
cmd_cont,
cmd_list,
do_clr, // cmd_clr
cmd_cmd,
cmd_sys,
cmd_open,
// $A0-$A6
cmd_close,
cmd_get,
cmd_new,
cmd_tab, // XXX this token probably does not belong here
do_SYNTAX_error, // 'TO' is not a standalone command
do_SYNTAX_error, // 'FN' is not a standalone command
cmd_spc // XXX this token probably does not belong here
!set ITEM_A0 = cmd_close
!set ITEM_A1 = cmd_get
!set ITEM_A2 = cmd_new
!set ITEM_A3 = cmd_tab ; XXX this token probably does not belong here
!set ITEM_A4 = do_SYNTAX_error ; 'TO' is not a standalone command
!set ITEM_A5 = do_SYNTAX_error ; 'FN' is not a standalone command
!set ITEM_A6 = cmd_spc ; XXX this token probably does not belong here
// 'THEN' ($A7) and 'STEP' ($A9) are not standalone commands
// 'NOT' ($A8) is an operator, not a command
; 'THEN' ($A7) and 'STEP' ($A9) are not standalone commands
; 'NOT' ($A8) is an operator, not a command
// 'GO' ($CB) is handled separately
)
; 'GO' ($CB) is handled separately
#if !HAS_OPCODES_65C02
!ifndef HAS_OPCODES_65C02 {
command_jumptable_lo:
put_jumptable_lo(command_list)
!byte <(ITEM_80-1), <(ITEM_81-1), <(ITEM_82-1), <(ITEM_83-1), <(ITEM_84-1), <(ITEM_85-1), <(ITEM_86-1), <(ITEM_87-1)
!byte <(ITEM_88-1), <(ITEM_89-1), <(ITEM_8A-1), <(ITEM_8B-1), <(ITEM_8C-1), <(ITEM_8D-1), <(ITEM_8E-1), <(ITEM_8F-1)
!byte <(ITEM_90-1), <(ITEM_91-1), <(ITEM_92-1), <(ITEM_93-1), <(ITEM_94-1), <(ITEM_95-1), <(ITEM_96-1), <(ITEM_97-1)
!byte <(ITEM_98-1), <(ITEM_99-1), <(ITEM_9A-1), <(ITEM_9B-1), <(ITEM_9C-1), <(ITEM_9D-1), <(ITEM_9E-1), <(ITEM_9F-1)
!byte <(ITEM_A0-1), <(ITEM_A1-1), <(ITEM_A2-1), <(ITEM_A3-1), <(ITEM_A4-1), <(ITEM_A5-1), <(ITEM_A6-1)
command_jumptable_hi:
put_jumptable_hi(command_list)
!byte >(ITEM_80-1), >(ITEM_81-1), >(ITEM_82-1), >(ITEM_83-1), >(ITEM_84-1), >(ITEM_85-1), >(ITEM_86-1), >(ITEM_87-1)
!byte >(ITEM_88-1), >(ITEM_89-1), >(ITEM_8A-1), >(ITEM_8B-1), >(ITEM_8C-1), >(ITEM_8D-1), >(ITEM_8E-1), >(ITEM_8F-1)
!byte >(ITEM_90-1), >(ITEM_91-1), >(ITEM_92-1), >(ITEM_93-1), >(ITEM_94-1), >(ITEM_95-1), >(ITEM_96-1), >(ITEM_97-1)
!byte >(ITEM_98-1), >(ITEM_99-1), >(ITEM_9A-1), >(ITEM_9B-1), >(ITEM_9C-1), >(ITEM_9D-1), >(ITEM_9E-1), >(ITEM_9F-1)
!byte >(ITEM_A0-1), >(ITEM_A1-1), >(ITEM_A2-1), >(ITEM_A3-1), >(ITEM_A4-1), >(ITEM_A5-1), >(ITEM_A6-1)
#else // HAS_OPCODES_65C02
__before_command_jumptable:
.if (mod(*, $2) == 1) { brk } // align code so that vector never crosses page boundary
} else { ; HAS_OPCODES_65C02
command_jumptable:
put_jumptable(command_list)
; Note: 65C02 has the page boundary vector bug fixed!
// Make sure routine size is always the same - build system limitation
.if (__before_command_jumptable == command_jumptable) { brk }
#endif
!word ITEM_80, ITEM_81, ITEM_82, ITEM_83, ITEM_84, ITEM_85, ITEM_86, ITEM_87
!word ITEM_88, ITEM_89, ITEM_8A, ITEM_8B, ITEM_8C, ITEM_8D, ITEM_8E, ITEM_8F
!word ITEM_90, ITEM_91, ITEM_92, ITEM_93, ITEM_94, ITEM_95, ITEM_96, ITEM_97
!word ITEM_98, ITEM_99, ITEM_9A, ITEM_9B, ITEM_9C, ITEM_9D, ITEM_9E, ITEM_9F
!word ITEM_A0, ITEM_A1, ITEM_A2, ITEM_A3, ITEM_A4, ITEM_A5, ITEM_A6
}
+29 -29
View File
@@ -1,55 +1,55 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Default handler for all not-yet-implemented commands
//
// Note: NOPs are here just to make debugging easier (no duplicated labels)!
//
;
; Default handler for all not-yet-implemented commands
;
; Note: NOPs are here just to make debugging easier (no duplicated labels)!
;
cmd_for:
nop
+nop
cmd_next:
nop
+nop
cmd_data:
nop
+nop
cmd_inputhash:
nop
+nop
cmd_input:
nop
+nop
cmd_read:
nop
+nop
cmd_gosub:
nop
+nop
cmd_return:
nop
+nop
cmd_on:
nop
+nop
cmd_wait:
nop
+nop
cmd_def:
nop
+nop
cmd_poke:
nop
+nop
cmd_printhash:
nop
+nop
cmd_cont:
nop
+nop
cmd_cmd:
nop
+nop
cmd_open:
nop
+nop
cmd_close:
nop
+nop
cmd_get:
nop
+nop
cmd_tab:
nop
+nop
cmd_spc:
nop
+nop
// Unimplemented tokens
; Unimplemented tokens
jmp do_NOT_IMPLEMENTED_error
+5 -5
View File
@@ -1,8 +1,8 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
// PLACEHOLDER for completeness - jumptable contains direct address
; PLACEHOLDER for completeness - jumptable contains direct address
// CLR command does not stop execution (confirmed on a C64)
; CLR command does not stop execution (confirmed on a C64)
+4 -4
View File
@@ -1,6 +1,6 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
// PLACEHOLDER for completeness - jumptable contains direct address
; PLACEHOLDER for completeness - jumptable contains direct address
+48 -51
View File
@@ -1,60 +1,60 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
cmd_go:
jsr fetch_character_skip_spaces
cmp #$A4 // 'TO' keyword
cmp #$A4 ; 'TO' keyword
beq cmd_goto
#if !ROM_LAYOUT_M65
!ifndef CONFIG_MB_M65 {
// FALLTROUGH
; FALLTROUGH
cmd_go_syntax_error:
jmp do_SYNTAX_error
#else
} else {
cmp #$9E // 'SYS' keyword, for 'GO SYS'
beq_16 cmd_gosys
cmp #$9E ; 'SYS' keyword, for 'GO SYS'
+beq cmd_gosys
dew TXTPTR // unconsume character
dew TXTPTR ; unconsume character
// Fetch desired mode
; Fetch desired mode
jsr fetch_uint8
cmp #64
bne !+
bne @1
// If in native mode - switch to C64 compatibilty
; If in native mode - switch to C64 compatibilty
jsr M65_MODEGET
bcs cmd_go_rts
jsr helper_ask_if_sure
bcs_16 cmd_end
+bcs cmd_end
sec
jsr M65_MODESET // Carry set = switch to C64 mode
jmp_8 cmd_go_switchmode_clr_banner
!:
jsr M65_MODESET ; Carry set = switch to C64 mode
+bra cmd_go_switchmode_clr_banner
@1:
cmp #65
bne_16 do_ILLEGAL_QUANTITY_error
+bne do_ILLEGAL_QUANTITY_error
// If in C64 compatibility mode - switch to native mode
; If in C64 compatibility mode - switch to native mode
jsr M65_MODEGET
bcc cmd_go_rts
jsr helper_ask_if_sure
bcs_16 cmd_end
jsr M65_MODESET // Carry clear = switch to M65 mode
+bcs cmd_end
jsr M65_MODESET ; Carry clear = switch to M65 mode
// FALLTROUGH
; FALLTROUGH
cmd_go_switchmode_clr_banner:
@@ -62,7 +62,7 @@ cmd_go_switchmode_clr_banner:
ldx CURLIN+1
inx
beq_16 INITMSG
+beq INITMSG
lda #147
jmp JCHROUT
@@ -70,90 +70,87 @@ cmd_go_switchmode_clr_banner:
cmd_go_rts:
rts
#endif
}
cmd_run:
// RUN clears all variables
; RUN clears all variables
jsr do_clr
// Initialize OLDTXT pointer, disable Kernal messages
; Initialize OLDTXT pointer, disable Kernal messages
jsr init_oldtxt
lda #$00
jsr JSETMSG
// Check if we have any paramenters
; Check if we have any paramenters
jsr is_end_of_statement
bcs cmd_run_goto_launch
// FALLTROUGH
; FALLTROUGH
cmd_goto:
// GOTO requires line number
// XXX in case of no parameter, go to line 0 - checked with original ROMs
; GOTO requires line number
; XXX in case of no parameter, go to line 0 - checked with original ROMs
jsr fetch_line_number
#if !ROM_LAYOUT_M65
!ifndef CONFIG_MB_M65 {
bcs cmd_go_syntax_error
#else
bcs_16 do_SYNTAX_error
#endif
} else {
+bcs do_SYNTAX_error
}
// Check for direct mode
; Check for direct mode
lda CURLIN+1
bmi cmd_goto_direct
// Not a direct mode - compare desired line number (LINNUM) with the current one (CURLIN)
; Not a direct mode - compare desired line number (LINNUM) with the current one (CURLIN)
lda LINNUM+1
cmp CURLIN+1
bne !+
bne @2
lda LINNUM+0
cmp CURLIN+0
!:
// If desired line number is lower - search line number from start
@2:
; If desired line number is lower - search line number from start
bcc cmd_goto_from_start
// Else - search from the current line
; Else - search from the current line
jsr find_line_from_current
jmp_8 cmd_goto_check
+bra cmd_goto_check
cmd_goto_direct:
// Disable Kernal messages
; Disable Kernal messages
lda #$00
jsr JSETMSG
// FALLTROUGH
; FALLTROUGH
cmd_goto_from_start:
// Direct mode - find the line from the beginning
; Direct mode - find the line from the beginning
jsr find_line_from_start
// FALLTROUGH
; FALLTROUGH
cmd_goto_check:
bcs_16 do_UNDEFD_STATEMENT_error
+bcs do_UNDEFD_STATEMENT_error
// FALLTROUGH
; FALLTROUGH
cmd_run_goto_launch:
// Run it!
; Run it!
pha
pha
+14 -15
View File
@@ -1,38 +1,37 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
cmd_if:
#if ROM_LAYOUT_M65
!ifdef CONFIG_MB_M65 {
jsr helper_if_mega65
bcc cmd_if_true
}
#endif
// Calculate expression
; Calculate expression
jsr FRMEVL
// Check the result - either string size or floating point 0 vs non-0
; Check the result - either string size or floating point 0 vs non-0
lda FAC1_exponent
beq_16 cmd_rem
+beq cmd_rem
// FALLTROUGH
; FALLTROUGH
cmd_if_true:
// Condition fulfilled - look for GOTO or THEN
; Condition fulfilled - look for GOTO or THEN
jsr fetch_character_skip_spaces
cmp #$89 // 'GOTO'
beq_16 cmd_goto
cmp #$89 ; 'GOTO'
+beq cmd_goto
cmp #$A7 // 'THEN'
bne_16 do_SYNTAX_error
cmp #$A7 ; 'THEN'
+bne do_SYNTAX_error
pla
pla
+4 -4
View File
@@ -1,6 +1,6 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
// PLACEHOLDER for completeness - jumptable contains direct address
; PLACEHOLDER for completeness - jumptable contains direct address
+15 -16
View File
@@ -1,44 +1,43 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
// LIST basic text.
// XXX - Does not currently support line number ranges
; LIST basic text.
; XXX - Does not currently support line number ranges
cmd_list:
// Set current line pointer to start of memory
; Set current line pointer to start of memory
jsr init_oldtxt
list_loop:
ldy #1
#if CONFIG_MEMORY_MODEL_60K
!ifdef CONFIG_MEMORY_MODEL_60K {
ldx #<OLDTXT+0
jsr peek_under_roms
cmp #$00
#elif CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
} else ifdef CONFIG_MEMORY_MODEL_46K_OR_50K {
jsr peek_under_roms_via_OLDTXT
cmp #$00
#else // CONFIG_MEMORY_MODEL_38K
} else { ; CONFIG_MEMORY_MODEL_38K
lda (OLDTXT),y
#endif
}
bne list_more_lines
// LIST terminates any running program,
// because it has fiddled with the current line pointer.
// (Confirmed by testing on a C64)
; LIST terminates any running program,
; because it has fiddled with the current line pointer.
; (Confirmed by testing on a C64)
jmp end_of_program
list_more_lines:
lda STKEY
bmi !+
jmp cmd_stop
!:
+bpl cmd_stop
jsr list_single_line
jsr follow_link_to_next_line
jmp list_loop
+32 -32
View File
@@ -1,81 +1,81 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
cmd_verify:
// LOAD and VERIFY are very similar, from BASIC perspective there is almost no difference;
// just different parameter passed to Kernal and different error message in case of failure
; LOAD and VERIFY are very similar, from BASIC perspective there is almost no difference;
; just different parameter passed to Kernal and different error message in case of failure
lda #$01 // mark operation as VERIFY
skip_2_bytes_trash_nvz
lda #$01 ; mark operation as VERIFY
+skip_2_bytes_trash_nvz
cmd_load:
lda #$00 // mark operation as LOAD
lda #$00 ; mark operation as LOAD
jsr helper_load_init_params
jsr helper_load_setnam_any // if no file name found, use "*"
jsr helper_load_setnam_any ; if no file name found, use "*"
// Fetch the file name
; Fetch the file name
jsr helper_load_fetch_filename
bcs !+
bcs @1
// Try to fetch device number and secondary address
; Try to fetch device number and secondary address
jsr helper_load_fetch_devnum
bcs !+
bcs @1
jsr helper_load_fetch_secondary
!:
// FALLTROUGH
@1:
; FALLTROUGH
cmd_load_got_params: // input for tape wedge
cmd_load_got_params: ; input for tape wedge
// Perform loading
; Perform loading
ldy TXTTAB+1
ldx TXTTAB+0
lda VERCKB // LOAD or VERIFY
lda VERCKB ; LOAD or VERIFY
jsr JLOAD
bcs_16 do_kernal_error
+bcs do_kernal_error
cmd_load_no_error:
// Store last loaded address
; Store last loaded address
stx VARTAB+0
sty VARTAB+1
// For VERIFY - this is it
; For VERIFY - this is it
lda VERCKB
bne_16 end_of_statement
+bne end_of_statement
// C64 BASIC apparently does not clear variables after a LOAD in the
// middle of a program. For safety, we do.
; C64 BASIC apparently does not clear variables after a LOAD in the
; middle of a program. For safety, we do.
jsr do_clr
// Now relink the loaded program, as we cannot trust the line
// links supplied. For example, the VICE virtual drive emulation
// always supplies $0101 as the address of the next line
; Now relink the loaded program, as we cannot trust the line
; links supplied. For example, the VICE virtual drive emulation
; always supplies $0101 as the address of the next line
jsr LINKPRG
// Now we either start the program from the beginning,
// or go back to the READY prompt if LOAD was called from direct mode.
; Now we either start the program from the beginning,
; or go back to the READY prompt if LOAD was called from direct mode.
// Reset to start of program
; Reset to start of program
jsr init_oldtxt
// If loading was done when running a program - run it
; If loading was done when running a program - run it
ldx CURLIN+1
inx
beq_16 end_of_program // branch if direct mode
+beq end_of_program ; branch if direct mode
pha
pha
+4 -4
View File
@@ -1,12 +1,12 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
cmd_new:
jsr do_new
// NEW command terminates execution (confirmed on a C64)
; NEW command terminates execution (confirmed on a C64)
jmp end_of_program
+30 -32
View File
@@ -1,91 +1,89 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
cmd_print:
// First check if we have anything to print
; First check if we have anything to print
jsr is_end_of_statement
bcs cmd_print_new_line_done
jsr fetch_character
cmp #$3B // semicolon
cmp #$3B ; semicolon
beq cmd_print_done
// FALLTROUGH
; FALLTROUGH
cmd_print_loop:
#if !HAS_OPCODES_65CE02
!ifndef HAS_OPCODES_65CE02 {
jsr unconsume_character
#else
} else {
dew TXTPTR
#endif
}
// FALLTROUGH
; FALLTROUGH
cmd_print_after_comma:
// Now evaluate the expression and check what to print
; Now evaluate the expression and check what to print
jsr tmpstr_free_all
jsr FRMEVL
lda VALTYP
bpl cmd_print_float
// FALLTROUGH
; FALLTROUGH
cmd_print_string:
// Print a string value
; Print a string value
#if CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
!ifdef CONFIG_MEMORY_MODEL_46K_OR_50K {
jsr helper_print_string
jmp_8 cmd_print_next_arg
+bra cmd_print_next_arg
#else // CONFIG_MEMORY_MODEL_38K || CONFIG_MEMORY_MODEL_60K
} else { ; CONFIG_MEMORY_MODEL_38K || CONFIG_MEMORY_MODEL_60K
ldy #$00
!:
@1:
cpy __FAC1 + 0
beq cmd_print_next_arg
#if CONFIG_MEMORY_MODEL_60K
!ifdef CONFIG_MEMORY_MODEL_60K {
ldx #<(__FAC1 + 1)
jsr peek_under_roms
#else // CONFIG_MEMORY_MODEL_38K
} else { ; CONFIG_MEMORY_MODEL_38K
lda (__FAC1 + 1), y
#endif
}
jsr JCHROUT
iny
bpl !-
#endif
bpl @1
}
cmd_print_float:
// XXX probably we should also check INTFLG here
// XXX provide implementation
; XXX probably we should also check INTFLG here
; XXX provide implementation
jmp do_NOT_IMPLEMENTED_error
// FALLTROUGH
; FALLTROUGH
cmd_print_next_arg:
// Look for the next argument
; Look for the next argument
jsr is_end_of_statement
bcs cmd_print_new_line_done
cmp #$2C // comma XXX on C64 behavior is more complicated, fix it
cmp #$2C ; comma XXX on C64 behavior is more complicated, fix it
beq cmd_print_after_comma
cmp #$3B // semicolon
cmp #$3B ; semicolon
beq cmd_print_done
bne cmd_print_loop
@@ -93,10 +91,10 @@ cmd_print_new_line_done:
jsr print_return
// FALLTROUGH
; FALLTROUGH
cmd_print_done:
// Execute next statement
; Execute next statement
rts
+5 -5
View File
@@ -1,13 +1,13 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
// REM statement just skips to the next line
; REM statement just skips to the next line
cmd_rem:
// XXX do we need these PHA's?
; XXX do we need these PHA's?
pha
pha
+5 -5
View File
@@ -1,8 +1,8 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
// PLACEHOLDER for completeness - jumptable contains direct address
; PLACEHOLDER for completeness - jumptable contains direct address
// RESTORE command does not stop execution (confirmed on a C64)
; RESTORE command does not stop execution (confirmed on a C64)
+16 -16
View File
@@ -1,43 +1,43 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
cmd_save:
// Set default device and secondary address
; Set default device and secondary address
jsr helper_load_init_params_no_VERCKB
// Fetch the file name
; Fetch the file name
jsr helper_load_fetch_filename
bcs_16 do_MISSING_FILENAME_error
+bcs do_MISSING_FILENAME_error
// Try to fetch device number and secondary address
; Try to fetch device number and secondary address
jsr helper_load_fetch_devnum
bcs !+
bcs @1
jsr helper_load_fetch_secondary
!:
// Setup the start address
@1:
; Setup the start address
lda #TXTTAB
// Setup the end address
; Setup the end address
ldx VARTAB+0
ldy VARTAB+1
// FALLTROUGH
; FALLTROUGH
cmd_save_do: // entry point for BSAVE
cmd_save_do: ; entry point for BSAVE
// Perform saving
; Perform saving
jsr JSAVE
bcs_16 do_kernal_error
+bcs do_kernal_error
// Execute next statement
; Execute next statement
rts
+7 -7
View File
@@ -1,21 +1,21 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
cmd_stop:
jsr print_return
ldx #IDX__EV2_1E // "BREAK"
ldx #IDX__EV2_1E ; "BREAK"
jsr print_packed_error
// Are we in direct mode
; Are we in direct mode
lda CURLIN+1
cmp #$FF
beq cmd_end
// Not direct mode
; Not direct mode
ldx #IDX__STR_IN
jsr print_packed_misc_str
@@ -23,7 +23,7 @@ cmd_stop:
ldx CURLIN+0
jsr print_integer
// FALLTROUGH
; FALLTROUGH
cmd_end:
+35 -35
View File
@@ -1,46 +1,45 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
#if ROM_LAYOUT_M65
!ifdef CONFIG_MB_M65 {
cmd_gosys:
// NSYS requires an argument
; GO SYS requires an argument
jsr is_end_of_statement
bcs_16 do_SYNTAX_error
bra cmd_sys_nsys_common
#endif
+bcs do_SYNTAX_error
+bra cmd_sys_common
}
cmd_sys:
// SYS requires an argument
; SYS requires an argument
jsr is_end_of_statement
bcs_16 do_SYNTAX_error
+bcs do_SYNTAX_error
#if ROM_LAYOUT_M65
!ifdef CONFIG_MB_M65 {
// Make sure we are in C64 compatibility mode
; Make sure we are in C64 compatibility mode
jsr M65_MODEGET
bcs cmd_sys_nsys_common
bcs cmd_sys_common
sec
jsr M65_MODESET // set legacy C64 compatibility mode
jsr M65_MODESET ; set legacy C64 compatibility mode
jsr INITMSG_autoswitch
// FALLTROUGH
; FALLTROUGH
cmd_sys_nsys_common:
cmd_sys_common:
#endif
}
//
// XXX Temporary ugly hack to support 'SYS PI*656'
//
;
; XXX Temporary ugly hack to support 'SYS PI*656'
;
ldy #$00
@@ -51,7 +50,7 @@ cmd_sys_hack_loop:
lda (TXTPTR), y
beq cmd_sys_hack_apply
iny
bne cmd_sys_hack_loop // branch always
bne cmd_sys_hack_loop ; branch always
cmd_sys_hack_apply:
@@ -59,27 +58,27 @@ cmd_sys_hack_apply:
sta LINNUM+0
lda #>2060
sta LINNUM+1
bne cmd_sys_setup_call // always jumps
bne cmd_sys_setup_call ; always jumps
cmd_sys_hack_not_needed:
//
// XXX End of hack
//
;
; XXX End of hack
;
lda #IDX__EV2_0B // 'SYNTAX ERROR'
lda #IDX__EV2_0B ; 'SYNTAX ERROR'
jsr fetch_uint16
bcs_16 do_SYNTAX_error
+bcs do_SYNTAX_error
cmd_sys_setup_call:
lda #$4C // JMP opcode
lda #$4C ; JMP opcode
sta USRPOK
lda LINNUM+0
sta USRADD+0
lda LINNUM+1
sta USRADD+1
// Setup the register values
; Setup the register values
lda SPREG
pha
ldy SYREG
@@ -87,12 +86,13 @@ cmd_sys_setup_call:
lda SAREG
plp
// Call the routine.
; Call the routine.
jmp USRPOK
//
// XXX Temporary ugly hack to support 'SYS PI*656'
//
;
; XXX Temporary ugly hack to support 'SYS PI*656'
;
cmd_sys_hack_str:
.byte $FF, $AC, $36, $35, $36, $00
!byte $FF, $AC, $36, $35, $36, $00
+18 -19
View File
@@ -1,41 +1,41 @@
// #LAYOUT# M65 BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# M65 BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
#if CONFIG_MEMORY_MODEL_38K
!ifndef CONFIG_MEMORY_MODEL_46K_OR_50K {
helper_if_mega65:
// Injest all spaces
; Injest all spaces
ldy #$00
!:
@1:
lda (TXTPTR), Y
cmp #$20
bne !+
bne @2
inw TXTPTR
bra !-
!:
bra @1
@2:
// Check for MEGA65 untokenized keyword
; Check for MEGA65 untokenized keyword
ldy #$05
!:
@3:
lda (TXTPTR), Y
cmp str_mega65, Y
bne_16 helper_if_mega65_fail
+bne helper_if_mega65_fail
dey
bpl !-
bpl @3
// Increment TXTPTR by 6
; Increment TXTPTR by 6
clc
lda TXTPTR+0
adc #$06
sta TXTPTR+0
bcc !+
bcc @4
inc TXTPTR+1
!:
// Report successful check
@4:
; Report successful check
clc
rts
@@ -47,6 +47,5 @@ helper_if_mega65_fail:
str_mega65:
.byte $4D, $45, $47, $41, $36, $35
#endif
!byte $4D, $45, $47, $41, $36, $35
}
@@ -1,54 +1,52 @@
// #LAYOUT# M65 BASIC_0 #TAKE-HIGH
// #LAYOUT# * * #IGNORE
;; #LAYOUT# M65 BASIC_0 #TAKE-HIGH
;; #LAYOUT# * * #IGNORE
// This has to go $E000 or above - routine below banks out the main BASIC ROM!
; This has to go $E000 or above - routine below banks out the main BASIC ROM!
#if CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
!ifdef CONFIG_MEMORY_MODEL_46K_OR_50K {
helper_if_mega65:
// Unmap BASIC lower ROM
; Unmap BASIC lower ROM
lda #$26
sta CPU_R6510
// Injest all spaces
; Injest all spaces
ldy #$00
!:
@1:
lda (TXTPTR), Y
cmp #$20
bne !+
bne @2
inw TXTPTR
bra !-
!:
bra @1
@2:
// Check for MEGA65 untokenized keyword
; Check for MEGA65 untokenized keyword
ldy #$05
!:
@3:
lda (TXTPTR), Y
cmp str_mega65, Y
bne_16 remap_BASIC_sec_rts
+bne remap_BASIC_sec_rts
dey
bpl !-
bpl @3
// Increment TXTPTR by 6
; Increment TXTPTR by 6
clc
lda TXTPTR+0
adc #$06
sta TXTPTR+0
bcc !+
bcc @4
inc TXTPTR+1
!:
// Report successful check
@4:
; Report successful check
jmp remap_BASIC_clc_rts
str_mega65:
.byte $4D, $45, $47, $41, $36, $35
#endif
!byte $4D, $45, $47, $41, $36, $35
}
@@ -1,20 +1,20 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Tries to fetch device number - sets Carry if failure
//
;
; Tries to fetch device number - sets Carry if failure
;
helper_load_fetch_devnum:
// Fetch the device number
; Fetch the device number
jsr fetch_coma_uint8
bcs !+
bcs @1
sta FA
!:
@1:
rts
@@ -1,27 +1,27 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Fetches file name, Carry set if not found
//
;
; Fetches file name, Carry set if not found
;
helper_load_fetch_filename:
// Check if end of statement
; Check if end of statement
jsr is_end_of_statement
bcs !+
bcs @1
// Call the expression parser, make sure it returned a string
; Call the expression parser, make sure it returned a string
jsr FRMEVL
lda VALTYP
bpl_16 do_SYNTAX_error
+bpl do_SYNTAX_error
// Set the filename address and pointer
; Set the filename address and pointer
lda __FAC1+0
sta FNLEN
@@ -31,11 +31,11 @@ helper_load_fetch_filename:
lda __FAC1+2
sta FNADDR+1
// Mark success
; Mark success
clc
// FALLTROUGH
; FALLTROUGH
!:
@1:
rts
@@ -1,20 +1,20 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Tries to fetch secondary address - sets Carry if failure
//
;
; Tries to fetch secondary address - sets Carry if failure
;
helper_load_fetch_secondary:
// Fetch the device number
; Fetch the device number
jsr fetch_coma_uint8
bcs !+
bcs @1
sta SA
!:
@1:
rts
@@ -1,27 +1,27 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Sets initial parameters for LOAD and simiar commands
//
// Input:
// - VERCKB content in .A
//
;
; Sets initial parameters for LOAD and simiar commands
;
; Input:
; - VERCKB content in .A
;
helper_load_init_params:
// Set LOAD/VERIFY flag
; Set LOAD/VERIFY flag
sta VERCKB
// FALLTROUGH
; FALLTROUGH
helper_load_init_params_no_VERCKB:
// Set default device, set secondary address to 0
; Set default device, set secondary address to 0
jsr SELDEV
ldy #$00 // secondary address
ldy #$00 ; secondary address
jmp JSETFLS
@@ -1,15 +1,15 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Set '*' as file name
//
;
; Set '*' as file name
;
helper_load_setnam_any:
lda #$01 // name length
lda #$01 ; name length
ldx #<filename_any
ldy #>filename_any
jmp JSETNAM
@@ -1,27 +1,26 @@
// #LAYOUT# STD * #TAKE-HIGH
// #LAYOUT# * BASIC_0 #TAKE-HIGH
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE-HIGH
;; #LAYOUT# * BASIC_0 #TAKE-HIGH
;; #LAYOUT# * * #IGNORE
// This has to go $E000 or above - routine below banks out the main BASIC ROM!
; This has to go $E000 or above - routine below banks out the main BASIC ROM!
#if CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
!ifdef CONFIG_MEMORY_MODEL_46K_OR_50K {
helper_print_string:
// Unmap BASIC lower ROM
; Unmap BASIC lower ROM
lda #$26
sta CPU_R6510
// Print the string
; Print the string
ldy #$00
!:
@1:
cpy __FAC1 + 0
beq_16 remap_BASIC // branch if end of the string
+beq remap_BASIC ; branch if end of the string
lda (__FAC1 + 1), y
jsr JCHROUT
iny
bpl !-
#endif
bpl @1
}
+38 -40
View File
@@ -1,55 +1,53 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
//
// Jumptable for BASIC commands with tokens prefixed by $01
//
;
; Jumptable for BASIC commands with tokens prefixed by $01
;
!ifdef CONFIG_MB_M65 {
!set ITEM_00 = M65_SLOW
!set ITEM_01 = M65_FAST
} else {
!set ITEM_00 = cmd_slow
!set ITEM_01 = cmd_fast
}
!set ITEM_02 = cmd_old
; NOTE! These commands are temporarily placed here, they should be a part of list 02!
!set ITEM_03 = cmd_merge
!set ITEM_04 = cmd_bload
!set ITEM_05 = cmd_bsave
!set ITEM_06 = cmd_bverify
!set ITEM_07 = cmd_clear
!set ITEM_08 = varstr_garbage_collect ; cmd_dispose
.const command_01_list = List().add(
#if CONFIG_MB_MEGA_65
M65_SLOW,
M65_FAST,
#else
cmd_slow,
cmd_fast,
#endif
cmd_old,
// NOTE! These commands are temporarily placed here, they should be a part of list 02!
cmd_merge,
cmd_bload,
cmd_bsave,
cmd_bverify,
cmd_clear,
varstr_garbage_collect // cmd_dispose
)
#if !HAS_OPCODES_65C02
!ifndef HAS_OPCODES_65C02 {
command_01_jumptable_lo:
put_jumptable_lo(command_01_list)
!byte <(ITEM_00-1), <(ITEM_01-1), <(ITEM_02-1), <(ITEM_03-1), <(ITEM_04-1), <(ITEM_05-1), <(ITEM_06-1), <(ITEM_07-1), <(ITEM_08-1)
command_01_jumptable_hi:
put_jumptable_hi(command_01_list)
!byte >(ITEM_00-1), >(ITEM_01-1), >(ITEM_02-1), >(ITEM_03-1), >(ITEM_04-1), >(ITEM_05-1), >(ITEM_06-1), >(ITEM_07-1), >(ITEM_08-1)
#else // HAS_OPCODES_65C02
} else { ; HAS_OPCODES_65C02
command_01_jumptable:
// Note: 65C02 has the page boundary vector bug fixed!
put_jumptable(command_01_list)
; Note: 65C02 has the page boundary vector bug fixed!
#endif
!word ITEM_00, ITEM_01, ITEM_02, ITEM_03, ITEM_04, ITEM_05, ITEM_06, ITEM_07, ITEM_08
}
+23 -20
View File
@@ -1,15 +1,15 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
#if CONFIG_MB_MEGA_65
!ifdef CONFIG_MB_M65 {
// For MEGA65 Kernal routines are called directly
; For MEGA65 Kernal routines are called directly
#elif CONFIG_MB_ULTIMATE_64
} else ifdef CONFIG_MB_U64 {
// Command implementation for Ultimate 64 - SuperCPU compatible way should be enough
; Command implementation for Ultimate 64 - SuperCPU compatible way should be enough
cmd_slow:
@@ -21,41 +21,44 @@ cmd_fast:
sta SCPU_SPEED_TURBO
rts
#elif CONFIG_PLATFORM_COMMODORE_64
} else ifdef CONFIG_PLATFORM_COMMODORE_64 {
// Command implementation for generic C64 platform
; Command implementation for generic C64 platform
cmd_slow:
// Try to disable turbo in SuperCPU compatible way
; Try to disable turbo in SuperCPU compatible way
sta SCPU_SPEED_NORMAL
// Try to disable turbo mode in C128 compatible way
; Try to disable turbo mode in C128 compatible way
lda #$00
beq !+ // branch always
beq cmdfastslow_end ; branch always
cmd_fast:
// Try to enable turbo in SuperCPU compatible way
; Try to enable turbo in SuperCPU compatible way
sta SCPU_SPEED_TURBO
// Try to enable turbo mode in C128 compatible way
; Try to enable turbo mode in C128 compatible way
lda #$01
!:
; FALLTROUGH
cmdfastslow_end:
sta VIC_CLKRATE
rts
#else
} else {
cmd_slow:
nop // just to prevent double label
nop ; just to prevent double label
// FALLTROUGH
; FALLTROUGH
cmd_fast:
jmp do_NOT_IMPLEMENTED_error
#endif
}
+7 -7
View File
@@ -1,17 +1,17 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
cmd_old:
// First make sure we are in direct mode
; First make sure we are in direct mode
ldx CURLIN+1
inx
bne_16 do_DIRECT_MODE_ONLY_error
+bne do_DIRECT_MODE_ONLY_error
// Now try to restore program linkage and VARTAB
; Now try to restore program linkage and VARTAB
ldy #$01
tya
@@ -19,6 +19,6 @@ cmd_old:
jsr update_LINKPRG_VARTAB_do_clr
// Quit
; Quit
jmp end_of_program
Loaded 100 of 685 files, more files were not shown because too many files have changed in this diff. Show more