mirror of
https://github.com/dschmenk/PLASMA.git
synced 2026-03-12 01:41:40 +00:00
Compare commits
125 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c11ce4e96 | ||
|
|
4854baec5a | ||
|
|
82a4a252a3 | ||
|
|
0e0ba23d7a | ||
|
|
b865004d7b | ||
|
|
9932639b1b | ||
|
|
655e410a1d | ||
|
|
ee14a3bdf4 | ||
|
|
60c1b4f6e9 | ||
|
|
094ddd31e8 | ||
|
|
6fc53c4c21 | ||
|
|
0d585d7110 | ||
|
|
bc68776f93 | ||
|
|
9e7a774972 | ||
|
|
17d1e1eb89 | ||
|
|
976581b1c1 | ||
|
|
3d1c3e9407 | ||
|
|
4ca1ba9c04 | ||
|
|
af57dfdeeb | ||
|
|
267fdebdef | ||
|
|
66c51a2ab5 | ||
|
|
64a722f1e2 | ||
|
|
75c2847cf1 | ||
|
|
f5efc5641e | ||
|
|
c39fd20746 | ||
|
|
79287f2c51 | ||
|
|
cd0126477b | ||
|
|
1c35a7ae0a | ||
|
|
ffce999045 | ||
|
|
9e62379b46 | ||
|
|
9125b7bfd4 | ||
|
|
cdb734d1ba | ||
|
|
f78f2827dc | ||
|
|
ef268697b5 | ||
|
|
6665199e55 | ||
|
|
f4ce23a3cf | ||
|
|
177c621364 | ||
|
|
54fba4e12f | ||
|
|
0d41deb7ec | ||
|
|
7a3debfd0c | ||
|
|
1713c71505 | ||
|
|
abd9d35cae | ||
|
|
1d3de982d6 | ||
|
|
9cb7d29bfa | ||
|
|
374d2465b6 | ||
|
|
156bca2413 | ||
|
|
f5b2db78a3 | ||
|
|
ca5f81530c | ||
|
|
76b3905a60 | ||
|
|
4613584099 | ||
|
|
0d76b322f1 | ||
|
|
f0d89f6b5c | ||
|
|
f8a6589f34 | ||
|
|
ec629745f9 | ||
|
|
a0cc6662d5 | ||
|
|
bba4570a93 | ||
|
|
fe86c7e3f1 | ||
|
|
602fd75509 | ||
|
|
62c55eb4ea | ||
|
|
970d692592 | ||
|
|
c4551c2c59 | ||
|
|
bb41023498 | ||
|
|
c3111a63be | ||
|
|
726609a573 | ||
|
|
d48ccdf979 | ||
|
|
a64afe5486 | ||
|
|
691c3851f0 | ||
|
|
28f06edf9c | ||
|
|
6b20c4da10 | ||
|
|
2ff4c9d842 | ||
|
|
c7234e2d04 | ||
|
|
bf9c61892c | ||
|
|
7d66c27ecf | ||
|
|
0fdc319481 | ||
|
|
c16fc8a1d1 | ||
|
|
954c1b185c | ||
|
|
70a6458fc5 | ||
|
|
2799083bcf | ||
|
|
54d36ce12e | ||
|
|
f0dc042dad | ||
|
|
713a6c6cbe | ||
|
|
3adb41921c | ||
|
|
ca1b40a68b | ||
|
|
5b5e8aa0de | ||
|
|
29c5f9c53f | ||
|
|
2141520023 | ||
|
|
c652200248 | ||
|
|
6609aadaaf | ||
|
|
0e87fcf4f0 | ||
|
|
21f926a763 | ||
|
|
337c6557e2 | ||
|
|
45f32cc5db | ||
|
|
20a6655c0f | ||
|
|
e7e475faa7 | ||
|
|
fbb50a9127 | ||
|
|
6f90d25eeb | ||
|
|
ef4edf74f1 | ||
|
|
954af7716b | ||
|
|
308774a2b0 | ||
|
|
2ec923cf3b | ||
|
|
24c1a09f91 | ||
|
|
8bdc1d6c56 | ||
|
|
46000e7af1 | ||
|
|
447cde1692 | ||
|
|
c74af19505 | ||
|
|
5581bfb052 | ||
|
|
1a208ef30a | ||
|
|
e0d688a45a | ||
|
|
642b4cbbb4 | ||
|
|
233e0299dc | ||
|
|
ff023f65d2 | ||
|
|
6045b260db | ||
|
|
b5f02ea7c5 | ||
|
|
c9477238fa | ||
|
|
59a35068bf | ||
|
|
f0b18db6c2 | ||
|
|
c05c0789da | ||
|
|
348bc4eaf5 | ||
|
|
05f5729adc | ||
|
|
06f12e5607 | ||
|
|
1aee6c4523 | ||
|
|
c8015091a5 | ||
|
|
c83ed2c494 | ||
|
|
5c8fbfdcf4 | ||
|
|
112d5f4639 |
21
LICENSE.md
Normal file
21
LICENSE.md
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2010-2022 David Schmenk
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
674
LICENSE.txt
674
LICENSE.txt
@@ -1,674 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
@@ -1,7 +1,9 @@
|
||||
# 11/10/2020 PLASMA 2.0 Developer Preview 3 Available!
|
||||
[Download and read the Release Notes](https://github.com/dschmenk/PLASMA/releases)
|
||||
# 2/28/2023 PLASMA 2.0 Beta Available!
|
||||
Hopefully close to a 2.0 Release.
|
||||
|
||||
[Change List](https://github.com/dschmenk/PLASMA/blob/master/doc/Version%202.0.md#changes-in-plasma-for-20-dp-3)
|
||||
[Download and read the Release Notes](https://github.com/dschmenk/PLASMA/blob/master/doc/Version%202.0.md)
|
||||
|
||||
[Change List](https://github.com/dschmenk/PLASMA/blob/master/doc/Version%202.0.md#changes-in-plasma-for-20-beta)
|
||||
|
||||
# 4/29/2018 PLASMA 1.2 Available!
|
||||
[Download and read the Release Notes](https://github.com/dschmenk/PLASMA/blob/master/doc/Version%201.2.md)
|
||||
|
||||
BIN
doc/ROGUE.LZ4.BIN
Normal file
BIN
doc/ROGUE.LZ4.BIN
Normal file
Binary file not shown.
94
doc/ROGUE.TXT
Normal file
94
doc/ROGUE.TXT
Normal file
@@ -0,0 +1,94 @@
|
||||
PLASMA goes ROGUE
|
||||
=================
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
This version of ROGUE is somewhat different than others. It is very simple in most ways, but I have developed a (I think) unique visibility algorithm that runs extremely fast. Fast enough to run interpreted by the PLASMA VM on a 1 MHz 6502, and space efficient enough to allow for large (in the future) dungeons. The unique feature of this ROGUE is that lighting becomes critical and strategic. You are in dark catacombs, after all. You enter with a lit lamp, throwing off a circle of light. There are also torches throughout the catacombs that light up a small surrounding circle of light. Other items in the catacombs are mana (health+energy increase), a key, a raft, and gold. You will also encounter a number of enemies that will track you down to try and kill you. You will also encounter doors, locked doors, windows, water, and crevasses.
|
||||
|
||||
Strategy
|
||||
--------
|
||||
|
||||
As you travel through the catacombs, you must watch your health, energy, and lamp oil levels. Once health reaches zero, you are dead. As energy reaches zero, your vision will narrow and you will no longer be able to run. When the lamp oil runs out, you will be cast into darkness. If you see any torches in your field of vision, you can navigate to them. Taking the torch will extinguish the torch and replenish some of your lamp oil. Note that as you travel through the catacombs, your map of what you have seen will automatically fill in. But, if you are in the dark, you cannot read your map. You must turn on your lamp or get next to a torch before you can read the map again. If you are in the dark and can’t see any torches in your field of vision, you are in complete darkness. It is easy to lose your bearings. As such, the absolute direction movements no longer work (NSEW) - you will end up in a random direction if you try. However, the relative turns, left/right and forward/backward controls continue to work (that you can do in the dark).
|
||||
|
||||
Being in the dark can be advantageous, however. All the enemies in the catacombs can see you if you are in light, just as you can see them. If you are in darkness, they can't see you, and you can move around without being tracked. Don't run into them! Also, don't fall off a crevasse. You will hear certain noises giving you feedback on what is going on. A simple beep when you run into walls. A groan when an enemy moves towards you. A bleep when you pick an item up. Other noises when you fall over an edge or win a battle. These can be used strategically when moving in the dark.
|
||||
|
||||
Health will slowly improve as you move around. However, energy is depleted as you move. Mana will increase both health and energy. If health is already at 100, it won’t go any higher. Same for energy, but it is important to keep both high. When energy goes low, you can no longer move quickly and your field-of-vision narrows. When health goes to zero, you are dead.
|
||||
|
||||
Tile Description
|
||||
----------------
|
||||
|
||||
As ROGUE uses the text screen for display, a little creativity is required to interpret the map. These are the characters you will see and what the represent. Once you get the hang of it, it will be just like looking at the unencoded Matrix.
|
||||
|
||||
Screen Character Represents
|
||||
# Wall
|
||||
. Floor
|
||||
: Window (barred opening)
|
||||
+ Door
|
||||
% Locked Door (need key to open)
|
||||
' ' space Crevasse (pit - don't fall in)
|
||||
= Exit
|
||||
- Entrance
|
||||
* Torch
|
||||
& Mana
|
||||
, Key (yep, hard to spot)
|
||||
@ Raft (need to cross water)
|
||||
<<< Water
|
||||
>>> Water (you will drown without raft)
|
||||
$ Gold
|
||||
|
||||
Flashing Entity
|
||||
T Thief
|
||||
O Ogre
|
||||
Z Zombie
|
||||
R Rogue
|
||||
|
||||
Player Facing Direction
|
||||
^ North
|
||||
\ NE
|
||||
> East
|
||||
/ SE
|
||||
v South
|
||||
\ SW
|
||||
< West
|
||||
/ NW
|
||||
Tiles in light are inverse. Entities are displayed only when lit and in field of view. The map is only visible when lit, i.e lamp is on or standing next to a torch.
|
||||
|
||||
Interaction
|
||||
-----------
|
||||
|
||||
Keyboard commands Action
|
||||
Q Run (Quick)
|
||||
W up-arrow Forward
|
||||
S down-arrow Backward
|
||||
A left-arrow Turn left
|
||||
D right-arrow Turn right
|
||||
I Move N
|
||||
J Move W
|
||||
K Move E
|
||||
M Move S
|
||||
< , Turn lamp down
|
||||
> . Turn lamp up/on
|
||||
O Turn lamp off
|
||||
Space-bar Open door
|
||||
Return Pick up item
|
||||
X Exit (die)
|
||||
Whenever you and an enemy end up on the same tile, battle commences. As you win fights, your skill increases, improving your attack effectiveness. As you advance through the catacombs, the enemies become more powerful. You will need to replenish health and energy with mana. Don't forget, the alternative to fighting is stealth in the darkness. During battle, you have the option to run. If you have low energy, you won't get very far. Also, when fighting, you get turned around so you can't depend on the direction you were facing before fighting. Running ('Q'uick) will get you away from enemies but will use much more energy.
|
||||
|
||||
If you should die, restart the game by typing:
|
||||
|
||||
+rogue
|
||||
|
||||
Map Levels
|
||||
----------
|
||||
Level maps are up to 62x62 in size (plus a wall boundary for an effective 64x64 map size). They can be smaller than this. The game will end when it tries to load an non-existent level. Levels start at file name “LEVEL0“ and can go all the way to “LEVEL9“, but must be sequential.
|
||||
|
||||
There are two levels included on the disk, and an empty level for you to use as a template. You can edit the map levels, and add your own. They are simple ASCII text files. The included editor can edit the maps right on the disk. type:
|
||||
|
||||
+ed level.empty
|
||||
|
||||
after exiting from ROGUE. Make your changes and save it as LEVEL0" to "LEVEL9". The next free level is currently "LEVEL2". You may also edit an existing level:
|
||||
|
||||
+ed level0
|
||||
|
||||
for instance.
|
||||
@@ -81,13 +81,13 @@ If you should die, restart the game by typing:
|
||||
|
||||
Level maps are up to 62x62 in size (plus a wall boundary for an effective 64x64 map size). They can be smaller than this. The game will end when it tries to load an non-existent level. Levels start at file name “LEVEL0“ and can go all the way to “LEVEL9“, but must be sequential.
|
||||
|
||||
There are two levels included on the disk, and an empty level for you to use as a template. You can edit the map levels, and add your own. They are simple ASCII text files. The included sandbox editor can edit the maps right on the disk. type:
|
||||
There are two levels included on the disk, and an empty level for you to use as a template. You can edit the map levels, and add your own. They are simple ASCII text files. The included editor can edit the maps right on the disk. type:
|
||||
```
|
||||
-sandbox level.empty
|
||||
+ed level.empty
|
||||
```
|
||||
after exiting from ROGUE. Make your changes and save it as LEVEL0" to "LEVEL9". The next free level is currently "LEVEL2". You may also edit an existing level:
|
||||
```
|
||||
-sandbox level0
|
||||
+ed level0
|
||||
```
|
||||
for instance.
|
||||
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
# PLASMA Version 2.0 Developer Preview 3
|
||||
# PLASMA Version 2.0
|
||||
|
||||
Welcome to PLASMA: the Grand Unifying Platform for the Apple 1, ][, and ///.
|
||||
|
||||
Download the four disk images (three if you don't plan to boot an Apple ///):
|
||||
Download the five disk images:
|
||||
|
||||
[PLASMA 2.0 DP 800K Full System](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2.2mg?raw=true)
|
||||
[PLASMA 2.0 800K Full System](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2.2mg?raw=true)
|
||||
|
||||
[PLASMA 2.0 DP System and ProDOS Boot](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-SYS.PO?raw=true)
|
||||
[PLASMA 2.0 System and ProDOS Boot](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-SYS.PO?raw=true)
|
||||
|
||||
[PLASMA 2.0 DP Build Tools](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-BLD.PO?raw=true)
|
||||
[PLASMA 2.0 Build Tools](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-BLD.PO?raw=true)
|
||||
|
||||
[PLASMA 2.0 DP Demos](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-DEM.PO?raw=true)
|
||||
[PLASMA 2.0 Demos](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-DEM.PO?raw=true)
|
||||
|
||||
[PLASMA 2.0 TCP/IP modules](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-INET.PO?raw=true)
|
||||
[PLASMA 2.0 TCP/IP network modules](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-INET.PO?raw=true)
|
||||
|
||||
[PLASMA 2.0 DP Apple /// SOS Boot and SANE floating point modules](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-FPSOS.PO?raw=true)
|
||||
[PLASMA 2.0 Apple /// SOS Mame Boot and SANE floating point modules](https://github.com/dschmenk/PLASMA/blob/master/images/apple/PLASMA2-FPSOS.PO?raw=true)
|
||||
|
||||
[PLASMA 2.0 Alpha1 Apple /// Mame hard disk image](https://github.com/dschmenk/PLASMA/blob/master/images/apple/apple3.hd?raw=true)
|
||||
|
||||
PLASMA can be run from floppies, System in Drive 1, and Build or Demos in Drive 2. Mass storage is the recommended installation that looks like (replacing HARDISK with your volume name of choice):
|
||||
|
||||
@@ -44,7 +46,7 @@ PLASMA can utilize the 16 bit features of the 65802 and 65816 processors to impr
|
||||
|
||||
## Apple ///
|
||||
|
||||
The Apple /// gets the environment it always wanted: The ability to navigate the filesystem with a command line interface. The Apple /// always boots from the floppy drive, even if a hard disk is installed. The PLASMA.SOS floppy should be updated with the SOS.DRIVER configured for your machine. Once booted, type `S /HARDISK/PLASMA` (or your install directory of choice) to change to, and set, the system directory. This can be automated by creating an `AUTORUN` file on the boot floppy with the above command in it.
|
||||
The Apple /// gets the environment it always wanted: The ability to navigate the filesystem with a command line interface. The Apple /// always boots from the floppy drive, even if a hard disk is installed. `PLASMA2-FPSOS.PO` is an Apple 3 bootable disk containing the SOS.DRIVER configured for the [Apple 3 Ready-To-Run Mame environment](https://github.com/datajerk/apple3rtr). `apple3.hd` is the pre-installed PLASMA hard disk image set up for [Apple 3 Ready-to-Run](https://github.com/datajerk/apple3rtr). For a physical Apple 3, the PLASMA2-FPSOS.PO floppy should be updated with the SOS.DRIVER configured for the machine. Once booted, type `S /HARDISK/PLASMA` (or your install directory of choice) to change to, and set, the system directory. This can be automated by creating an `AUTORUN` file on the boot floppy with the above command in it.
|
||||
|
||||
## PLASMA Command Line Shell
|
||||
|
||||
@@ -73,7 +75,7 @@ The shell is very brief with error messages. It is meant solely as a way to run
|
||||
|
||||
PLASMA comes with many library modules used by the tools, demos and sample code. The PLASMA system volume must remain in place for the duration of PLASMAs run otherwise it won't be able to find CMD or the system libraries. Probably the most useful included module is the editor. It is used for editing PLASMA source file, assembly source files, or any text file. Execute it with:
|
||||
```
|
||||
+ED [TEXT FILE]
|
||||
+ED [TEXT FILE] [GOTO LINE NUMBER]
|
||||
```
|
||||
The file manipulation utilities to copy, delete, rename, create directories, and change file type and aux type remove the need for external programs to do the same. PLASMA can now be installed with the tools included on the PLASMA2-SYS boot floppy. They are:
|
||||
```
|
||||
@@ -82,8 +84,9 @@ The file manipulation utilities to copy, delete, rename, create directories, and
|
||||
+REN <FILENAME> <NEWNAME>
|
||||
+NEWDIR <NEWDIRECTORY>
|
||||
+TYPE <FILENAME> [NEWTYPE [NEWAUX]]
|
||||
+CAT [-R] <FILEPATH]
|
||||
```
|
||||
The ```-R``` option will operate on the directories recursively. Wildcard filenames can be specified with ```'*'``` matching zero or more characters, and ```'?'``` matching any character.
|
||||
The ```-R``` option will operate on the directories recursively. Wildcard filenames can be specified with ```'*'``` matching zero or more characters, and ```'?'``` matching any character. When copying files to the current directory, ```=``` can be used as a shortcut.
|
||||
|
||||
## Compiler Modules
|
||||
|
||||
@@ -115,6 +118,50 @@ There is a [YouTube playlist](https://www.youtube.com/playlist?list=PLlPKgUMQbJ7
|
||||
|
||||
- The documentation is sparse and incomplete. Yep, could use your help...
|
||||
|
||||
# Changes in PLASMA for 2.0 Release
|
||||
|
||||
1. Fix command line buffer overflow
|
||||
|
||||
2. Use VBlank to blink editor cursor so not CPU speed dependent
|
||||
|
||||
3. Add ```=``` for ```+COPY``` current destination
|
||||
|
||||
4. Add //c support for DGRLIB and GRLIB wait-for-VBlank routines
|
||||
|
||||
# Changes in PLASMA for 2.0 Beta
|
||||
|
||||
1. Compilers allows for including self imported defines
|
||||
|
||||
2. Compilers fixed for local constants
|
||||
|
||||
3. Floating point string formatting fixes and improvements
|
||||
|
||||
4. Fiber library exports number of active fibers
|
||||
|
||||
# Changes in PLASMA for 2.0 Alpha 2
|
||||
|
||||
1. Self hosted compiler fixes for invalid array size constants
|
||||
|
||||
2. Ensure IDs in self hosted compiler are 31 characters significant
|
||||
|
||||
3. Fix bug COPY file parsing and move common routine into MATCHFILES
|
||||
|
||||
# Changes in PLASMA for 2.0 Alpha 1
|
||||
|
||||
1. Improved entry/exit for 128K Apple IIe //c
|
||||
|
||||
2. Improved entry for Apple ///
|
||||
|
||||
3. Improved entry and function calls for 16 bit VM
|
||||
|
||||
# Changes in PLASMA for 2.0 DP 4
|
||||
|
||||
1. Improved editor auto-indenting
|
||||
|
||||
2. Compiler fix for terneray operator precedence
|
||||
|
||||
3. Machine check for HGR library
|
||||
|
||||
# Changes in PLASMA for 2.0 DP 3
|
||||
|
||||
1. File manipulation utilities fixed for Apple /// SOS vs ProDOS differences
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
images/apple/apple3.hd
Normal file
BIN
images/apple/apple3.hd
Normal file
Binary file not shown.
@@ -6,6 +6,7 @@ import dgrlib
|
||||
predef dgrTile(x, y, src)#0
|
||||
predef dgrTileStr(x, y, tilestr, strlen, tilebuff)#0
|
||||
predef dgrFill(x, y, tile)#0
|
||||
predef dgrVLB#0
|
||||
predef dgrClear(clr)#0
|
||||
predef dgrMode(mode)#1
|
||||
predef dgrShow(page)#1
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import fiber
|
||||
predef fbrInit(numPool), fbrStop(fid)#0, fbrExit#0, fbrStart(defaddr, param)
|
||||
predef fbrYield#0, fbrHalt#0, fbrResume(fid)#0
|
||||
byte fbrCount
|
||||
end
|
||||
|
||||
@@ -6,6 +6,7 @@ const FPSTR_FIXED = 1 // Fixed count of fractional digits
|
||||
const FPSTR_FLOAT = 0 // Floating count of fractional digits
|
||||
const FPSTR_STRIP = 2 // Strip trailing fractional zeros
|
||||
const FPSTR_EXP = 4 // Force exponential format
|
||||
const FPSTR_FLEX = 8 // Flexible switch to EXP format if over/underflow
|
||||
//
|
||||
// Parse string into decrecord, return SANE conversion output
|
||||
//
|
||||
|
||||
@@ -6,6 +6,7 @@ import grlib
|
||||
predef grTile(x, y, src)#0
|
||||
predef grTileStr(x, y, tilestr, strlen, tilebuff)#0
|
||||
predef grFill(x, y, tile)#0
|
||||
predef dgrVLB#0
|
||||
predef grClear(clr)#0
|
||||
predef grMode(mode)#1
|
||||
predef grShow(page)#1
|
||||
|
||||
@@ -2,4 +2,5 @@ import matchfiles
|
||||
predef matchName(src, exp)#1
|
||||
predef matchList(pathptr, exp)#2
|
||||
predef isWildName(exp)#1
|
||||
predef fileFromPath(filestr, pathstr)#0
|
||||
end
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
include "inc/cmdsys.plh"
|
||||
include "inc/conio.plh"
|
||||
sysflags nojitc // Keep tone() from compiling and sounding different
|
||||
//
|
||||
// Handy constants.
|
||||
@@ -34,24 +35,6 @@ const page2 = 1
|
||||
//
|
||||
const ENV_REG = $FFDF
|
||||
//
|
||||
// External interface.
|
||||
//
|
||||
struc t_conio
|
||||
word keypressed
|
||||
word getkey
|
||||
word echo
|
||||
word home
|
||||
word gotoxy
|
||||
word viewport
|
||||
word texttype
|
||||
word textmode
|
||||
word grmode
|
||||
word grcolor
|
||||
word grplot
|
||||
word tone
|
||||
word rnd
|
||||
end
|
||||
//
|
||||
// Predefined functions.
|
||||
//
|
||||
predef a2keypressed,a2home,a12echo(state),a2gotoxy(x,y),a2viewport(left, top, width, height),a2texttype(type)
|
||||
|
||||
@@ -492,39 +492,23 @@ asm _dgrFillTile
|
||||
RTS
|
||||
end
|
||||
//
|
||||
// Wait for VLB - Only IIe/IIGS.
|
||||
// Wait for VLB
|
||||
//
|
||||
asm vlbWait#0
|
||||
export asm dgrVLB#0
|
||||
PHP
|
||||
SEI
|
||||
STA $C079 ; Enable IOU access and reset VBL int on //c
|
||||
STA $C05B ; Enable VBL int
|
||||
- LDA $C019
|
||||
STA $C079 ; Reset VBL int on //c
|
||||
BMI -
|
||||
- LDA $C019
|
||||
BPL -
|
||||
STA $C05A ; Disable VBL int on //c
|
||||
STA $C078 ; Disable IOU access on //c
|
||||
PLP
|
||||
RTS
|
||||
end
|
||||
// Wait for VBL on IIc is entirely different from others.
|
||||
// Setup, one-time *only* if polling will be used exclusively.
|
||||
// Otherwise requires restoring the mode on exit,
|
||||
// and setting up per-use instead.
|
||||
// [php]
|
||||
// sei ; otherwise interrupt is still raised
|
||||
// sta $C07F ; enable access to VBL register
|
||||
// sta $C05B ; enable VBL polling
|
||||
// sta $C07E ; disable access to VBL register
|
||||
//
|
||||
// wait for VBL:
|
||||
// - bit $C019
|
||||
// bpl -
|
||||
// lda $C070 ; $c019 bit 7 is sticky, reset it
|
||||
//
|
||||
// To allow other methods of VBL, restore access:
|
||||
// - bit $C019
|
||||
// bpl -
|
||||
// lda $C070 ; $c019 bit 7 is sticky, reset it
|
||||
// sta $C07F ; enable access to VBL register
|
||||
// sta $C05A ; disable VBL polling
|
||||
// sta $C07E ; disable access to VBL register
|
||||
// [plp]
|
||||
|
||||
//
|
||||
// Clear the buffer
|
||||
//
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
include "inc/cmdsys.plh"
|
||||
include "inc/fileio.plh"
|
||||
//
|
||||
// CFFA1 addresses.
|
||||
//
|
||||
@@ -22,26 +23,6 @@ const sysbuf = $0800
|
||||
//
|
||||
// External interface
|
||||
//
|
||||
struc t_fileio
|
||||
word getpfx
|
||||
word setpfx
|
||||
word getfileinfo
|
||||
word setfileinfo
|
||||
word geteof
|
||||
word seteof
|
||||
word iobufalloc
|
||||
word open
|
||||
word close
|
||||
word read
|
||||
word write
|
||||
word create
|
||||
word destroy
|
||||
word rename
|
||||
word newline
|
||||
word online
|
||||
word readblock
|
||||
word writeblock
|
||||
end
|
||||
predef a2getpfx(path), a23setpfx(path), a2getfileinfo(path, fileinfo), a2setfileinfo(path, fileinfo), a23geteof(refnum)#2, a23seteof(refnum, eofl, eofh), a2iobufs(iobufs), a2open(path), a2close(refnum)
|
||||
predef a23read(refnum, buf, len), a2write(refnum, buf, len), a2create(path, type, aux), a23destroy(path), a23rename(path, newpath)
|
||||
predef a2newline(refnum, emask, nlchar), a2online(unit, buf), a2readblock(unit, buf, block), a2writeblock(unit, buf, block)
|
||||
@@ -209,9 +190,9 @@ def a13iobufs(iobufs)
|
||||
end
|
||||
def a2open(path)
|
||||
byte i, params[6]
|
||||
|
||||
|
||||
for i = 0 to MAX_IOBUFS-1
|
||||
if iobuf_addr[i] and not iobuf_ref[i]
|
||||
if iobuf_addr[i] and not iobuf_ref[i]
|
||||
params.0 = 3
|
||||
params:1 = path
|
||||
params:3 = iobuf_addr[i]
|
||||
@@ -396,7 +377,7 @@ def a3volume(unit, volname)
|
||||
byte devname[17]
|
||||
byte info[11]
|
||||
byte params[9]
|
||||
|
||||
|
||||
^volname = 0
|
||||
params.0 = 4
|
||||
params.1 = unit
|
||||
|
||||
@@ -407,6 +407,28 @@ asm _grFillTile
|
||||
RTS
|
||||
end
|
||||
//
|
||||
// Wait for VLB
|
||||
//
|
||||
export asm grVLB#0
|
||||
LDA $BF98
|
||||
AND #$C0
|
||||
CMP #$80
|
||||
BNE +
|
||||
PHP
|
||||
SEI
|
||||
STA $C079 ; Enable IOU access and reset VBL int on //c
|
||||
STA $C05B ; Enable VBL int
|
||||
- LDA $C019
|
||||
STA $C079 ; Reset VBL int on //c
|
||||
BMI -
|
||||
- LDA $C019
|
||||
BPL -
|
||||
STA $C05A ; Disable VBL int on //c
|
||||
STA $C078 ; Disable IOU access on //c
|
||||
PLP
|
||||
+ RTS
|
||||
end
|
||||
//
|
||||
// Clear the buffer
|
||||
//
|
||||
export def grClear(clr)#0
|
||||
@@ -458,6 +480,7 @@ export def grShow(page)#1
|
||||
return page ^ 1
|
||||
end
|
||||
export def grSwap#0
|
||||
//vlbWait
|
||||
^(showpage1 + drawpage)
|
||||
drawpage = drawpage ^ 1
|
||||
drawbuff = grbuff[drawpage]
|
||||
|
||||
@@ -16,6 +16,13 @@ const hgr1 = $2000
|
||||
const hgr2 = $4000
|
||||
const page1 = 0
|
||||
const page2 = 1
|
||||
//
|
||||
// Apple III hardware constants.
|
||||
//
|
||||
const ENV_REG = $FFDF
|
||||
//
|
||||
// Screen addresses
|
||||
//
|
||||
word hgrbuff[] = hgr1, hgr2
|
||||
//word hgrscan[] = $0000,$0400,$0800,$0C00,$1000,$1400,$1800,$1C00
|
||||
//word = $0080,$0480,$0880,$0C80,$1080,$1480,$1880,$1C80
|
||||
@@ -1192,6 +1199,13 @@ export def hgrDrawBuf(page)#1
|
||||
return drawpage
|
||||
end
|
||||
//
|
||||
// Machine compatibility check
|
||||
//
|
||||
if MACHID & MACHID_MODEL == MACHID_III or MACHID & MACHID_MODEL == MACHID_I
|
||||
puts("Apple II compatible only.\n")
|
||||
return -1
|
||||
fin
|
||||
//
|
||||
// Assembly fixups
|
||||
//
|
||||
hgrCopyDst:1 = @clipsrc
|
||||
|
||||
@@ -15,7 +15,7 @@ def matchNext(src, srcofst, exp, expofst)
|
||||
return TRUE
|
||||
fin
|
||||
is '?' // Single char wildcard
|
||||
if ^src >= srcofst
|
||||
if ^src >= srcofst
|
||||
return matchNext(src, srcofst + 1, exp, expofst + 1)
|
||||
fin
|
||||
return FALSE
|
||||
@@ -43,7 +43,7 @@ end
|
||||
export def matchList(pathstr, exp)#2
|
||||
byte refnum
|
||||
char[64] curpath
|
||||
var firstblk, entrylen, entriesblk, i, entry, filecnt, entrylist, entryptr, entrycnt
|
||||
var firstblk, entrylen, entriesblk, i, entry, entrylist, entryptr, entrycnt
|
||||
|
||||
if not dirbuf
|
||||
dirbuf = heapallocalign(512, 8, 0)
|
||||
@@ -58,48 +58,43 @@ export def matchList(pathstr, exp)#2
|
||||
fin
|
||||
entrylist = 0
|
||||
entrycnt = 0
|
||||
filecnt = 0
|
||||
firstblk = 1
|
||||
refnum = fileio:open(pathstr)
|
||||
repeat
|
||||
if fileio:read(refnum, dirbuf, 512) == 512
|
||||
while fileio:read(refnum, dirbuf, 512) == 512
|
||||
//
|
||||
// Skip block pointers
|
||||
//
|
||||
entry = dirbuf + 4
|
||||
if firstblk
|
||||
//
|
||||
// Skip block pointers
|
||||
// Pull out revelant details from the first block
|
||||
//
|
||||
entry = dirbuf + 4
|
||||
if firstblk
|
||||
//
|
||||
// Pull out revelant details from the first block
|
||||
//
|
||||
entrylen = dirbuf->$23
|
||||
entriesblk = dirbuf->$24
|
||||
filecnt = dirbuf=>$25
|
||||
entry = entry + entrylen
|
||||
fin
|
||||
for i = firstblk to entriesblk
|
||||
//
|
||||
// Copy directory entry details
|
||||
//
|
||||
^entry = ^entry & $0F
|
||||
if ^entry
|
||||
//
|
||||
// Match wildcard filename
|
||||
//
|
||||
if matchName(entry, exp)
|
||||
entryptr = heapalloc(t_fileentry)
|
||||
memcpy(entryptr, entry, t_fileentry)
|
||||
entrycnt++
|
||||
if not entrylist
|
||||
entrylist = entryptr
|
||||
fin
|
||||
fin
|
||||
filecnt--
|
||||
fin
|
||||
entry = entry + entrylen
|
||||
next
|
||||
firstblk = 0
|
||||
entrylen = dirbuf->$23
|
||||
entriesblk = dirbuf->$24 - 1
|
||||
entry = entry + entrylen
|
||||
fin
|
||||
until filecnt == 0
|
||||
for i = firstblk to entriesblk
|
||||
//
|
||||
// Copy directory entry details
|
||||
//
|
||||
^entry = ^entry & $0F
|
||||
if ^entry
|
||||
//
|
||||
// Match wildcard filename
|
||||
//
|
||||
if matchName(entry, exp)
|
||||
entryptr = heapalloc(t_fileentry)
|
||||
memcpy(entryptr, entry, t_fileentry)
|
||||
entrycnt++
|
||||
if not entrylist
|
||||
entrylist = entryptr
|
||||
fin
|
||||
fin
|
||||
fin
|
||||
entry = entry + entrylen
|
||||
next
|
||||
firstblk = 0
|
||||
loop
|
||||
fileio:close(refnum)
|
||||
return entrylist, entrycnt
|
||||
end
|
||||
@@ -108,7 +103,7 @@ end
|
||||
//
|
||||
export def isWildName(exp)#1
|
||||
byte i
|
||||
|
||||
|
||||
if ^exp
|
||||
for i = 1 to ^exp
|
||||
if exp->[i] == '*' or exp->[i] == '?'
|
||||
@@ -118,5 +113,18 @@ export def isWildName(exp)#1
|
||||
fin
|
||||
return FALSE
|
||||
end
|
||||
//
|
||||
// Utility routine to separate filename from path
|
||||
//
|
||||
export def fileFromPath(filestr, pathstr)#0
|
||||
byte i
|
||||
|
||||
for i = ^pathstr downto 1
|
||||
if pathstr->[i] == '/'
|
||||
break
|
||||
fin
|
||||
next
|
||||
^filestr = ^pathstr - i
|
||||
memcpy(filestr + 1, pathstr + 1 + i, ^filestr)
|
||||
end
|
||||
done
|
||||
|
||||
|
||||
181
src/libsrc/apple/shrlib.pla
Normal file
181
src/libsrc/apple/shrlib.pla
Normal file
@@ -0,0 +1,181 @@
|
||||
include "inc/cmdsys.plh"
|
||||
//
|
||||
// Apple II hardware constants.
|
||||
//
|
||||
const store80dis = $C000
|
||||
const store80en = $C001
|
||||
const vidctl = $C029
|
||||
const showgraphics = $C050
|
||||
const showtext = $C051
|
||||
const showfull = $C052
|
||||
const showmix = $C053
|
||||
const showpage1 = $C054
|
||||
const showpage2 = $C055
|
||||
const showlores = $C056
|
||||
const showhires = $C057
|
||||
const show40 = $C00C
|
||||
const show80 = $C00D
|
||||
const mapmain = $C000
|
||||
const mapaux = $C001
|
||||
const an3on = $C05E
|
||||
const an3off = $C05F
|
||||
const ena80 = $C07E
|
||||
const dis80 = $C07F
|
||||
const pixbuf = $2000
|
||||
const scbbuf = $9D00
|
||||
const palbuf = $9E00
|
||||
const scb640 = $80 // 640 PIXEL SUPER-HIRES
|
||||
const scb320 = $00 // 320 PIXEL SUPER-HIRES
|
||||
|
||||
word palette = $0000, $0007, $0070, $0077, $0700, $0707, $0770, $0
|
||||
word = $0CCC, $000F, $00F0, $00FF, $0F00, $0F0F, $0FF0, $0FFF
|
||||
|
||||
|
||||
asm shrInc(buff)
|
||||
!SOURCE "vmsrc/plvmzp.inc"
|
||||
GBASL = $26
|
||||
GBASH = $27
|
||||
GBASE = GBASL
|
||||
GCLR = $30
|
||||
STORE80DIS = $C000
|
||||
STORE80EN = $C001
|
||||
MAINWRT = $C004
|
||||
AUXWRT = $C005
|
||||
VIDCTL = $C029
|
||||
SHADOW = $C035
|
||||
end
|
||||
//
|
||||
// This gets copied to $0100!!!
|
||||
//
|
||||
asm auxRead
|
||||
STA $C003 ; READ AUX MEM
|
||||
LDA (GBASE),Y
|
||||
STA $C002 ; READ MAIN MEM
|
||||
RTS
|
||||
end
|
||||
//
|
||||
// Peek byte from SHR memory
|
||||
//
|
||||
asm shrPeek(addr)
|
||||
LDA ESTKL,X
|
||||
STA GBASL
|
||||
LDA ESTKH,X
|
||||
STA GBASH
|
||||
LDY #$00
|
||||
STY ESTKH,X
|
||||
PHP
|
||||
SEI
|
||||
LDA SHADOW
|
||||
AND #$F7
|
||||
STA SHADOW
|
||||
JSR $0100
|
||||
STA ESTKL,X
|
||||
LDA SHADOW
|
||||
ORA #$08
|
||||
STA SHADOW
|
||||
PLP
|
||||
RTS
|
||||
end
|
||||
//
|
||||
// Poke byte into SHR memory
|
||||
//
|
||||
asm shrPoke(addr, data)#0
|
||||
LDA ESTKL+1,X
|
||||
STA GBASL
|
||||
LDA ESTKH+1,X
|
||||
STA GBASH
|
||||
LDY #$00
|
||||
PHP
|
||||
SEI
|
||||
LDA SHADOW
|
||||
AND #$F7
|
||||
STA SHADOW
|
||||
LDA ESTKL+0,X
|
||||
STA AUXWRT
|
||||
STA (GBASE),Y
|
||||
STA MAINWRT
|
||||
LDA SHADOW
|
||||
ORA #$08
|
||||
STA SHADOW
|
||||
PLP
|
||||
INX
|
||||
INX
|
||||
RTS
|
||||
end
|
||||
//
|
||||
// Fill byte into SHR memory
|
||||
//
|
||||
asm shrFill(addr, data, len)#0
|
||||
LDA ESTKL+2,X
|
||||
STA GBASL
|
||||
LDA ESTKH+2,X
|
||||
STA GBASH
|
||||
LDY #$00
|
||||
PHP
|
||||
SEI
|
||||
LDA SHADOW
|
||||
AND #$F7
|
||||
STA SHADOW
|
||||
LDA ESTKL+1,X
|
||||
STA AUXWRT
|
||||
- STA (GBASE),Y
|
||||
INY
|
||||
BNE +
|
||||
INC GBASH
|
||||
+ DEC ESTKL+0,X
|
||||
BNE -
|
||||
DEC ESTKH+0,X
|
||||
BNE -
|
||||
STA MAINWRT
|
||||
LDA SHADOW
|
||||
ORA #$08
|
||||
STA SHADOW
|
||||
PLP
|
||||
INX
|
||||
INX
|
||||
RTS
|
||||
end
|
||||
export def shrPalette(pal, rgbptr)#0
|
||||
word palptr
|
||||
byte i
|
||||
|
||||
palptr = palbuf + pal * 32
|
||||
for i = 0 to 31
|
||||
shrPoke(palptr + i, ^(rgbptr + i))
|
||||
next
|
||||
end
|
||||
export def shrMode(mode)#0
|
||||
byte row, scb
|
||||
if mode
|
||||
//
|
||||
// Set super hires graphics
|
||||
//
|
||||
if mode == 640
|
||||
scb = scb640
|
||||
else
|
||||
scb = scb320
|
||||
fin
|
||||
for row = 0 to 199
|
||||
shrPoke(scbbuf + row, scb)
|
||||
shrRowPalette(row, palette)
|
||||
next
|
||||
^store80dis = 0 // Turn off 80 column mode
|
||||
^vidctl = ^vidctl | $80 // Turn on SHR mode
|
||||
return
|
||||
fin
|
||||
//
|
||||
// Set text mode
|
||||
//
|
||||
^vidctl = ^vidctl & $7F
|
||||
^showtext
|
||||
^showpage1
|
||||
^ena80 = 0
|
||||
^show40 = 0
|
||||
^mapmain = 0
|
||||
^an3off
|
||||
call($FC58, 0, 0, 0, 0) // home()
|
||||
end
|
||||
|
||||
// Put read AUX mem routine in scary location
|
||||
memcpy($0100, @auxRead, 9)
|
||||
done
|
||||
@@ -19,6 +19,7 @@ byte fbrNext[MAX_FIBERS]
|
||||
word fbrVMState[MAX_FIBERS]
|
||||
word fbrPool
|
||||
byte fbrRunning = 0
|
||||
export byte fbrCount = 0
|
||||
//
|
||||
// Zero Page VM state and 6502 stack
|
||||
//
|
||||
@@ -136,6 +137,7 @@ export def fbrInit(numPool)
|
||||
else
|
||||
return -1
|
||||
fin
|
||||
fbrCount = 1
|
||||
return 0
|
||||
end
|
||||
//
|
||||
@@ -151,6 +153,7 @@ export def fbrStop(fid)#0
|
||||
//
|
||||
// Remove fiber from RUN list and tag as free
|
||||
//
|
||||
fbrCount--
|
||||
fbrState[fid] = FIBER_FREE
|
||||
i = 0
|
||||
while fbrNext[i] <> fid
|
||||
@@ -212,6 +215,7 @@ export def fbrStart(defaddr, param)
|
||||
//
|
||||
// Return fiber ID (index)
|
||||
//
|
||||
fbrCount++
|
||||
return i
|
||||
fin
|
||||
next
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
//
|
||||
include "inc/cmdsys.plh"
|
||||
include "inc/sane.plh"
|
||||
include "inc/fpstr.plh"
|
||||
//
|
||||
// Structures for DEC2BIN, BIN2DEC
|
||||
//
|
||||
@@ -19,14 +20,13 @@ end
|
||||
// Parse string into decrecord, return SANE conversion output
|
||||
//
|
||||
export def str2ext(str, ext)
|
||||
byte i, s, d
|
||||
byte i, d
|
||||
byte decrec[t_decrecord]
|
||||
word sgnadj, expadj
|
||||
|
||||
decrec:sgn = 0
|
||||
decrec:exp = 0
|
||||
decrec.sig = 0
|
||||
s = 1
|
||||
i = 1
|
||||
//
|
||||
// Skip whitespace
|
||||
@@ -51,27 +51,34 @@ export def str2ext(str, ext)
|
||||
// Parse number
|
||||
//
|
||||
while i <= ^str
|
||||
d = toupper(^(str+i))
|
||||
d = ^(str+i)
|
||||
if d >= '0' and d <= '9'
|
||||
//
|
||||
// Parse digit
|
||||
//
|
||||
decrec.sig[s] = ^(str+i)
|
||||
decrec:sig++
|
||||
s++
|
||||
decrec.sig[decrec.sig] = d
|
||||
elsif d == '.'
|
||||
//
|
||||
// Parse decimal point
|
||||
//
|
||||
i++
|
||||
while i <= ^str
|
||||
d = toupper(^(str+i))
|
||||
if d >= '0' and d <= '9'
|
||||
decrec.sig[s] = ^(str+i)
|
||||
decrec.sig++
|
||||
if !decrec:exp
|
||||
//
|
||||
// Skip leading zeros
|
||||
//
|
||||
while i <= ^str and ^(str+i) == '0'
|
||||
decrec:exp--
|
||||
s++
|
||||
elsif d == 'E'
|
||||
i++
|
||||
loop
|
||||
fin
|
||||
while i <= ^str
|
||||
d = ^(str+i)
|
||||
if d >= '0' and d <= '9'
|
||||
decrec.sig++
|
||||
decrec.sig[decrec.sig] = d
|
||||
decrec:exp--
|
||||
elsif d == 'E' or d == 'e'
|
||||
i--
|
||||
break
|
||||
else
|
||||
@@ -79,7 +86,7 @@ export def str2ext(str, ext)
|
||||
fin
|
||||
i++
|
||||
loop
|
||||
elsif d == 'E'
|
||||
elsif d == 'E' or d == 'e'
|
||||
//
|
||||
// Parse exponent
|
||||
//
|
||||
@@ -108,21 +115,20 @@ export def str2ext(str, ext)
|
||||
i++
|
||||
loop
|
||||
//
|
||||
// Strip leading zeros from sig
|
||||
// Strip trailing zeros from sig
|
||||
//
|
||||
while decrec.sig > 1 and decrec.sig.1 == '0'
|
||||
while decrec.sig > 0 and decrec.sig[decrec.sig] == '0'
|
||||
decrec.sig--
|
||||
if decrec:exp < 0
|
||||
decrec:exp--
|
||||
fin
|
||||
memcpy(@decrec.sig.1, @decrec.sig.2, decrec.sig)
|
||||
decrec:exp++
|
||||
loop
|
||||
//
|
||||
// Check for zero
|
||||
//
|
||||
if !decrec.sig
|
||||
decrec.sig = 1
|
||||
decrec.sig = 1
|
||||
decrec.sig.1 = '0'
|
||||
decrec:sgn = 0
|
||||
decrec:exp = 0
|
||||
fin
|
||||
sane:saveZP()
|
||||
return sane:restoreZP(sane:op2FP(FFEXT|FOD2B, ext, @decrec))
|
||||
@@ -131,14 +137,15 @@ end
|
||||
// Convert extended FP to string using , return string
|
||||
//
|
||||
export def ext2str(ext, str, intdigits, fracdigits, format)
|
||||
byte d, i, sigdigits, numdigits
|
||||
word dp, tens
|
||||
byte d, numdigits
|
||||
word istr, dp, tens
|
||||
byte decform[t_decformat]
|
||||
byte decrec[t_decrecord]
|
||||
|
||||
numdigits = intdigits + fracdigits
|
||||
decform:style = format & $01
|
||||
numdigits = intdigits + fracdigits
|
||||
decform:style = format & FPSTR_FIXED
|
||||
decform:digits = decform:style ?? fracdigits :: numdigits
|
||||
decrec:exp = 0
|
||||
sane:saveZP()
|
||||
sane:restoreZP(sane:op3FP(FFEXT|FOB2D, @decrec, ext, @decform))
|
||||
^(str+1) = decrec.sgn ?? '-' :: ' '
|
||||
@@ -156,93 +163,110 @@ export def ext2str(ext, str, intdigits, fracdigits, format)
|
||||
^str = 4
|
||||
return str
|
||||
fin
|
||||
if decrec.sig.1 == '0'
|
||||
while decrec.sig < fracdigits
|
||||
decrec.sig++
|
||||
decrec.sig[decrec.sig] = '0'
|
||||
loop
|
||||
decrec:exp = -decrec.sig
|
||||
fin
|
||||
dp = decrec.sig + decrec:exp
|
||||
sigdigits = decrec.sig
|
||||
if decrec:exp < 0 and format & $02
|
||||
//
|
||||
// Strip off trailing fractional zeros
|
||||
//
|
||||
while sigdigits > dp and decrec.sig[sigdigits] == '0'
|
||||
sigdigits--
|
||||
decrec:exp++
|
||||
loop
|
||||
fin
|
||||
if -decrec:exp > numdigits or sigdigits + decrec:exp >= (decform:style ?? intdigits :: numdigits) or format & $04
|
||||
//
|
||||
// Convert to exponential format
|
||||
//
|
||||
^(str+2) = decrec.sig.1
|
||||
^(str+3) = '.'
|
||||
i = 3
|
||||
for d = 0 to fracdigits
|
||||
i++
|
||||
^(str+i) = decrec.sig.2[d]
|
||||
next
|
||||
if format & FPSTR_EXP
|
||||
if format & FPSTR_STRIP
|
||||
//
|
||||
// Strip off trailing fractional zeros
|
||||
//
|
||||
while decrec.sig > 1 and decrec.sig[decrec.sig] == '0'
|
||||
decrec.sig--
|
||||
decrec:exp++
|
||||
loop
|
||||
fin
|
||||
//
|
||||
// Copy over all significant digits
|
||||
//
|
||||
if ^(str+i) == '.'; i--; fin
|
||||
i++
|
||||
^(str+i) = 'E'
|
||||
i++
|
||||
^(str+2) = decrec.sig.1
|
||||
^(str+3) = '.'
|
||||
istr = str + 3
|
||||
for d = 2 to decrec.sig
|
||||
istr++
|
||||
^istr = decrec.sig[d]
|
||||
next
|
||||
if ^istr == '.'; istr--; fin
|
||||
//
|
||||
// Print exponent as 4 digits with leading zeros
|
||||
//
|
||||
istr++
|
||||
^istr = 'E'
|
||||
istr++
|
||||
dp--
|
||||
if dp < 0
|
||||
^(str+i) = '-'
|
||||
^istr = '-'
|
||||
dp = -dp
|
||||
else
|
||||
^(str+i) = '+'
|
||||
if dp == 0
|
||||
i++
|
||||
^(str+i) = '0'
|
||||
fin
|
||||
^istr = '+'
|
||||
fin
|
||||
//
|
||||
// Pretty output the exponent (preceding zero for values less than 10)
|
||||
//
|
||||
d = 0
|
||||
tens = 10000
|
||||
while dp
|
||||
d = d or tens <= 10
|
||||
if dp >= tens or d
|
||||
d = 1
|
||||
i++
|
||||
^(str+i) = (dp / tens) + '0'
|
||||
fin
|
||||
tens = 1000
|
||||
while tens
|
||||
istr++
|
||||
^istr = (dp / tens) + '0'
|
||||
dp = dp % tens
|
||||
tens = tens / 10
|
||||
if !tens; break; fin
|
||||
loop
|
||||
else
|
||||
if format & FPSTR_STRIP and decrec:exp < 0
|
||||
//
|
||||
// Strip off trailing fractional zeros
|
||||
//
|
||||
while decrec.sig > dp and decrec.sig[decrec.sig] == '0'
|
||||
decrec.sig--
|
||||
decrec:exp++
|
||||
loop
|
||||
fin
|
||||
if decrec:sig == 1 | '0'<<8
|
||||
//
|
||||
// Case of zero or underflow
|
||||
//
|
||||
if decrec:exp == 0
|
||||
//
|
||||
// Zero
|
||||
//
|
||||
if format & FPSTR_FIXED
|
||||
//
|
||||
// Add trailing fractional zeros
|
||||
//
|
||||
dp = 1 - fracdigits
|
||||
fin
|
||||
elsif format & FPSTR_FLEX
|
||||
//
|
||||
// Underflow
|
||||
//
|
||||
dp = -fracdigits - 1
|
||||
fin
|
||||
fin
|
||||
if format & FPSTR_FLEX and (dp < -fracdigits or dp > (format & FPSTR_FIXED ?? intdigits :: numdigits))
|
||||
//
|
||||
// Print as exponent if over/underflow fixed digits
|
||||
//
|
||||
if numdigits < 7; numdigits = 7; fin
|
||||
return ext2str(ext, str, 1, numdigits - 7, FPSTR_EXP | (format & FPSTR_STRIP))
|
||||
fin
|
||||
//
|
||||
// Convert as floating point
|
||||
//
|
||||
i = 1
|
||||
if dp <= 0
|
||||
*(str+2) = '0'|('.'<<8)
|
||||
i = 3
|
||||
istr = str + 3
|
||||
while dp < 0
|
||||
dp++
|
||||
i++
|
||||
^(str+i) = '0'
|
||||
istr++
|
||||
^istr = '0'
|
||||
loop
|
||||
else
|
||||
istr = str + 1
|
||||
fin
|
||||
for d = 1 to sigdigits
|
||||
i++
|
||||
^(str+i) = decrec.sig[d]
|
||||
for d = 1 to decrec.sig
|
||||
istr++
|
||||
^istr = decrec.sig[d]
|
||||
if d == dp
|
||||
i++
|
||||
^(str+i) = '.'
|
||||
istr++
|
||||
^istr = '.'
|
||||
fin
|
||||
next
|
||||
if ^(str+i) == '.'; i--; fin
|
||||
if ^istr == '.'; istr--; fin
|
||||
fin
|
||||
^str = i
|
||||
^str = istr - str
|
||||
return str
|
||||
end
|
||||
|
||||
@@ -1,24 +1,5 @@
|
||||
include "inc/cmdsys.plh"
|
||||
//
|
||||
// iNet API - must match inet.plh
|
||||
//
|
||||
struc t_inet
|
||||
word initIP
|
||||
word serviceIP
|
||||
word openUDP
|
||||
word sendUDP
|
||||
word closeUDP
|
||||
word listenTCP
|
||||
word connectTCP
|
||||
word sendTCP
|
||||
word closeTCP
|
||||
word setInterfaceIP
|
||||
word getInterfaceHA
|
||||
word setDNS
|
||||
word resolveIP
|
||||
word setCallback
|
||||
word setParam
|
||||
end
|
||||
include "inc/inet.plh"
|
||||
//
|
||||
// DNS message
|
||||
//
|
||||
|
||||
194
src/makefile
194
src/makefile
@@ -15,7 +15,7 @@ CMDJIT = rel/apple/CMD128\#061000
|
||||
PLVMZP_C64 = vmsrc/c64/plvmzp.inc
|
||||
PLVMC64 = rel/c64/PLASMA
|
||||
ED = rel/ED\#FE1000
|
||||
ZIP = rel/apple/ZIP\#FE1000
|
||||
ZIPCHIP = rel/apple/ZIPCHIP\#FE1000
|
||||
JIT = rel/apple/JIT\#FE1000
|
||||
JIT16 = rel/apple/JIT16\#FE1000
|
||||
JITUNE = rel/apple/JITUNE\#FE1000
|
||||
@@ -76,6 +76,7 @@ ROGUE = rel/ROGUE\#FE1000
|
||||
ROGUEMAP = rel/ROGUEMAP\#FE1000
|
||||
ROGUECOMBAT= rel/ROGUECOMBAT\#FE1000
|
||||
MON = rel/apple/MON\#FE1000
|
||||
CONIOTST = rel/apple/CONIOTST\#FE1000
|
||||
TILETEST = rel/apple/TILETEST\#FE1000
|
||||
HGRTEST = rel/apple/HGRTEST\#FE1000
|
||||
GRTEST = rel/apple/GRTEST\#FE1000
|
||||
@@ -109,11 +110,11 @@ TXTTYPE = .TXT
|
||||
#SYSTYPE = \#FF2000
|
||||
#TXTTYPE = \#040000
|
||||
|
||||
apple: $(PLVMZP_APL) $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVMJIT) $(PLVM802) $(PLVM03) $(PLVMJIT03) $(CMD) $(CMDJIT) $(JIT) $(JIT16) $(JITUNE) $(SOSCMD) $(SOSCMDJIT) $(PLASMAPLASM) $(CODEOPT) $(ZIP) $(MATCHFILES) $(ARGS) $(MEMMGR) $(MEMTEST) $(FIBER) $(FIBERTEST) $(LONGJMP) $(ED) $(MON) $(COPY) $(DEL) $(REN) $(CAT) $(NEWDIR) $(TYPE) $(SOS) $(ROD) $(SIEVE) $(PRIMEGAP) $(MOUSE) $(UTHERNET2) $(UTHERNET) $(ETHERIP) $(INET) $(DHCP) $(HTTPD) $(TFTPD) $(ROGUE) $(ROGUEMAP) $(ROGUECOMBAT) $(SFM) $(SFMSPRT) $(GRAFIX) $(GFXDEMO) $(LINES) $(HGRTILE) $(HGRFONT) $(HGRSPRITE) $(HGRLIB) $(TILETEST) $(HGRTEST) $(GRLIB) $(DGRLIB) $(GRTEST) $(DGRTEST) $(HGRTEST) $(FILEIO_APL) $(CONIO_APL) $(JOYBUZZ) $(PORTIO) $(SPIPORT) $(SDFAT) $(FATCAT) $(FATGET) $(FATPUT) $(FATWDSK) $(FATRDSK) $(INT32) $(INT32TEST) $(SANE) $(FPSTR) $(FPU) $(SANITY) $(LZ4) $(LZ4CAT) $(RPNCALC) $(SNDSEQ) $(PLAYSEQ)
|
||||
apple: $(PLVMZP_APL) $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVMJIT) $(PLVM802) $(PLVM03) $(PLVMJIT03) $(CMD) $(CMDJIT) $(JIT) $(JIT16) $(JITUNE) $(SOSCMD) $(SOSCMDJIT) $(PLASMAPLASM) $(CODEOPT) $(ZIPCHIP) $(MATCHFILES) $(ARGS) $(MEMMGR) $(MEMTEST) $(FIBER) $(FIBERTEST) $(LONGJMP) $(ED) $(MON) $(COPY) $(DEL) $(REN) $(CAT) $(NEWDIR) $(TYPE) $(SOS) $(ROD) $(SIEVE) $(PRIMEGAP) $(MOUSE) $(UTHERNET2) $(UTHERNET) $(ETHERIP) $(INET) $(DHCP) $(HTTPD) $(TFTPD) $(ROGUE) $(ROGUEMAP) $(ROGUECOMBAT) $(SFM) $(SFMSPRT) $(GRAFIX) $(GFXDEMO) $(LINES) $(HGRTILE) $(HGRFONT) $(HGRSPRITE) $(HGRLIB) $(TILETEST) $(HGRTEST) $(GRLIB) $(DGRLIB) $(GRTEST) $(DGRTEST) $(HGRTEST) $(FILEIO_APL) $(CONIO_APL) $(JOYBUZZ) $(PORTIO) $(SPIPORT) $(SDFAT) $(FATCAT) $(FATGET) $(FATPUT) $(FATWDSK) $(FATRDSK) $(INT32) $(INT32TEST) $(SANE) $(FPSTR) $(FPU) $(SANITY) $(LZ4) $(LZ4CAT) $(RPNCALC) $(SNDSEQ) $(PLAYSEQ) $(CONIOTST)
|
||||
|
||||
-rm vmsrc/plvmzp.inc
|
||||
|
||||
c64: $(PLVMZP_C64) $(PLASM) $(PLVM) $(PLVMC64)
|
||||
c64: $(PLVMZP_C64) $(PLASM) $(PLVM) $(PLVMC64)
|
||||
-rm vmsrc/plvmzp.inc
|
||||
|
||||
all: apple c64
|
||||
@@ -142,11 +143,11 @@ $(PLASM): $(OBJS) $(INCS)
|
||||
cc $(OBJS) -o $(PLASM)
|
||||
|
||||
$(PLASMAPLASM): toolsrc/plasm.pla toolsrc/lex.pla toolsrc/parse.pla toolsrc/codegen.pla toolsrc/codeseq.plh
|
||||
./$(PLASM) -AMOW < toolsrc/plasm.pla > toolsrc/plasm.a
|
||||
./$(PLASM) -AMOW toolsrc/plasm.pla
|
||||
acme --setpc 4094 -o $(PLASMAPLASM) toolsrc/plasm.a
|
||||
|
||||
$(CODEOPT): toolsrc/codeopt.pla toolsrc/codeseq.plh
|
||||
./$(PLASM) -AMOW < toolsrc/codeopt.pla > toolsrc/codeopt.a
|
||||
./$(PLASM) -AMOW toolsrc/codeopt.pla
|
||||
acme --setpc 4094 -o $(CODEOPT) toolsrc/codeopt.a
|
||||
|
||||
#
|
||||
@@ -176,25 +177,25 @@ $(PLVMC64): vmsrc/c64/plvmc64.s vmsrc/c64/cmd.a
|
||||
acme -f cbm -o $(PLVMC64) -l vmsrc/c64/plvmc64.sym vmsrc/c64/plvmc64.s
|
||||
|
||||
vmsrc/apple/a1cmd.a: vmsrc/apple/a1cmd.pla $(PLASM)
|
||||
./$(PLASM) -AOW < vmsrc/apple/a1cmd.pla > vmsrc/apple/a1cmd.a
|
||||
./$(PLASM) -AOW vmsrc/apple/a1cmd.pla
|
||||
|
||||
$(PLVM01): vmsrc/apple/plvm01.s vmsrc/apple/a1cmd.a
|
||||
acme -o $(PLVM01) -l vmsrc/apple/plvm01.sym vmsrc/apple/plvm01.s
|
||||
|
||||
$(CMD): vmsrc/apple/cmd.pla vmsrc/apple/cmdstub.s $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AOW < vmsrc/apple/cmd.pla > vmsrc/apple/cmd.a
|
||||
./$(PLASM) -AOW vmsrc/apple/cmd.pla
|
||||
acme --setpc 8192 -o $(CMD) vmsrc/apple/cmdstub.s
|
||||
|
||||
$(CMDJIT): vmsrc/apple/cmdjit.pla vmsrc/apple/cmdjitstub.s $(PLVMJIT) $(PLASM)
|
||||
./$(PLASM) -AOW < vmsrc/apple/cmdjit.pla > vmsrc/apple/cmdjit.a
|
||||
./$(PLASM) -AOW vmsrc/apple/cmdjit.pla
|
||||
acme --setpc 8192 -o $(CMDJIT) vmsrc/apple/cmdjitstub.s
|
||||
|
||||
$(SOSCMD): vmsrc/apple/soscmd.pla $(PLVM03) $(PLASM)
|
||||
./$(PLASM) -AMOW < vmsrc/apple/soscmd.pla > vmsrc/apple/soscmd.a
|
||||
./$(PLASM) -AMOW vmsrc/apple/soscmd.pla
|
||||
acme --setpc 4094 -o $(SOSCMD) vmsrc/apple/soscmd.a
|
||||
|
||||
$(SOSCMDJIT): vmsrc/apple/soscmdjit.pla libsrc/jitcore.pla $(PLVMJIT03) $(PLASM)
|
||||
./$(PLASM) -AMOW < vmsrc/apple/soscmdjit.pla > vmsrc/apple/soscmdjit.a
|
||||
./$(PLASM) -AMOW vmsrc/apple/soscmdjit.pla
|
||||
acme --setpc 4094 -o $(SOSCMDJIT) vmsrc/apple/soscmdjit.a
|
||||
|
||||
$(PLVM02): vmsrc/apple/plvm02.s
|
||||
@@ -207,13 +208,13 @@ $(PLVM802): vmsrc/apple/plvm802.s
|
||||
acme -o $(PLVM802) -l vmsrc/apple/plvm802.sym vmsrc/apple/plvm802.s
|
||||
|
||||
vmsrc/apple/sossys.a: vmsrc/apple/sossys.pla $(PLASM)
|
||||
./$(PLASM) -AOW < vmsrc/apple/sossys.pla > vmsrc/apple/sossys.a
|
||||
./$(PLASM) -AOW vmsrc/apple/sossys.pla
|
||||
|
||||
$(PLVM03): vmsrc/apple/plvm03.s vmsrc/apple/sossys.a
|
||||
acme -o $(PLVM03) -l vmsrc/apple/plvm03.sym vmsrc/apple/plvm03.s
|
||||
|
||||
vmsrc/apple/sossysjit.a: vmsrc/apple/sossysjit.pla $(PLASM)
|
||||
./$(PLASM) -AOW < vmsrc/apple/sossysjit.pla > vmsrc/apple/sossysjit.a
|
||||
./$(PLASM) -AOW vmsrc/apple/sossysjit.pla
|
||||
|
||||
$(PLVMJIT03): vmsrc/apple/plvmjit03.s vmsrc/apple/sossysjit.a
|
||||
acme -o $(PLVMJIT03) -l vmsrc/apple/plvmjit03.sym vmsrc/apple/plvmjit03.s
|
||||
@@ -221,306 +222,309 @@ $(PLVMJIT03): vmsrc/apple/plvmjit03.s vmsrc/apple/sossysjit.a
|
||||
# Sample code
|
||||
#
|
||||
test: samplesrc/test.pla samplesrc/testlib.pla $(PLVM) $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/test.pla > samplesrc/test.a
|
||||
./$(PLASM) -AMOW samplesrc/test.pla
|
||||
acme --setpc 4094 -o $(TEST) samplesrc/test.a
|
||||
./$(PLASM) -AMOW < samplesrc/testlib.pla > samplesrc/testlib.a
|
||||
./$(PLASM) -AMOW samplesrc/testlib.pla
|
||||
acme --setpc 4094 -o $(TESTLIB) samplesrc/testlib.a
|
||||
./$(PLVM) TEST
|
||||
|
||||
$(ED): toolsrc/ed.pla $(PLVM02) $(PLASM) toolsrc/ed.pla
|
||||
./$(PLASM) -AMOW < toolsrc/ed.pla > toolsrc/ed.a
|
||||
./$(PLASM) -AMOW toolsrc/ed.pla
|
||||
acme --setpc 4094 -o $(ED) toolsrc/ed.a
|
||||
|
||||
$(MATCHFILES): libsrc/apple/matchfiles.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/apple/matchfiles.pla > libsrc/apple/matchfiles.a
|
||||
./$(PLASM) -AMOW libsrc/apple/matchfiles.pla
|
||||
acme --setpc 4094 -o $(MATCHFILES) libsrc/apple/matchfiles.a
|
||||
|
||||
$(ARGS): libsrc/args.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/args.pla > libsrc/args.a
|
||||
./$(PLASM) -AMOW libsrc/args.pla
|
||||
acme --setpc 4094 -o $(ARGS) libsrc/args.a
|
||||
|
||||
$(MEMMGR): libsrc/memmgr.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/memmgr.pla > libsrc/memmgr.a
|
||||
./$(PLASM) -AMOW libsrc/memmgr.pla
|
||||
acme --setpc 4094 -o $(MEMMGR) libsrc/memmgr.a
|
||||
|
||||
$(MEMTEST): samplesrc/memtest.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/memtest.pla > samplesrc/memtest.a
|
||||
./$(PLASM) -AMOW samplesrc/memtest.pla
|
||||
acme --setpc 4094 -o $(MEMTEST) samplesrc/memtest.a
|
||||
|
||||
$(FIBER): libsrc/fiber.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/fiber.pla > libsrc/fiber.a
|
||||
./$(PLASM) -AMOW libsrc/fiber.pla
|
||||
acme --setpc 4094 -o $(FIBER) libsrc/fiber.a
|
||||
|
||||
$(LINES): libsrc/lines.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/lines.pla > libsrc/lines.a
|
||||
./$(PLASM) -AMOW libsrc/lines.pla
|
||||
acme --setpc 4094 -o $(LINES) libsrc/lines.a
|
||||
|
||||
$(FIBERTEST): samplesrc/fibertest.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/fibertest.pla > samplesrc/fibertest.a
|
||||
./$(PLASM) -AMOW samplesrc/fibertest.pla
|
||||
acme --setpc 4094 -o $(FIBERTEST) samplesrc/fibertest.a
|
||||
|
||||
$(LONGJMP): libsrc/longjmp.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/longjmp.pla > libsrc/longjmp.a
|
||||
./$(PLASM) -AMOW libsrc/longjmp.pla
|
||||
acme --setpc 4094 -o $(LONGJMP) libsrc/longjmp.a
|
||||
|
||||
$(SFM): samplesrc/sfm.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/sfm.pla > samplesrc/sfm.a
|
||||
./$(PLASM) -AMOW samplesrc/sfm.pla
|
||||
acme --setpc 4094 -o $(SFM) samplesrc/sfm.a
|
||||
|
||||
$(SFMSPRT): samplesrc/sfmsprt.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/sfmsprt.pla > samplesrc/sfmsprt.a
|
||||
./$(PLASM) -AMOW samplesrc/sfmsprt.pla
|
||||
acme --setpc 4094 -o $(SFMSPRT) samplesrc/sfmsprt.a
|
||||
|
||||
$(ROGUE): samplesrc/rogue.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/rogue.pla > samplesrc/rogue.a
|
||||
./$(PLASM) -AMOW samplesrc/rogue.pla
|
||||
acme --setpc 4094 -o $(ROGUE) samplesrc/rogue.a
|
||||
|
||||
$(ROGUECOMBAT): samplesrc/rogue.combat.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/rogue.combat.pla > samplesrc/rogue.combat.a
|
||||
./$(PLASM) -AMOW samplesrc/rogue.combat.pla
|
||||
acme --setpc 4094 -o $(ROGUECOMBAT) samplesrc/rogue.combat.a
|
||||
|
||||
$(ROGUEMAP): samplesrc/rogue.map.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/rogue.map.pla > samplesrc/rogue.map.a
|
||||
./$(PLASM) -AMOW samplesrc/rogue.map.pla
|
||||
acme --setpc 4094 -o $(ROGUEMAP) samplesrc/rogue.map.a
|
||||
|
||||
hello: samplesrc/hello.pla $(PLVM) $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/hello.pla > samplesrc/hello.a
|
||||
./$(PLASM) -AMOW samplesrc/hello.pla
|
||||
acme --setpc 4094 -o $(HELLO) samplesrc/hello.a
|
||||
./$(PLVM) HELLO
|
||||
|
||||
$(CONIOTST): samplesrc/coniotst.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW samplesrc/coniotst.pla
|
||||
acme --setpc 4094 -o $(CONIOTST) samplesrc/coniotst.a
|
||||
|
||||
$(ROD): samplesrc/rod.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/rod.pla > samplesrc/rod.a
|
||||
./$(PLASM) -AMOW samplesrc/rod.pla
|
||||
acme --setpc 4094 -o $(ROD) samplesrc/rod.a
|
||||
|
||||
$(SIEVE): samplesrc/sieve.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMW < samplesrc/sieve.pla > samplesrc/sieve.a
|
||||
./$(PLASM) -AMW samplesrc/sieve.pla
|
||||
acme --setpc 4094 -o $(SIEVE) samplesrc/sieve.a
|
||||
|
||||
$(PRIMEGAP): samplesrc/primegap.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMW < samplesrc/primegap.pla > samplesrc/primegap.a
|
||||
./$(PLASM) -AMW samplesrc/primegap.pla
|
||||
acme --setpc 4094 -o $(PRIMEGAP) samplesrc/primegap.a
|
||||
|
||||
$(INT32): libsrc/int32.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/int32.pla > libsrc/int32.a
|
||||
./$(PLASM) -AMOW libsrc/int32.pla
|
||||
acme --setpc 4094 -o $(INT32) libsrc/int32.a
|
||||
|
||||
$(INT32TEST): samplesrc/int32test.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/int32test.pla > samplesrc/int32test.a
|
||||
./$(PLASM) -AMOW samplesrc/int32test.pla
|
||||
acme --setpc 4094 -o $(INT32TEST) samplesrc/int32test.a
|
||||
|
||||
$(SANE): libsrc/sane.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/sane.pla > libsrc/sane.a
|
||||
./$(PLASM) -AMOW libsrc/sane.pla
|
||||
acme --setpc 4094 -o $(SANE) libsrc/sane.a
|
||||
|
||||
$(FPSTR): libsrc/fpstr.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/fpstr.pla > libsrc/fpstr.a
|
||||
./$(PLASM) -AMOW libsrc/fpstr.pla
|
||||
acme --setpc 4094 -o $(FPSTR) libsrc/fpstr.a
|
||||
|
||||
$(FPU): libsrc/fpu.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/fpu.pla > libsrc/fpu.a
|
||||
./$(PLASM) -AMOW libsrc/fpu.pla
|
||||
acme --setpc 4094 -o $(FPU) libsrc/fpu.a
|
||||
|
||||
$(SANITY): samplesrc/sanity.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/sanity.pla > samplesrc/sanity.a
|
||||
./$(PLASM) -AMOW samplesrc/sanity.pla
|
||||
acme --setpc 4094 -o $(SANITY) samplesrc/sanity.a
|
||||
|
||||
$(LZ4): libsrc/lz4.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/lz4.pla > libsrc/lz4.a
|
||||
./$(PLASM) -AMOW libsrc/lz4.pla
|
||||
acme --setpc 4094 -o $(LZ4) libsrc/lz4.a
|
||||
|
||||
$(LZ4CAT): samplesrc/lz4cat.pla inc/lz4.plh $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/lz4cat.pla > samplesrc/lz4cat.a
|
||||
./$(PLASM) -AMOW samplesrc/lz4cat.pla
|
||||
acme --setpc 4094 -o $(LZ4CAT) samplesrc/lz4cat.a
|
||||
|
||||
$(RPNCALC): samplesrc/rpncalc.pla libsrc/fpu.pla inc/fpu.plh libsrc/fpstr.pla inc/fpstr.plh inc/conio.plh $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/rpncalc.pla > samplesrc/rpncalc.a
|
||||
./$(PLASM) -AMOW samplesrc/rpncalc.pla
|
||||
acme --setpc 4094 -o $(RPNCALC) samplesrc/rpncalc.a
|
||||
|
||||
$(ETHERIP): libsrc/etherip.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/etherip.pla > libsrc/etherip.a
|
||||
./$(PLASM) -AMOW libsrc/etherip.pla
|
||||
acme --setpc 4094 -o $(ETHERIP) libsrc/etherip.a
|
||||
|
||||
$(INET): libsrc/inet.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/inet.pla > libsrc/inet.a
|
||||
./$(PLASM) -AMOW libsrc/inet.pla
|
||||
acme --setpc 4094 -o $(INET) libsrc/inet.a
|
||||
|
||||
$(DHCP): libsrc/dhcp.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/dhcp.pla > libsrc/dhcp.a
|
||||
./$(PLASM) -AMOW libsrc/dhcp.pla
|
||||
acme --setpc 4094 -o $(DHCP) libsrc/dhcp.a
|
||||
|
||||
$(HTTPD): samplesrc/httpd.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/httpd.pla > samplesrc/httpd.a
|
||||
./$(PLASM) -AMOW samplesrc/httpd.pla
|
||||
acme --setpc 4094 -o $(HTTPD) samplesrc/httpd.a
|
||||
|
||||
$(TFTPD): utilsrc/tftpd.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < utilsrc/tftpd.pla > utilsrc/tftpd.a
|
||||
./$(PLASM) -AMOW utilsrc/tftpd.pla
|
||||
acme --setpc 4094 -o $(TFTPD) utilsrc/tftpd.a
|
||||
|
||||
$(MOUSE): libsrc/apple/mouse.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/apple/mouse.pla > libsrc/apple/mouse.a
|
||||
./$(PLASM) -AMOW libsrc/apple/mouse.pla
|
||||
acme --setpc 4094 -o $(MOUSE) libsrc/apple/mouse.a
|
||||
|
||||
$(UTHERNET): libsrc/apple/uthernet.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/apple/uthernet.pla > libsrc/apple/uthernet.a
|
||||
./$(PLASM) -AMOW libsrc/apple/uthernet.pla
|
||||
acme --setpc 4094 -o $(UTHERNET) libsrc/apple/uthernet.a
|
||||
|
||||
$(UTHERNET2): libsrc/apple/uthernet2.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/apple/uthernet2.pla > libsrc/apple/uthernet2.a
|
||||
./$(PLASM) -AMOW libsrc/apple/uthernet2.pla
|
||||
acme --setpc 4094 -o $(UTHERNET2) libsrc/apple/uthernet2.a
|
||||
|
||||
$(FILEIO_APL): libsrc/apple/fileio.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/apple/fileio.pla > libsrc/apple/fileio.a
|
||||
./$(PLASM) -AMOW libsrc/apple/fileio.pla
|
||||
acme --setpc 4094 -o $(FILEIO_APL) libsrc/apple/fileio.a
|
||||
|
||||
$(CONIO_APL): libsrc/apple/conio.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/apple/conio.pla > libsrc/apple/conio.a
|
||||
./$(PLASM) -AMOW libsrc/apple/conio.pla
|
||||
acme --setpc 4094 -o $(CONIO_APL) libsrc/apple/conio.a
|
||||
|
||||
$(FILEIO_C64): libsrc/c64/fileio.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/c64/fileio.pla > libsrc/c64/fileio.a
|
||||
./$(PLASM) -AMOW libsrc/c64/fileio.pla
|
||||
acme --setpc 4094 -o $(FILEIO_C64) libsrc/c64/fileio.a
|
||||
|
||||
$(CONIO_C64): libsrc/c64/conio.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/c64/conio.pla > libsrc/c64/conio.a
|
||||
./$(PLASM) -AMOW libsrc/c64/conio.pla
|
||||
acme --setpc 4094 -o $(CONIO_C64) libsrc/c64/conio.a
|
||||
|
||||
$(SNDSEQ): libsrc/apple/sndseq.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/apple/sndseq.pla > libsrc/apple/sndseq.a
|
||||
./$(PLASM) -AMOW libsrc/apple/sndseq.pla
|
||||
acme --setpc 4094 -o $(SNDSEQ) libsrc/apple/sndseq.a
|
||||
|
||||
$(PLAYSEQ): samplesrc/playseq.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/playseq.pla > samplesrc/playseq.a
|
||||
./$(PLASM) -AMOW samplesrc/playseq.pla
|
||||
acme --setpc 4094 -o $(PLAYSEQ) samplesrc/playseq.a
|
||||
|
||||
$(GRAFIX): libsrc/apple/grafix.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/apple/grafix.pla > libsrc/apple/grafix.a
|
||||
./$(PLASM) -AMOW libsrc/apple/grafix.pla
|
||||
acme --setpc 4094 -o $(GRAFIX) libsrc/apple/grafix.a
|
||||
|
||||
$(GFXDEMO): samplesrc/gfxdemo.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/gfxdemo.pla > samplesrc/gfxdemo.a
|
||||
./$(PLASM) -AMOW samplesrc/gfxdemo.pla
|
||||
acme --setpc 4094 -o $(GFXDEMO) samplesrc/gfxdemo.a
|
||||
|
||||
$(FATCAT): samplesrc/fatcat.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/fatcat.pla > samplesrc/fatcat.a
|
||||
./$(PLASM) -AMOW samplesrc/fatcat.pla
|
||||
acme --setpc 4094 -o $(FATCAT) samplesrc/fatcat.a
|
||||
|
||||
$(FATGET): samplesrc/fatget.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/fatget.pla > samplesrc/fatget.a
|
||||
./$(PLASM) -AMOW samplesrc/fatget.pla
|
||||
acme --setpc 4094 -o $(FATGET) samplesrc/fatget.a
|
||||
|
||||
$(FATPUT): samplesrc/fatput.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/fatput.pla > samplesrc/fatput.a
|
||||
./$(PLASM) -AMOW samplesrc/fatput.pla
|
||||
acme --setpc 4094 -o $(FATPUT) samplesrc/fatput.a
|
||||
|
||||
$(FATWDSK): samplesrc/fatwritedsk.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/fatwritedsk.pla > samplesrc/fatwritedsk.a
|
||||
./$(PLASM) -AMOW samplesrc/fatwritedsk.pla
|
||||
acme --setpc 4094 -o $(FATWDSK) samplesrc/fatwritedsk.a
|
||||
|
||||
$(FATRDSK): samplesrc/fatreaddsk.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/fatreaddsk.pla > samplesrc/fatreaddsk.a
|
||||
./$(PLASM) -AMOW samplesrc/fatreaddsk.pla
|
||||
acme --setpc 4094 -o $(FATRDSK) samplesrc/fatreaddsk.a
|
||||
|
||||
$(SDFAT): libsrc/apple/sdfat.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/apple/sdfat.pla > libsrc/apple/sdfat.a
|
||||
./$(PLASM) -AMOW libsrc/apple/sdfat.pla
|
||||
acme --setpc 4094 -o $(SDFAT) libsrc/apple/sdfat.a
|
||||
|
||||
$(SPIPORT): libsrc/apple/spiport.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/apple/spiport.pla > libsrc/apple/spiport.a
|
||||
./$(PLASM) -AMOW libsrc/apple/spiport.pla
|
||||
acme --setpc 4094 -o $(SPIPORT) libsrc/apple/spiport.a
|
||||
|
||||
$(JOYBUZZ): libsrc/apple/joybuzz.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/apple/joybuzz.pla > libsrc/apple/joybuzz.a
|
||||
./$(PLASM) -AMOW libsrc/apple/joybuzz.pla
|
||||
acme --setpc 4094 -o $(JOYBUZZ) libsrc/apple/joybuzz.a
|
||||
|
||||
$(PORTIO): libsrc/apple/portio.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/apple/portio.pla > libsrc/apple/portio.a
|
||||
./$(PLASM) -AMOW libsrc/apple/portio.pla
|
||||
acme --setpc 4094 -o $(PORTIO) libsrc/apple/portio.a
|
||||
|
||||
$(HGRLIB): libsrc/apple/hgrlib.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/apple/hgrlib.pla > libsrc/apple/hgrlib.a
|
||||
./$(PLASM) -AMOW libsrc/apple/hgrlib.pla
|
||||
acme --setpc 4094 -o $(HGRLIB) libsrc/apple/hgrlib.a
|
||||
|
||||
$(GRLIB): libsrc/apple/grlib.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/apple/grlib.pla > libsrc/apple/grlib.a
|
||||
./$(PLASM) -AMOW libsrc/apple/grlib.pla
|
||||
acme --setpc 4094 -o $(GRLIB) libsrc/apple/grlib.a
|
||||
|
||||
$(DGRLIB): libsrc/apple/dgrlib.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/apple/dgrlib.pla > libsrc/apple/dgrlib.a
|
||||
./$(PLASM) -AMOW libsrc/apple/dgrlib.pla
|
||||
acme --setpc 4094 -o $(DGRLIB) libsrc/apple/dgrlib.a
|
||||
|
||||
$(TILETEST): samplesrc/tiletest.pla $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/tiletest.pla > samplesrc/tiletest.a
|
||||
./$(PLASM) -AMOW samplesrc/tiletest.pla
|
||||
acme --setpc 4094 -o $(TILETEST) samplesrc/tiletest.a
|
||||
|
||||
$(HGRTILE): libsrc/apple/hgrtile.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/apple/hgrtile.pla > libsrc/apple/hgrtile.a
|
||||
./$(PLASM) -AMOW libsrc/apple/hgrtile.pla
|
||||
acme --setpc 4094 -o $(HGRTILE) libsrc/apple/hgrtile.a
|
||||
|
||||
$(HGRFONT): libsrc/apple/hgrfont.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/apple/hgrfont.pla > libsrc/apple/hgrfont.a
|
||||
./$(PLASM) -AMOW libsrc/apple/hgrfont.pla
|
||||
acme --setpc 4094 -o $(HGRFONT) libsrc/apple/hgrfont.a
|
||||
|
||||
$(HGRSPRITE): libsrc/apple/hgrsprite.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/apple/hgrsprite.pla > libsrc/apple/hgrsprite.a
|
||||
./$(PLASM) -AMOW libsrc/apple/hgrsprite.pla
|
||||
acme --setpc 4094 -o $(HGRSPRITE) libsrc/apple/hgrsprite.a
|
||||
|
||||
$(HGRTEST): samplesrc/hgrtest.pla $(HGRLIB) $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/hgrtest.pla > samplesrc/hgrtest.a
|
||||
./$(PLASM) -AMOW samplesrc/hgrtest.pla
|
||||
acme --setpc 4094 -o $(HGRTEST) samplesrc/hgrtest.a
|
||||
|
||||
$(GRTEST): samplesrc/grtest.pla $(GRLIB) $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/grtest.pla > samplesrc/grtest.a
|
||||
./$(PLASM) -AMOW samplesrc/grtest.pla
|
||||
acme --setpc 4094 -o $(GRTEST) samplesrc/grtest.a
|
||||
|
||||
$(DGRTEST): samplesrc/dgrtest.pla $(DGRLIB) $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/dgrtest.pla > samplesrc/dgrtest.a
|
||||
./$(PLASM) -AMOW samplesrc/dgrtest.pla
|
||||
acme --setpc 4094 -o $(DGRTEST) samplesrc/dgrtest.a
|
||||
|
||||
$(MON): utilsrc/apple/mon.pla $(PLASM)
|
||||
./$(PLASM) -AMOW < utilsrc/apple/mon.pla > utilsrc/apple/mon.a
|
||||
./$(PLASM) -AMOW utilsrc/apple/mon.pla
|
||||
acme --setpc 4094 -o $(MON) utilsrc/apple/mon.a
|
||||
|
||||
$(COPY): utilsrc/apple/copy.pla $(PLASM)
|
||||
./$(PLASM) -AMOW < utilsrc/apple/copy.pla > utilsrc/apple/copy.a
|
||||
$(COPY): utilsrc/apple/copy.pla $(MATCHFILES) $(PLASM)
|
||||
./$(PLASM) -AMOW utilsrc/apple/copy.pla
|
||||
acme --setpc 4094 -o $(COPY) utilsrc/apple/copy.a
|
||||
|
||||
$(DEL): utilsrc/apple/del.pla $(PLASM)
|
||||
./$(PLASM) -AMOW < utilsrc/apple/del.pla > utilsrc/apple/del.a
|
||||
$(DEL): utilsrc/apple/del.pla $(MATCHFILES) $(PLASM)
|
||||
./$(PLASM) -AMOW utilsrc/apple/del.pla
|
||||
acme --setpc 4094 -o $(DEL) utilsrc/apple/del.a
|
||||
|
||||
$(REN): utilsrc/apple/ren.pla $(PLASM)
|
||||
./$(PLASM) -AMOW < utilsrc/apple/ren.pla > utilsrc/apple/ren.a
|
||||
./$(PLASM) -AMOW utilsrc/apple/ren.pla
|
||||
acme --setpc 4094 -o $(REN) utilsrc/apple/ren.a
|
||||
|
||||
$(CAT): utilsrc/apple/cat.pla $(PLASM)
|
||||
./$(PLASM) -AMOW < utilsrc/apple/cat.pla > utilsrc/apple/cat.a
|
||||
$(CAT): utilsrc/apple/cat.pla $(MATCHFILES) $(PLASM)
|
||||
./$(PLASM) -AMOW utilsrc/apple/cat.pla
|
||||
acme --setpc 4094 -o $(CAT) utilsrc/apple/cat.a
|
||||
|
||||
$(NEWDIR): utilsrc/apple/newdir.pla $(PLASM)
|
||||
./$(PLASM) -AMOW < utilsrc/apple/newdir.pla > utilsrc/apple/newdir.a
|
||||
./$(PLASM) -AMOW utilsrc/apple/newdir.pla
|
||||
acme --setpc 4094 -o $(NEWDIR) utilsrc/apple/newdir.a
|
||||
|
||||
$(TYPE): utilsrc/apple/type.pla $(PLASM)
|
||||
./$(PLASM) -AMOW < utilsrc/apple/type.pla > utilsrc/apple/type.a
|
||||
./$(PLASM) -AMOW utilsrc/apple/type.pla
|
||||
acme --setpc 4094 -o $(TYPE) utilsrc/apple/type.a
|
||||
|
||||
$(SOS): utilsrc/apple/sos.pla $(PLVM03) $(PLASM)
|
||||
./$(PLASM) -AMOW < utilsrc/apple/sos.pla > utilsrc/apple/sos.a
|
||||
./$(PLASM) -AMOW utilsrc/apple/sos.pla
|
||||
acme --setpc 4094 -o $(SOS) utilsrc/apple/sos.a
|
||||
|
||||
$(ZIP): utilsrc/apple/zip.pla $(PLASM)
|
||||
./$(PLASM) -AMOW < utilsrc/apple/zip.pla > utilsrc/apple/zip.a
|
||||
acme --setpc 4094 -o $(ZIP) utilsrc/apple/zip.a
|
||||
$(ZIPCHIP): utilsrc/apple/zipchip.pla $(PLASM)
|
||||
./$(PLASM) -AMOW utilsrc/apple/zipchip.pla
|
||||
acme --setpc 4094 -o $(ZIPCHIP) utilsrc/apple/zipchip.a
|
||||
|
||||
$(JIT): libsrc/apple/jit.pla libsrc/jitcore.pla $(PLVMJIT) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/apple/jit.pla > libsrc/apple/jit.a
|
||||
./$(PLASM) -AMOW libsrc/apple/jit.pla
|
||||
acme --setpc 4094 -o $(JIT) libsrc/apple/jit.a
|
||||
|
||||
$(JIT16): libsrc/apple/jit16.pla libsrc/jit16core.pla $(PLVMJIT) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/apple/jit16.pla > libsrc/apple/jit16.a
|
||||
./$(PLASM) -AMOW libsrc/apple/jit16.pla
|
||||
acme --setpc 4094 -o $(JIT16) libsrc/apple/jit16.a
|
||||
|
||||
$(JITUNE): utilsrc/apple/jitune.pla $(PLVMJIT) $(PLASM)
|
||||
./$(PLASM) -AMOW < utilsrc/apple/jitune.pla > utilsrc/apple/jitune.a
|
||||
./$(PLASM) -AMOW utilsrc/apple/jitune.pla
|
||||
acme --setpc 4094 -o $(JITUNE) utilsrc/apple/jitune.a
|
||||
|
||||
|
||||
|
||||
128
src/mkrel
128
src/mkrel
@@ -40,7 +40,7 @@ cp rel/apple/SNDSEQ#FE1000 prodos/sys/SNDSEQ.REL
|
||||
cp rel/apple/JIT#FE1000 prodos/sys/JIT.REL
|
||||
cp rel/apple/JIT16#FE1000 prodos/sys/JIT16.REL
|
||||
cp rel/apple/JITUNE#FE1000 prodos/sys/JITUNE.REL
|
||||
cp rel/apple/ZIP#FE1000 prodos/sys/ZIP.REL
|
||||
cp rel/apple/ZIPCHIP#FE1000 prodos/sys/ZIPCHIP.REL
|
||||
cp rel/LZ4#FE1000 prodos/sys/LZ4.REL
|
||||
cp rel/TFTPD#FE1000 prodos/sys/TFTPD.REL
|
||||
cp rel/INT32#FE1000 prodos/sys/INT32.REL
|
||||
@@ -52,12 +52,65 @@ cp ../sysfiles/ELEMS.CODE#060000 prodos/sys/ELEMS.CODE.BIN
|
||||
cp rel/apple/SOS#FE1000 prodos/sys/SOS.REL
|
||||
cp rel/apple/GRAFIX#FE1000 prodos/sys/GRAFIX.REL
|
||||
|
||||
rm -rf prodos/syspro
|
||||
mkdir prodos/syspro
|
||||
cp ../sysfiles/PRODOS#FF0000 prodos/syspro/PRODOS.SYS
|
||||
cp rel/apple/CMD#061000 prodos/syspro/CMD.BIN
|
||||
cp rel/apple/CMD128#061000 prodos/syspro/CMD128.BIN
|
||||
cp rel/apple/PLASMA.SYSTEM#FF2000 prodos/syspro/PLASMA.SYSTEM.SYS
|
||||
cp rel/apple/PLVM.128#FF2000 prodos/syspro/PLVM.128.SYS
|
||||
cp rel/apple/PLVM16#FF2000 prodos/syspro/PLVM16.SYS
|
||||
cp ../doc/Editor.md prodos/syspro/EDITOR.README.TXT
|
||||
|
||||
mkdir prodos/syspro/sys
|
||||
cp rel/apple/FILEIO#FE1000 prodos/syspro/sys/FILEIO.REL
|
||||
cp rel/apple/CONIO#FE1000 prodos/syspro/sys/CONIO.REL
|
||||
cp rel/LINES#FE1000 prodos/syspro/sys/LINES.REL
|
||||
cp rel/apple/HGRFONT#FE1000 prodos/syspro/sys/HGRFONT.REL
|
||||
cp rel/apple/HGRTILE#FE1000 prodos/syspro/sys/HGRTILE.REL
|
||||
cp rel/apple/HGRSPRITE#FE1000 prodos/syspro/sys/HGRSPRITE.REL
|
||||
cp rel/apple/HGRLIB#FE1000 prodos/syspro/sys/HGRLIB.REL
|
||||
cp rel/apple/GRLIB#FE1000 prodos/syspro/sys/GRLIB.REL
|
||||
cp rel/apple/DGRLIB#FE1000 prodos/syspro/sys/DGRLIB.REL
|
||||
cp rel/apple/COPY#FE1000 prodos/syspro/sys/COPY.REL
|
||||
cp rel/apple/DEL#FE1000 prodos/syspro/sys/DEL.REL
|
||||
cp rel/apple/REN#FE1000 prodos/syspro/sys/REN.REL
|
||||
cp rel/apple/CAT#FE1000 prodos/syspro/sys/CAT.REL
|
||||
cp rel/apple/NEWDIR#FE1000 prodos/syspro/sys/NEWDIR.REL
|
||||
cp rel/apple/TYPE#FE1000 prodos/syspro/sys/TYPE.REL
|
||||
cp rel/apple/MATCHFILES#FE1000 prodos/syspro/sys/MATCHFILES.REL
|
||||
cp rel/ARGS#FE1000 prodos/syspro/sys/ARGS.REL
|
||||
cp rel/ED#FE1000 prodos/syspro/sys/ED.REL
|
||||
cp rel/FIBER#FE1000 prodos/syspro/sys/FIBER.REL
|
||||
cp rel/LONGJMP#FE1000 prodos/syspro/sys/LONGJMP.REL
|
||||
cp rel/MEMMGR#FE1000 prodos/syspro/sys/MEMMGR.REL
|
||||
cp rel/apple/MOUSE#FE1000 prodos/syspro/sys/MOUSE.REL
|
||||
cp rel/apple/PORTIO#FE1000 prodos/syspro/sys/PORTIO.REL
|
||||
cp rel/apple/JOYBUZZ#FE1000 prodos/syspro/sys/JOYBUZZ.REL
|
||||
cp rel/apple/SNDSEQ#FE1000 prodos/syspro/sys/SNDSEQ.REL
|
||||
cp rel/apple/JIT#FE1000 prodos/syspro/sys/JIT.REL
|
||||
cp rel/apple/JIT16#FE1000 prodos/syspro/sys/JIT16.REL
|
||||
cp rel/apple/JITUNE#FE1000 prodos/syspro/sys/JITUNE.REL
|
||||
cp rel/apple/ZIPCHIP#FE1000 prodos/syspro/sys/ZIPCHIP.REL
|
||||
cp rel/LZ4#FE1000 prodos/syspro/sys/LZ4.REL
|
||||
cp rel/INT32#FE1000 prodos/syspro/sys/INT32.REL
|
||||
|
||||
rm -rf prodos/sysinet
|
||||
mkdir prodos/sysinet
|
||||
mkdir prodos/sysinet/sys
|
||||
cp rel/INET#FE1000 prodos/sysinet/sys/INET.REL
|
||||
cp rel/DHCP#FE1000 prodos/sysinet/sys/DHCP.REL
|
||||
cp rel/ETHERIP#FE1000 prodos/sysinet/sys/ETHERIP.REL
|
||||
cp rel/apple/UTHERNET2#FE1000 prodos/sysinet/sys/UTHERNET2.REL
|
||||
cp rel/apple/UTHERNET#FE1000 prodos/sysinet/sys/UTHERNET.REL
|
||||
cp rel/TFTPD#FE1000 prodos/sysinet/sys/TFTPD.REL
|
||||
|
||||
rm -rf prodos/fpsos
|
||||
mkdir prodos/fpsos
|
||||
cp ../sysfiles/SOS.KERNEL#0C0000 prodos/fpsos/SOS.KERNEL.\$0C
|
||||
cp ../sysfiles/SOS.DRIVER#0C0000 prodos/fpsos/SOS.DRIVER.\$0C
|
||||
cp rel/apple/SOS.INTERP#050000 prodos/fpsos/SOS.INTERP.\$05
|
||||
cp rel/apple/SOS.CMD#FE1000 prodos/fpsos/SOS.CMD.REL
|
||||
cp rel/apple/SOS.INTERP#050000 prodos/fpsos/SOS.INTERP.\$05
|
||||
cp rel/apple/SOS.CMD#FE1000 prodos/fpsos/SOS.CMD.REL
|
||||
cp rel/apple/SOS.INTERPJIT#050000 prodos/fpsos/SOS.INTERPJIT.\$05
|
||||
cp rel/apple/SOS.CMDJIT#FE1000 prodos/fpsos/SOS.CMDJIT.REL
|
||||
|
||||
@@ -72,20 +125,13 @@ cp ../sysfiles/ELEMS.CODE#060000 prodos/fpsos/sys/ELEMS.CODE.BIN
|
||||
|
||||
rm -rf prodos/demos
|
||||
mkdir prodos/demos
|
||||
cp rel/INT32TEST#FE1000 prodos/demos/INT32TEST.REL
|
||||
cp rel/apple/TILETEST#FE1000 prodos/demos/TILETEST.REL
|
||||
cp rel/apple/HGRTEST#FE1000 prodos/demos/HGRTEST.REL
|
||||
cp rel/apple/GRTEST#FE1000 prodos/demos/GRTEST.REL
|
||||
cp rel/apple/DGRTEST#FE1000 prodos/demos/DGRTEST.REL
|
||||
cp rel/apple/HGRTEST#FE1000 prodos/demos/HGRTEST.REL
|
||||
cp rel/apple/ROD#FE1000 prodos/demos/ROD.REL
|
||||
cp rel/RPNCALC#FE1000 prodos/demos/RPNCALC.REL
|
||||
cp rel/LZ4CAT#FE1000 prodos/demos/LZ4CAT.REL
|
||||
cp rel/PRIMEGAP#FE1000 prodos/demos/PRIMEGAP.REL
|
||||
|
||||
mkdir prodos/demos/spiders
|
||||
cp rel/apple/SFM#FE1000 prodos/demos/spiders/SFM.REL
|
||||
cp rel/apple/SFMSPRT#FE1000 prodos/demos/spiders/SFMSPRT.REL
|
||||
cp rel/INT32TEST#FE1000 prodos/demos/INT32TEST.REL
|
||||
cp rel/apple/CONIOTST#FE1000 prodos/demos/CONIOTST.REL
|
||||
cp rel/apple/ROD#FE1000 prodos/demos/ROD.REL
|
||||
cp rel/RPNCALC#FE1000 prodos/demos/RPNCALC.REL
|
||||
cp rel/LZ4CAT#FE1000 prodos/demos/LZ4CAT.REL
|
||||
cp ../doc/ROGUE.LZ4.BIN prodos/demos/ROGUE.LZ4.BIN
|
||||
cp rel/PRIMEGAP#FE1000 prodos/demos/PRIMEGAP.REL
|
||||
|
||||
mkdir prodos/demos/rogue
|
||||
cp rel/ROGUE#FE1000 prodos/demos/rogue/ROGUE.REL
|
||||
@@ -94,27 +140,37 @@ cp rel/ROGUEMAP#FE1000 prodos/demos/rogue/ROGUEMAP.REL
|
||||
cp samplesrc/LEVEL0#040000 prodos/demos/rogue/LEVEL0.TXT
|
||||
cp samplesrc/LEVEL1#040000 prodos/demos/rogue/LEVEL1.TXT
|
||||
|
||||
mkdir prodos/demos/sdutils
|
||||
cp rel/apple/SPIPORT#FE1000 prodos/demos/sdutils/SPIPORT.REL
|
||||
cp rel/apple/SDFAT#FE1000 prodos/demos/sdutils/SDFAT.REL
|
||||
cp rel/apple/FATCAT#FE1000 prodos/demos/sdutils/FATCAT.REL
|
||||
cp rel/apple/FATGET#FE1000 prodos/demos/sdutils/FATGET.REL
|
||||
cp rel/apple/FATPUT#FE1000 prodos/demos/sdutils/FATPUT.REL
|
||||
cp rel/apple/FATREADDSK#FE1000 prodos/demos/sdutils/FATREADDSK.REL
|
||||
cp rel/apple/FATWRITEDSK#FE1000 prodos/demos/sdutils/FATWRITEDSK.REL
|
||||
|
||||
mkdir prodos/demos/apple3
|
||||
cp rel/apple/GFXDEMO#FE1000 prodos/demos/apple3/GFXDEMO.REL
|
||||
cp samplesrc/APPLE3.PIX#060000 prodos/demos/apple3/APPLE3.PIX.BIN
|
||||
mkdir prodos/demos/music
|
||||
cp rel/apple/PLAYSEQ#FE1000 prodos/demos/music/PLAYSEQ.REL
|
||||
cp mockingboard/ultima3.seq prodos/demos/music/ULTIMA3.SEQ.BIN
|
||||
cp mockingboard/startrek.seq prodos/demos/music/STARTREK.SEQ.BIN
|
||||
|
||||
mkdir prodos/demos/net
|
||||
cp rel/HTTPD#FE1000 prodos/demos/net/HTTPD.REL
|
||||
cp samplesrc/index.html prodos/demos/net/INDEX.HTML.TXT
|
||||
|
||||
mkdir prodos/demos/music
|
||||
cp rel/apple/PLAYSEQ#FE1000 prodos/demos/music/PLAYSEQ.REL
|
||||
cp mockingboard/ultima3.seq prodos/demos/music/ULTIMA3.SEQ.BIN
|
||||
cp mockingboard/startrek.seq prodos/demos/music/STARTREK.SEQ.BIN
|
||||
mkdir prodos/demos/apple2
|
||||
cp rel/apple/TILETEST#FE1000 prodos/demos/apple2/TILETEST.REL
|
||||
cp rel/apple/HGRTEST#FE1000 prodos/demos/apple2/HGRTEST.REL
|
||||
cp rel/apple/GRTEST#FE1000 prodos/demos/apple2/GRTEST.REL
|
||||
cp rel/apple/DGRTEST#FE1000 prodos/demos/apple2/DGRTEST.REL
|
||||
|
||||
mkdir prodos/demos/apple2/spiders
|
||||
cp rel/apple/SFM#FE1000 prodos/demos/apple2/spiders/SFM.REL
|
||||
cp rel/apple/SFMSPRT#FE1000 prodos/demos/apple2/spiders/SFMSPRT.REL
|
||||
|
||||
mkdir prodos/demos/apple2/sdutils
|
||||
cp rel/apple/SPIPORT#FE1000 prodos/demos/apple2/sdutils/SPIPORT.REL
|
||||
cp rel/apple/SDFAT#FE1000 prodos/demos/apple2/sdutils/SDFAT.REL
|
||||
cp rel/apple/FATCAT#FE1000 prodos/demos/apple2/sdutils/FATCAT.REL
|
||||
cp rel/apple/FATGET#FE1000 prodos/demos/apple2/sdutils/FATGET.REL
|
||||
cp rel/apple/FATPUT#FE1000 prodos/demos/apple2/sdutils/FATPUT.REL
|
||||
cp rel/apple/FATREADDSK#FE1000 prodos/demos/apple2/sdutils/FATREADDSK.REL
|
||||
cp rel/apple/FATWRITEDSK#FE1000 prodos/demos/apple2/sdutils/FATWRITEDSK.REL
|
||||
|
||||
mkdir prodos/demos/apple3
|
||||
cp rel/apple/GFXDEMO#FE1000 prodos/demos/apple3/GFXDEMO.REL
|
||||
cp samplesrc/APPLE3.PIX#060000 prodos/demos/apple3/APPLE3.PIX.BIN
|
||||
|
||||
rm -rf prodos/bld
|
||||
mkdir prodos/bld
|
||||
@@ -124,6 +180,7 @@ cp rel/CODEOPT#FE1000 prodos/bld/CODEOPT.REL
|
||||
mkdir prodos/bld/samples
|
||||
cp samplesrc/hello.pla prodos/bld/samples/HELLO.PLA.TXT
|
||||
cp samplesrc/int32test.pla prodos/bld/samples/INT32TEST.PLA.TXT
|
||||
cp samplesrc/coniotst.pla prodos/bld/samples/CONIOTST.PLA.TXT
|
||||
cp samplesrc/grtest.pla prodos/bld/samples/GRTEST.PLA.TXT
|
||||
cp samplesrc/dgrtest.pla prodos/bld/samples/DGRTEST.PLA.TXT
|
||||
cp samplesrc/hgrtest.pla prodos/bld/samples/HGRTEST.PLA.TXT
|
||||
@@ -139,9 +196,12 @@ cp samplesrc/playseq.pla prodos/bld/samples/PLAYSEQ.PLA.TXT
|
||||
cp samplesrc/rpncalc.pla prodos/bld/samples/RPNCALC.PLA.TXT
|
||||
cp samplesrc/fatcat.pla prodos/bld/samples/FATCAT.PLA.TXT
|
||||
cp samplesrc/gfxdemo.pla prodos/bld/samples/GFXDEMO.PLA.TXT
|
||||
cp samplesrc/lz4cat.pla prodos/bld/samples/Z4CAT.PLA.TXT
|
||||
cp samplesrc/lz4cat.pla prodos/bld/samples/LZ4CAT.PLA.TXT
|
||||
cp samplesrc/sfm.pla prodos/bld/samples/SFM.PLA.TXT
|
||||
cp samplesrc/sfmsprt.pla prodos/bld/samples/SFMSPRT.PLA.TXT
|
||||
cp samplesrc/fppow.pla prodos/bld/samples/FPPOW.PLA.TXT
|
||||
cp utilsrc/apple/mon.pla prodos/bld/samples/MON.PLA.TXT
|
||||
cp utilsrc/apple/zipchip.pla prodos/bld/samples/ZIPCHIP.PLA.TXT
|
||||
|
||||
#mkdir prodos/bld/examples
|
||||
#cp samplesrc/examples/ex.1.pla prodos/bld/examples/EX.1.PLA.TXT
|
||||
|
||||
@@ -8,7 +8,7 @@ optarg = 1
|
||||
timescale = 16.0 # Scale time to 16th of a second
|
||||
extperchan = 9 # Default to standard MIDI channel 10 for extra percussion
|
||||
if len(sys.argv) == 1:
|
||||
print 'Usage:', sys.argv[0], '[-p extra_percussion_channel] [-t timescale] MIDI_file'
|
||||
print('Usage:', sys.argv[0], '[-p extra_percussion_channel] [-t timescale] MIDI_file')
|
||||
sys.exit(0)
|
||||
# Parse optional arguments
|
||||
while optarg < (len(sys.argv) - 1):
|
||||
@@ -45,15 +45,15 @@ for msg in mid:
|
||||
# Percussion
|
||||
#
|
||||
if vol > 0:
|
||||
print '\t!BYTE\t${0:02X}, ${1:02X}, ${2:02X}\t; Percussion {3:d} Chan {4:d} Dur {5:d}'.format(deltatime, msg.note ^ 0x40, (lrchan << 7) | vol, msg.note, msg.channel + 1, vol)
|
||||
print('\t!BYTE\t${0:02X}, ${1:02X}, ${2:02X}\t; Percussion {3:d} Chan {4:d} Dur {5:d}'.format(deltatime, msg.note ^ 0x40, (lrchan << 7) | vol, msg.note, msg.channel + 1, vol))
|
||||
if extperchan == 9: # Play percussion on both channels if no extended percussion
|
||||
print '\t!BYTE\t${0:02X}, ${1:02X}, ${2:02X}\t; Percussion {3:d} Chan {4:d} Dur {5:d}'.format(0, msg.note ^ 0x40, vol, msg.note, msg.channel + 1, vol)
|
||||
print('\t!BYTE\t${0:02X}, ${1:02X}, ${2:02X}\t; Percussion {3:d} Chan {4:d} Dur {5:d}'.format(0, msg.note ^ 0x40, vol, msg.note, msg.channel + 1, vol))
|
||||
eventtime = 0.0
|
||||
else:
|
||||
#
|
||||
# Note
|
||||
#
|
||||
print '\t!BYTE\t${0:02X}, ${1:02X}, ${2:02X}\t; Note {3:d} Chan {4:d} Vol {5:d}'.format(deltatime, 0x80 | (octave << 4) | onote, (lrchan << 7) | vol, msg.note, msg.channel + 1, vol)
|
||||
print('\t!BYTE\t${0:02X}, ${1:02X}, ${2:02X}\t; Note {3:d} Chan {4:d} Vol {5:d}'.format(deltatime, 0x80 | (octave << 4) | onote, (lrchan << 7) | vol, msg.note, msg.channel + 1, vol))
|
||||
eventtime = 0.0
|
||||
elif msg.type == 'set_tempo':
|
||||
pass
|
||||
@@ -65,4 +65,4 @@ for msg in mid:
|
||||
pass
|
||||
elif msg.type == 'program_change':
|
||||
pass
|
||||
print '\t!BYTE\t${0:02X}, $00, $00'.format(int(eventtime + 0.5))
|
||||
print('\t!BYTE\t${0:02X}, $00, $00'.format(int(eventtime + 0.5)))
|
||||
|
||||
31
src/samplesrc/coniotst.pla
Normal file
31
src/samplesrc/coniotst.pla
Normal file
@@ -0,0 +1,31 @@
|
||||
// text screen
|
||||
include "inc/cmdsys.plh"
|
||||
include "inc/conio.plh"
|
||||
const SCR_PTR = $0400
|
||||
const SCR_SIZE = 1024
|
||||
|
||||
byte[SCR_SIZE] ScrSave
|
||||
byte I
|
||||
word Name
|
||||
|
||||
// save text screen
|
||||
memcpy(@ScrSave, SCR_PTR, SCR_SIZE)
|
||||
conio:home()
|
||||
for I=0 to 23
|
||||
conio:gotoxy(I,I)
|
||||
putc('A'+I)
|
||||
putc(' ')
|
||||
puti(I)
|
||||
next
|
||||
conio:gotoxy(10, 5)
|
||||
puts("What is your name")
|
||||
Name = gets('?'|$80) // $BF
|
||||
conio:gotoxy(12, 7)
|
||||
puts("Nice to meet you, ")
|
||||
puts(Name)
|
||||
conio:gotoxy(16, 10)
|
||||
puts("Press any key ...")
|
||||
getc()
|
||||
conio:gotoxy(0, 5)
|
||||
memcpy(SCR_PTR, @ScrSave, SCR_SIZE)
|
||||
done
|
||||
@@ -19,6 +19,5 @@ fbrInit(4)
|
||||
fbrStart(@fbrTest, 3)
|
||||
fbrStart(@fbrTest, 2)
|
||||
fbrStart(@fbrTest, 1)
|
||||
fbrYield; fbrYield; fbrYield; fbrYield
|
||||
|
||||
while fbrCount > 1; fbrYield; loop
|
||||
done
|
||||
|
||||
44
src/samplesrc/fppow.pla
Normal file
44
src/samplesrc/fppow.pla
Normal file
@@ -0,0 +1,44 @@
|
||||
include "inc/cmdsys.plh"
|
||||
include "inc/sane.plh"
|
||||
include "inc/fpstr.plh"
|
||||
|
||||
var xT[t_extended]
|
||||
char sT[32] // extra space
|
||||
byte str = "123456789.123456789"
|
||||
byte i
|
||||
|
||||
// mul div
|
||||
def test(iM, iD)#0
|
||||
sane:saveZP()
|
||||
sane:op2FP(FFINT|FOMUL, @xT, @iM)
|
||||
sane:op2FP(FFINT|FODIV, @xT, @iD)
|
||||
sane:restoreZP(0)
|
||||
|
||||
putc('x')
|
||||
if iM<10; putc(' '); fin
|
||||
puti(iM); putc('/'); puti(iD)
|
||||
if iD<10; putc(' '); fin
|
||||
puts("=>")
|
||||
ext2str(@xT,@sT,9,9,FPSTR_FLEX|FPSTR_FIXED) // fixed
|
||||
puts(@sT); putc('[')
|
||||
puti( sT); putc(']')
|
||||
putln
|
||||
end
|
||||
|
||||
puts("Float Format Text\n\n")
|
||||
sane:initFP()
|
||||
strcpy(@sT,@str); str2ext(@sT,@xT)
|
||||
puts("begin: ")
|
||||
puts(@sT); putc('[')
|
||||
puti( sT); putc(']')
|
||||
putln
|
||||
test(1,1)
|
||||
for i=1 to 10
|
||||
test(32000,1)
|
||||
next
|
||||
strcpy(@sT,@str); str2ext(@sT,@xT)
|
||||
for i=1 to 10
|
||||
test(1,2)
|
||||
next
|
||||
puts("Done\n")
|
||||
done
|
||||
@@ -15,7 +15,6 @@ byte = $83, $31, $11, $13, $38
|
||||
byte = $88, $33, $11, $33, $88
|
||||
byte = $88, $83, $33, $38, $88
|
||||
var sprtBall
|
||||
|
||||
def testline#0
|
||||
var i
|
||||
|
||||
|
||||
@@ -5,7 +5,8 @@ include "inc/cmdsys.plh"
|
||||
include "inc/fpstr.plh"
|
||||
include "inc/fpu.plh"
|
||||
include "inc/conio.plh"
|
||||
const displayWidth = 16
|
||||
const displayWidth = 15
|
||||
const displayDefFix = 6
|
||||
const inputLen = displayWidth+1
|
||||
const ZEROSTR = $3001
|
||||
//
|
||||
@@ -36,8 +37,8 @@ byte inputStr[32] = ""
|
||||
//
|
||||
// Display format state
|
||||
//
|
||||
byte displayFix = 6
|
||||
byte displayInt = displayWidth - 7 // - displayFix - 1
|
||||
byte displayFix = displayDefFix
|
||||
byte displayInt = displayWidth - displayDefFix - 2
|
||||
//
|
||||
// Store/load memory
|
||||
//
|
||||
@@ -152,9 +153,10 @@ def showStack#0
|
||||
byte strFP[displayWidth+1]
|
||||
|
||||
for s = 0 to 3
|
||||
fpu:storStr(@strFP, displayInt, displayFix, FPSTR_FIXED, s)
|
||||
fpu:storStr(@strFP, displayInt, displayFix, FPSTR_FIXED|FPSTR_FLEX, s)
|
||||
conio:gotoxy(4, 5 - s)
|
||||
repc(displayWidth - strFP - 1, ' ')
|
||||
//repc(displayWidth - strFP - 1, ' ')
|
||||
repc(displayWidth - strFP, ' ')
|
||||
puts(@strFP)
|
||||
next
|
||||
end
|
||||
@@ -163,7 +165,7 @@ def showMem#0
|
||||
byte strFP[displayWidth+1]
|
||||
|
||||
for m = 0 to 9
|
||||
ext2str(@memory[m*t_fpureg], @strFP, displayInt, displayFix, FPSTR_FIXED)
|
||||
ext2str(@memory[m*t_fpureg], @strFP, displayInt, displayFix, FPSTR_FIXED|FPSTR_FLEX)
|
||||
conio:gotoxy(23, 2 + m)
|
||||
repc(displayWidth - strFP - 1, ' ')
|
||||
puts(@strFP)
|
||||
@@ -252,7 +254,7 @@ def delKey(pkey)#0
|
||||
showInput
|
||||
end
|
||||
def dropKey(pkey)#0
|
||||
fpu:pullStr(@inputStr, displayInt, displayFix, FPSTR_STRIP|FPSTR_FLOAT)
|
||||
fpu:pullStr(@inputStr, displayInt, displayFix, FPSTR_STRIP|FPSTR_FLOAT|FPSTR_FLEX)
|
||||
if inputStr.1 == ' '
|
||||
inputStr--
|
||||
memcpy(@inputStr.1, @inputStr.2, inputStr)
|
||||
@@ -261,7 +263,7 @@ def dropKey(pkey)#0
|
||||
showStack
|
||||
end
|
||||
def copyKey(pkey)#0
|
||||
fpu:storStr(@inputStr, displayInt, displayFix, FPSTR_STRIP|FPSTR_FLOAT, X_REG)
|
||||
fpu:storStr(@inputStr, displayInt, displayFix, FPSTR_STRIP|FPSTR_FLOAT|FPSTR_FLEX, X_REG)
|
||||
if inputStr.1 == ' '
|
||||
inputStr--
|
||||
memcpy(@inputStr.1, @inputStr.2, inputStr)
|
||||
@@ -380,7 +382,7 @@ def elemsKey(pkey)#0
|
||||
is 'L'
|
||||
fpu:log2X()
|
||||
break
|
||||
is 'E'
|
||||
is 'P'
|
||||
fpu:powEX()
|
||||
break
|
||||
is 'N'
|
||||
@@ -403,7 +405,7 @@ def cmdKey(pkey)#0
|
||||
d = toupper(getc) - '0'
|
||||
if d >= 1 and d <= 9
|
||||
displayFix = d
|
||||
displayInt = displayWidth - displayFix - 1
|
||||
displayInt = displayWidth - displayFix - 2
|
||||
elsif d == 'Q' - '0'
|
||||
quit = TRUE
|
||||
fin
|
||||
@@ -422,7 +424,7 @@ end
|
||||
def inputKey#0
|
||||
byte inkey
|
||||
word pkeys
|
||||
|
||||
|
||||
conio:echo(ECHO_OFF)
|
||||
while not quit
|
||||
pkeys = @keypad
|
||||
@@ -450,7 +452,7 @@ initInput
|
||||
showStack
|
||||
showMem
|
||||
showInput
|
||||
showStatus("Version 0.6")
|
||||
showStatus("Version 0.7")
|
||||
inputKey
|
||||
conio:gotoxy(0, 22)
|
||||
done
|
||||
|
||||
108
src/tftpbld
108
src/tftpbld
@@ -1,61 +1,61 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Build tools
|
||||
echo "BLD/PLASM"; atftp $1 --put -l rel/PLASM#FE1000 -r $2/BLD/PLASM#FE1000
|
||||
echo "BLD/CODEOPT"; atftp $1 --put -l rel/CODEOPT#FE1000 -r $2/BLD/CODEOPT#FE1000
|
||||
echo "BLD/PLASM"; atftp --option "disable windowsize" $1 --put -l rel/PLASM#FE1000 -r $2/BLD/PLASM#FE1000
|
||||
echo "BLD/CODEOPT"; atftp --option "disable windowsize" $1 --put -l rel/CODEOPT#FE1000 -r $2/BLD/CODEOPT#FE1000
|
||||
|
||||
#Build incs
|
||||
echo "BLD/INC/ARGS.PLH"; atftp $1 --put -l inc/args.plh -r $2/BLD/INC/ARGS.PLH#040000
|
||||
echo "BLD/INC/MATCHFILES.PLH"; atftp $1 --put -l inc/matchfiles.plh -r $2/BLD/INC/MATCHFILES.PLH#040000
|
||||
echo "BLD/INC/CMDSYS.PLH"; atftp $1 --put -l inc/cmdsys.plh -r $2/BLD/INC/CMDSYS.PLH#040000
|
||||
echo "BLD/INC/CONIO.PLH"; atftp $1 --put -l inc/conio.plh -r $2/BLD/INC/CONIO.PLH#040000
|
||||
echo "BLD/INC/LINES.PLH"; atftp $1 --put -l inc/lines.plh -r $2/BLD/INC/LINES.PLH#040000
|
||||
echo "BLD/INC/HGRTILE.PLH"; atftp $1 --put -l inc/hgrtile.plh -r $2/BLD/INC/HGRTILE.PLH#040000
|
||||
echo "BLD/INC/HGRFONT.PLH";atftp $1 --put -l inc/hgrfont.plh -r $2/BLD/INC/HGRFONT.PLH#040000
|
||||
echo "BLD/INC/HGRSPRITE.PLH";atftp $1 --put -l inc/hgrsprite.plh -r $2/BLD/INC/HGRSPRITE.PLH#040000
|
||||
echo "BLD/INC/HGRLIB.PLH"; atftp $1 --put -l inc/hgrlib.plh -r $2/BLD/INC/HGRLIB.PLH#040000
|
||||
echo "BLD/INC/GRLIB.PLH"; atftp $1 --put -l inc/grlib.plh -r $2/BLD/INC/GRLIB.PLH#040000
|
||||
echo "BLD/INC/DGRLIB.PLH"; atftp $1 --put -l inc/dgrlib.plh -r $2/BLD/INC/DGRLIB.PLH#040000
|
||||
echo "BLD/INC/FIBER.PLH"; atftp $1 --put -l inc/fiber.plh -r $2/BLD/INC/FIBER.PLH#040000
|
||||
echo "BLD/INC/FILEIO.PLH"; atftp $1 --put -l inc/fileio.plh -r $2/BLD/INC/FILEIO.PLH#040000
|
||||
echo "BLD/INC/INT32.PLH"; atftp $1 --put -l inc/int32.plh -r $2/BLD/INC/INT32.PLH#040000
|
||||
echo "BLD/INC/FPSTR.PLH"; atftp $1 --put -l inc/fpstr.plh -r $2/BLD/INC/FPSTR.PLH#040000
|
||||
echo "BLD/INC/FPU.PLH"; atftp $1 --put -l inc/fpu.plh -r $2/BLD/INC/FPU.PLH#040000
|
||||
echo "BLD/INC/GRAFIX.PLH"; atftp $1 --put -l inc/grafix.plh -r $2/BLD/INC/GRAFIX.PLH#040000
|
||||
echo "BLD/INC/INET.PLH"; atftp $1 --put -l inc/inet.plh -r $2/BLD/INC/INET.PLH#040000
|
||||
echo "BLD/INC/JOYBUZZ.PLH"; atftp $1 --put -l inc/joybuzz.plh -r $2/BLD/INC/JOYBUZZ.PLH#040000
|
||||
echo "BLD/INC/LONGJUMP.PLH"; atftp $1 --put -l inc/longjmp.plh -r $2/BLD/INC/LONGJUMP.PLH#040000
|
||||
echo "BLD/INC/LZ4.PLH"; atftp $1 --put -l inc/lz4.plh -r $2/BLD/INC/LZ4.PLH#040000
|
||||
echo "BLD/INC/MEMMGR.PLH"; atftp $1 --put -l inc/memmgr.plh -r $2/BLD/INC/MEMMGR.PLH#040000
|
||||
echo "BLD/INC/MOUSE.PLH"; atftp $1 --put -l inc/mouse.plh -r $2/BLD/INC/MOUSE.PLH#040000
|
||||
echo "BLD/INC/PORTIO.PLH"; atftp $1 --put -l inc/portio.plh -r $2/BLD/INC/PORTIO.PLH#040000
|
||||
echo "BLD/INC/SANE.PLH"; atftp $1 --put -l inc/sane.plh -r $2/BLD/INC/SANE.PLH#040000
|
||||
echo "BLD/INC/SDFAT.PLH"; atftp $1 --put -l inc/sdfat.plh -r $2/BLD/INC/SDFAT.PLH#040000
|
||||
echo "BLD/INC/SNDSEQ.PLH"; atftp $1 --put -l inc/sndseq.plh -r $2/BLD/INC/SNDSEQ.PLH#040000
|
||||
echo "BLD/INC/SPIPORT.PLH"; atftp $1 --put -l inc/spiport.plh -r $2/BLD/INC/SPIPORT.PLH#040000
|
||||
echo "BLD/INC/TESTLIB.PLH"; atftp $1 --put -l inc/testlib.plh -r $2/BLD/INC/TESTLIB.PLH#040000
|
||||
echo "BLD/INC/ARGS.PLH"; atftp --option "disable windowsize" $1 --put -l inc/args.plh -r $2/BLD/INC/ARGS.PLH#040000
|
||||
echo "BLD/INC/MATCHFILES.PLH"; atftp --option "disable windowsize" $1 --put -l inc/matchfiles.plh -r $2/BLD/INC/MATCHFILES.PLH#040000
|
||||
echo "BLD/INC/CMDSYS.PLH"; atftp --option "disable windowsize" $1 --put -l inc/cmdsys.plh -r $2/BLD/INC/CMDSYS.PLH#040000
|
||||
echo "BLD/INC/CONIO.PLH"; atftp --option "disable windowsize" $1 --put -l inc/conio.plh -r $2/BLD/INC/CONIO.PLH#040000
|
||||
echo "BLD/INC/LINES.PLH"; atftp --option "disable windowsize" $1 --put -l inc/lines.plh -r $2/BLD/INC/LINES.PLH#040000
|
||||
echo "BLD/INC/HGRTILE.PLH"; atftp --option "disable windowsize" $1 --put -l inc/hgrtile.plh -r $2/BLD/INC/HGRTILE.PLH#040000
|
||||
echo "BLD/INC/HGRFONT.PLH"; atftp --option "disable windowsize" $1 --put -l inc/hgrfont.plh -r $2/BLD/INC/HGRFONT.PLH#040000
|
||||
echo "BLD/INC/HGRSPRITE.PLH";atftp --option "disable windowsize" $1 --put -l inc/hgrsprite.plh -r $2/BLD/INC/HGRSPRITE.PLH#040000
|
||||
echo "BLD/INC/HGRLIB.PLH"; atftp --option "disable windowsize" $1 --put -l inc/hgrlib.plh -r $2/BLD/INC/HGRLIB.PLH#040000
|
||||
echo "BLD/INC/GRLIB.PLH"; atftp --option "disable windowsize" $1 --put -l inc/grlib.plh -r $2/BLD/INC/GRLIB.PLH#040000
|
||||
echo "BLD/INC/DGRLIB.PLH"; atftp --option "disable windowsize" $1 --put -l inc/dgrlib.plh -r $2/BLD/INC/DGRLIB.PLH#040000
|
||||
echo "BLD/INC/FIBER.PLH"; atftp --option "disable windowsize" $1 --put -l inc/fiber.plh -r $2/BLD/INC/FIBER.PLH#040000
|
||||
echo "BLD/INC/FILEIO.PLH"; atftp --option "disable windowsize" $1 --put -l inc/fileio.plh -r $2/BLD/INC/FILEIO.PLH#040000
|
||||
echo "BLD/INC/INT32.PLH"; atftp --option "disable windowsize" $1 --put -l inc/int32.plh -r $2/BLD/INC/INT32.PLH#040000
|
||||
echo "BLD/INC/FPSTR.PLH"; atftp --option "disable windowsize" $1 --put -l inc/fpstr.plh -r $2/BLD/INC/FPSTR.PLH#040000
|
||||
echo "BLD/INC/FPU.PLH"; atftp --option "disable windowsize" $1 --put -l inc/fpu.plh -r $2/BLD/INC/FPU.PLH#040000
|
||||
echo "BLD/INC/GRAFIX.PLH"; atftp --option "disable windowsize" $1 --put -l inc/grafix.plh -r $2/BLD/INC/GRAFIX.PLH#040000
|
||||
echo "BLD/INC/JOYBUZZ.PLH"; atftp --option "disable windowsize" $1 --put -l inc/joybuzz.plh -r $2/BLD/INC/JOYBUZZ.PLH#040000
|
||||
echo "BLD/INC/INET.PLH"; atftp --option "disable windowsize" $1 --put -l inc/inet.plh -r $2/BLD/INC/INET.PLH#040000
|
||||
echo "BLD/INC/LONGJUMP.PLH"; atftp --option "disable windowsize" $1 --put -l inc/longjmp.plh -r $2/BLD/INC/LONGJUMP.PLH#040000
|
||||
echo "BLD/INC/LZ4.PLH"; atftp --option "disable windowsize" $1 --put -l inc/lz4.plh -r $2/BLD/INC/LZ4.PLH#040000
|
||||
echo "BLD/INC/MEMMGR.PLH"; atftp --option "disable windowsize" $1 --put -l inc/memmgr.plh -r $2/BLD/INC/MEMMGR.PLH#040000
|
||||
echo "BLD/INC/MOUSE.PLH"; atftp --option "disable windowsize" $1 --put -l inc/mouse.plh -r $2/BLD/INC/MOUSE.PLH#040000
|
||||
echo "BLD/INC/PORTIO.PLH"; atftp --option "disable windowsize" $1 --put -l inc/portio.plh -r $2/BLD/INC/PORTIO.PLH#040000
|
||||
echo "BLD/INC/SANE.PLH"; atftp --option "disable windowsize" $1 --put -l inc/sane.plh -r $2/BLD/INC/SANE.PLH#040000
|
||||
echo "BLD/INC/SDFAT.PLH"; atftp --option "disable windowsize" $1 --put -l inc/sdfat.plh -r $2/BLD/INC/SDFAT.PLH#040000
|
||||
echo "BLD/INC/SNDSEQ.PLH"; atftp --option "disable windowsize" $1 --put -l inc/sndseq.plh -r $2/BLD/INC/SNDSEQ.PLH#040000
|
||||
echo "BLD/INC/SPIPORT.PLH"; atftp --option "disable windowsize" $1 --put -l inc/spiport.plh -r $2/BLD/INC/SPIPORT.PLH#040000
|
||||
echo "BLD/INC/TESTLIB.PLH"; atftp --option "disable windowsize" $1 --put -l inc/testlib.plh -r $2/BLD/INC/TESTLIB.PLH#040000
|
||||
|
||||
# Sample sources
|
||||
echo "BLD/SAMPLES/HELLO.PLA"; atftp $1 --put -l samplesrc/hello.pla -r $2/BLD/SAMPLES/HELLO.PLA#040000
|
||||
echo "BLD/SAMPLES/TESTLIB.PLA"; atftp $1 --put -l samplesrc/testlib.pla -r $2/BLD/SAMPLES/TESTLIB.PLA#040000
|
||||
echo "BLD/SAMPLES/TEST.PLA"; atftp $1 --put -l samplesrc/test.pla -r $2/BLD/SAMPLES/TEST.PLA#040000
|
||||
echo "BLD/SAMPLES/FIBERTEST.PLA"; atftp $1 --put -l samplesrc/fibertest.pla -r $2/BLD/SAMPLES/FIBERTEST.PLA#040000
|
||||
echo "BLD/SAMPLES/MOUSETEST.PLA"; atftp $1 --put -l samplesrc/mousetest.pla -r $2/BLD/SAMPLES/MOUSETEST.PLA#040000
|
||||
echo "BLD/SAMPLES/ROD.PLA"; atftp $1 --put -l samplesrc/rod.pla -r $2/BLD/SAMPLES/ROD.PLA#040000
|
||||
echo "BLD/SAMPLES/INT32TEST.PLA"; atftp $1 --put -l samplesrc/int32test.pla -r $2/BLD/SAMPLES/INT32TEST.PLA#040000
|
||||
echo "BLD/SAMPLES/HGRTEST.PLA"; atftp $1 --put -l samplesrc/hgrtest.pla -r $2/BLD/SAMPLES/HGRTEST.PLA#040000
|
||||
echo "BLD/SAMPLES/GRTEST.PLA"; atftp $1 --put -l samplesrc/grtest.pla -r $2/BLD/SAMPLES/GRTEST.PLA#040000
|
||||
echo "BLD/SAMPLES/DGRTEST.PLA"; atftp $1 --put -l samplesrc/dgrtest.pla -r $2/BLD/SAMPLES/DGRTEST.PLA#040000
|
||||
echo "BLD/SAMPLES/TILETEST.PLA"; atftp $1 --put -l samplesrc/tiletest.pla -r $2/BLD/SAMPLES/TILETEST.PLA#040000
|
||||
echo "BLD/SAMPLES/HGRTEST.PLA"; atftp $1 --put -l samplesrc/hgrtest.pla -r $2/BLD/SAMPLES/HGRTEST.PLA#040000
|
||||
echo "BLD/SAMPLES/PLAYSEQ.PLA"; atftp $1 --put -l samplesrc/playseq.pla -r $2/BLD/SAMPLES/PLAYSEQ.PLA#040000
|
||||
echo "BLD/SAMPLES/RPNCALC.PLA"; atftp $1 --put -l samplesrc/rpncalc.pla -r $2/BLD/SAMPLES/RPNCALC.PLA#040000
|
||||
echo "BLD/SAMPLES/SIEVE.PLA"; atftp $1 --put -l samplesrc/sieve.pla -r $2/BLD/SAMPLES/SIEVE.PLA#040000
|
||||
echo "BLD/SAMPLES/MEMTEST.PLA"; atftp $1 --put -l samplesrc/memtest.pla -r $2/BLD/SAMPLES/MEMTEST.PLA#040000
|
||||
echo "BLD/SAMPLES/FATCAT.PLA"; atftp $1 --put -l samplesrc/fatcat.pla -r $2/BLD/SAMPLES/FATCAT.PLA#040000
|
||||
echo "BLD/SAMPLES/GFXDEMO.PLA"; atftp $1 --put -l samplesrc/gfxdemo.pla -r $2/BLD/SAMPLES/GFXDEMO.PLA#040000
|
||||
echo "BLD/SAMPLES/LZ4CAT.PLA"; atftp $1 --put -l samplesrc/lz4cat.pla -r $2/BLD/SAMPLES/LZ4CAT.PLA#040000
|
||||
echo "BLD/SAMPLES/SFM.PLA"; atftp $1 --put -l samplesrc/sfm.pla -r $2/BLD/SAMPLES/SFM.PLA#040000
|
||||
echo "BLD/SAMPLES/SFMSPRT.PLA"; atftp $1 --put -l samplesrc/sfmsprt.pla -r $2/BLD/SAMPLES/SFMSPRT.PLA#040000
|
||||
echo "BLD/SAMPLES/MON.PLA"; atftp $1 --put -l utilsrc/apple/mon.pla -r $2/BLD/SAMPLES/MON.PLA#040000
|
||||
|
||||
echo "BLD/SAMPLES/HELLO.PLA"; atftp --option "disable windowsize" $1 --put -l samplesrc/hello.pla -r $2/BLD/SAMPLES/HELLO.PLA#040000
|
||||
echo "BLD/SAMPLES/TESTLIB.PLA"; atftp --option "disable windowsize" $1 --put -l samplesrc/testlib.pla -r $2/BLD/SAMPLES/TESTLIB.PLA#040000
|
||||
echo "BLD/SAMPLES/TEST.PLA"; atftp --option "disable windowsize" $1 --put -l samplesrc/test.pla -r $2/BLD/SAMPLES/TEST.PLA#040000
|
||||
echo "BLD/SAMPLES/MOUSETEST.PLA"; atftp --option "disable windowsize" $1 --put -l samplesrc/mousetest.pla -r $2/BLD/SAMPLES/MOUSETEST.PLA#040000
|
||||
echo "BLD/SAMPLES/FIBERTEST.PLA"; atftp --option "disable windowsize" $1 --put -l samplesrc/fibertest.pla -r $2/BLD/SAMPLES/FIBERTEST.PLA#040000
|
||||
echo "BLD/SAMPLES/ROD.PLA"; atftp --option "disable windowsize" $1 --put -l samplesrc/rod.pla -r $2/BLD/SAMPLES/ROD.PLA#040000
|
||||
echo "BLD/SAMPLES/INT32TEST.PLA"; atftp --option "disable windowsize" $1 --put -l samplesrc/int32test.pla -r $2/BLD/SAMPLES/INT32TEST.PLA#040000
|
||||
echo "BLD/SAMPLES/HGRTEST.PLA"; atftp --option "disable windowsize" $1 --put -l samplesrc/hgrtest.pla -r $2/BLD/SAMPLES/HGRTEST.PLA#040000
|
||||
echo "BLD/SAMPLES/GRTEST.PLA"; atftp --option "disable windowsize" $1 --put -l samplesrc/grtest.pla -r $2/BLD/SAMPLES/GRTEST.PLA#040000
|
||||
echo "BLD/SAMPLES/DGRTEST.PLA"; atftp --option "disable windowsize" $1 --put -l samplesrc/dgrtest.pla -r $2/BLD/SAMPLES/DGRTEST.PLA#040000
|
||||
echo "BLD/SAMPLES/TILETEST.PLA"; atftp --option "disable windowsize" $1 --put -l samplesrc/tiletest.pla -r $2/BLD/SAMPLES/TILETEST.PLA#040000
|
||||
echo "BLD/SAMPLES/HGRTEST.PLA"; atftp --option "disable windowsize" $1 --put -l samplesrc/hgrtest.pla -r $2/BLD/SAMPLES/HGRTEST.PLA#040000
|
||||
echo "BLD/SAMPLES/PLAYSEQ.PLA"; atftp --option "disable windowsize" $1 --put -l samplesrc/playseq.pla -r $2/BLD/SAMPLES/PLAYSEQ.PLA#040000
|
||||
echo "BLD/SAMPLES/RPNCALC.PLA"; atftp --option "disable windowsize" $1 --put -l samplesrc/rpncalc.pla -r $2/BLD/SAMPLES/RPNCALC.PLA#040000
|
||||
echo "BLD/SAMPLES/SIEVE.PLA"; atftp --option "disable windowsize" $1 --put -l samplesrc/sieve.pla -r $2/BLD/SAMPLES/SIEVE.PLA#040000
|
||||
echo "BLD/SAMPLES/MEMTEST.PLA"; atftp --option "disable windowsize" $1 --put -l samplesrc/memtest.pla -r $2/BLD/SAMPLES/MEMTEST.PLA#040000
|
||||
echo "BLD/SAMPLES/FATCAT.PLA"; atftp --option "disable windowsize" $1 --put -l samplesrc/fatcat.pla -r $2/BLD/SAMPLES/FATCAT.PLA#040000
|
||||
echo "BLD/SAMPLES/GFXDEMO.PLA"; atftp --option "disable windowsize" $1 --put -l samplesrc/gfxdemo.pla -r $2/BLD/SAMPLES/GFXDEMO.PLA#040000
|
||||
echo "BLD/SAMPLES/LZ4CAT.PLA"; atftp --option "disable windowsize" $1 --put -l samplesrc/lz4cat.pla -r $2/BLD/SAMPLES/LZ4CAT.PLA#040000
|
||||
echo "BLD/SAMPLES/SFM.PLA"; atftp --option "disable windowsize" $1 --put -l samplesrc/sfm.pla -r $2/BLD/SAMPLES/SFM.PLA#040000
|
||||
echo "BLD/SAMPLES/SFMSPRT.PLA"; atftp --option "disable windowsize" $1 --put -l samplesrc/sfmsprt.pla -r $2/BLD/SAMPLES/SFMSPRT.PLA#040000
|
||||
echo "BLD/SAMPLES/FPPOW.PLA"; atftp --option "disable windowsize" $1 --put -l samplesrc/fppow.pla -r $2/BLD/SAMPLES/FPPOW.PLA#040000
|
||||
echo "BLD/SAMPLES/MON.PLA"; atftp --option "disable windowsize" $1 --put -l utilsrc/apple/mon.pla -r $2/BLD/SAMPLES/MON.PLA#040000
|
||||
|
||||
@@ -1,40 +1,44 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Demos
|
||||
echo "DEMOS/RPNCALC"; atftp $1 --put -l rel/RPNCALC#FE1000 -r $2/DEMOS/RPNCALC#FE1000
|
||||
echo "DEMOS/LZ4CAT"; atftp $1 --put -l rel/LZ4CAT#FE1000 -r $2/DEMOS/LZ4CAT#FE1000
|
||||
echo "DEMOS/SIEVE"; atftp $1 --put -l rel/SIEVE#FE1000 -r $2/DEMOS/SIEVE#FE1000
|
||||
echo "DEMOS/ROD"; atftp $1 --put -l rel/apple/ROD#FE1000 -r $2/DEMOS/ROD#FE1000
|
||||
echo "DEMOS/TILETEST"; atftp $1 --put -l rel/apple/TILETEST#FE1000 -r $2/DEMOS/TILETEST#FE1000
|
||||
echo "DEMOS/HGRTEST"; atftp $1 --put -l rel/apple/HGRTEST#FE1000 -r $2/DEMOS/HGRTEST#FE1000
|
||||
echo "DEMOS/GRTEST"; atftp $1 --put -l rel/apple/GRTEST#FE1000 -r $2/DEMOS/GRTEST#FE1000
|
||||
echo "DEMOS/INT32TEST"; atftp $1 --put -l rel/INT32TEST#FE1000 -r $2/DEMOS/INT32TEST#FE1000
|
||||
echo "DEMOS/DGRTEST"; atftp $1 --put -l rel/apple/DGRTEST#FE1000 -r $2/DEMOS/DGRTEST#FE1000
|
||||
|
||||
# Spiders from Mars
|
||||
echo "DEMOS/SPIDERS/SFM"; atftp $1 --put -l rel/apple/SFM#FE1000 -r $2/DEMOS/SPIDERS/SFM#FE1000
|
||||
echo "DEMOS/SPIDERS/SFMSPRT"; atftp $1 --put -l rel/apple/SFMSPRT#FE1000 -r $2/DEMOS/SPIDERS/SFMSPRT#FE1000
|
||||
echo "DEMOS/RPNCALC"; atftp --option "disable windowsize" $1 --put -l rel/RPNCALC#FE1000 -r $2/DEMOS/RPNCALC#FE1000
|
||||
echo "DEMOS/LZ4CAT"; atftp --option "disable windowsize" $1 --put -l rel/LZ4CAT#FE1000 -r $2/DEMOS/LZ4CAT#FE1000
|
||||
echo "DEMOS/SIEVE"; atftp --option "disable windowsize" $1 --put -l rel/SIEVE#FE1000 -r $2/DEMOS/SIEVE#FE1000
|
||||
echo "DEMOS/ROGUE.LZ4"; atftp --option "disable windowsize" $1 --put -l ../doc/ROGUE.LZ4.BIN -r $2/DEMOS/ROGUE.LZ4#061000
|
||||
echo "DEMOS/ROD"; atftp --option "disable windowsize" $1 --put -l rel/apple/ROD#FE1000 -r $2/DEMOS/ROD#FE1000
|
||||
echo "DEMOS/INT32TEST"; atftp --option "disable windowsize" $1 --put -l rel/INT32TEST#FE1000 -r $2/DEMOS/INT32TEST#FE1000
|
||||
|
||||
# Music demo
|
||||
echo "DEMOS/MUSIC/PLAYSEQ"; atftp $1 --put -l rel/apple/PLAYSEQ#FE1000 -r $2/DEMOS/MUSIC/PLAYSEQ#FE1000
|
||||
atftp $1 --put -l mockingboard/ultima3.seq -r $2/DEMOS/MUSIC/ULTIMA3.SEQ#060000
|
||||
atftp $1 --put -l mockingboard/startrek.seq -r $2/DEMOS/MUSIC/STARTREK.SEQ#060000
|
||||
# Rogue demo
|
||||
echo "DEMOS/ROGUE/ROGUE"; atftp $1 --put -l rel/ROGUE#FE1000 -r $2/DEMOS/ROGUE/ROGUE#FE1000
|
||||
echo "DEMOS/ROGUE/ROGUEMAP"; atftp $1 --put -l rel/ROGUEMAP#FE1000 -r $2/DEMOS/ROGUE/ROGUEMAP#FE1000
|
||||
echo "DEMOS/ROGUE/ROGUECOMBAT"; atftp $1 --put -l rel/ROGUECOMBAT#FE1000 -r $2/DEMOS/ROGUE/ROGUECOMBAT#FE1000
|
||||
atftp $1 --put -l samplesrc/LEVEL0#040000 -r $2/DEMOS/ROGUE/LEVEL0#040000
|
||||
atftp $1 --put -l samplesrc/LEVEL1#040000 -r $2/DEMOS/ROGUE/LEVEL1#040000
|
||||
echo "DEMOS/MUSIC/PLAYSEQ"; atftp --option "disable windowsize" $1 --put -l rel/apple/PLAYSEQ#FE1000 -r $2/DEMOS/MUSIC/PLAYSEQ#FE1000
|
||||
atftp --option "disable windowsize" $1 --put -l mockingboard/ultima3.seq -r $2/DEMOS/MUSIC/ULTIMA3.SEQ#060000
|
||||
atftp --option "disable windowsize" $1 --put -l mockingboard/startrek.seq -r $2/DEMOS/MUSIC/STARTREK.SEQ#060000
|
||||
|
||||
# Arduino+SD card demos
|
||||
echo "DEMOS/SDUTILS/SPIPORT"; atftp $1 --put -l rel/apple/SPIPORT#FE1000 -r $2/DEMOS/SDUTILS/SPIPORT#FE1000
|
||||
echo "DEMOS/SDUTILS/SDFAT"; atftp $1 --put -l rel/apple/SDFAT#FE1000 -r $2/DEMOS/SDUTILS/SDFAT#FE1000
|
||||
echo "DEMOS/SDUTILS/FATCAT"; atftp $1 --put -l rel/apple/FATCAT#FE1000 -r $2/DEMOS/SDUTILS/FATCAT#FE1000
|
||||
echo "DEMOS/SDUTILS/FATGET"; atftp $1 --put -l rel/apple/FATGET#FE1000 -r $2/DEMOS/SDUTILS/FATGET#FE1000
|
||||
echo "DEMOS/SDUTILS/FATPUT"; atftp $1 --put -l rel/apple/FATPUT#FE1000 -r $2/DEMOS/SDUTILS/FATPUT#FE1000
|
||||
echo "DEMOS/SDUTILS/FATREADDSK"; atftp $1 --put -l rel/apple/FATREADDSK#FE1000 -r $2/DEMOS/SDUTILS/FATREADDSK#FE1000
|
||||
echo "DEMOS/SDUTILS/FATWRITEDSK"; atftp $1 --put -l rel/apple/FATWRITEDSK#FE1000 -r $2/DEMOS/SDUTILS/FATWRITEDSK#FE1000
|
||||
# Rogue demo
|
||||
echo "DEMOS/ROGUE/ROGUE"; atftp --option "disable windowsize" $1 --put -l rel/ROGUE#FE1000 -r $2/DEMOS/ROGUE/ROGUE#FE1000
|
||||
echo "DEMOS/ROGUE/ROGUEMAP"; atftp --option "disable windowsize" $1 --put -l rel/ROGUEMAP#FE1000 -r $2/DEMOS/ROGUE/ROGUEMAP#FE1000
|
||||
echo "DEMOS/ROGUE/ROGUECOMBAT"; atftp --option "disable windowsize" $1 --put -l rel/ROGUECOMBAT#FE1000 -r $2/DEMOS/ROGUE/ROGUECOMBAT#FE1000
|
||||
atftp --option "disable windowsize" $1 --put -l samplesrc/LEVEL0#040000 -r $2/DEMOS/ROGUE/LEVEL0#040000
|
||||
atftp --option "disable windowsize" $1 --put -l samplesrc/LEVEL1#040000 -r $2/DEMOS/ROGUE/LEVEL1#040000
|
||||
|
||||
# Net demos
|
||||
echo "DEMOS/NET/HTTPD"; atftp $1 --put -l rel/HTTPD#FE1000 -r $2/DEMOS/NET/HTTPD#FE1000
|
||||
atftp $1 --put -l samplesrc/index.html -r $2/DEMOS/NET/INDEX.HTML#040000
|
||||
echo "DEMOS/NET/HTTPD"; atftp --option "disable windowsize" $1 --put -l rel/HTTPD#FE1000 -r $2/DEMOS/NET/HTTPD#FE1000
|
||||
atftp --option "disable windowsize" $1 --put -l samplesrc/index.html -r $2/DEMOS/NET/INDEX.HTML#040000
|
||||
|
||||
# Apple 2 demos
|
||||
echo "DEMOS/APPLE2/TILETEST"; atftp --option "disable windowsize" $1 --put -l rel/apple/TILETEST#FE1000 -r $2/DEMOS/APPLE2/TILETEST#FE1000
|
||||
echo "DEMOS/APPLE2/HGRTEST"; atftp --option "disable windowsize" $1 --put -l rel/apple/HGRTEST#FE1000 -r $2/DEMOS/APPLE2/HGRTEST#FE1000
|
||||
echo "DEMOS/APPLE2/GRTEST"; atftp --option "disable windowsize" $1 --put -l rel/apple/GRTEST#FE1000 -r $2/DEMOS/APPLE2/GRTEST#FE1000
|
||||
echo "DEMOS/APPLE2/DGRTEST"; atftp --option "disable windowsize" $1 --put -l rel/apple/DGRTEST#FE1000 -r $2/DEMOS/APPLE2/DGRTEST#FE1000
|
||||
|
||||
# Spiders from Mars
|
||||
echo "DEMOS/APPLE2/SPIDERS/SFM"; atftp --option "disable windowsize" $1 --put -l rel/apple/SFM#FE1000 -r $2/DEMOS/APPLE2/SPIDERS/SFM#FE1000
|
||||
echo "DEMOS/APPLE2/SPIDERS/SFMSPRT"; atftp --option "disable windowsize" $1 --put -l rel/apple/SFMSPRT#FE1000 -r $2/DEMOS/APPLE2/SPIDERS/SFMSPRT#FE1000
|
||||
|
||||
# Arduino+SD card demos
|
||||
echo "DEMOS/APPLE2/SDUTILS/SPIPORT"; atftp --option "disable windowsize" $1 --put -l rel/apple/SPIPORT#FE1000 -r $2/DEMOS/APPLE2/SDUTILS/SPIPORT#FE1000
|
||||
echo "DEMOS/APPLE2/SDUTILS/SDFAT"; atftp --option "disable windowsize" $1 --put -l rel/apple/SDFAT#FE1000 -r $2/DEMOS/APPLE2/SDUTILS/SDFAT#FE1000
|
||||
echo "DEMOS/APPLE2/SDUTILS/FATCAT"; atftp --option "disable windowsize" $1 --put -l rel/apple/FATCAT#FE1000 -r $2/DEMOS/APPLE2/SDUTILS/FATCAT#FE1000
|
||||
echo "DEMOS/APPLE2/SDUTILS/FATGET"; atftp --option "disable windowsize" $1 --put -l rel/apple/FATGET#FE1000 -r $2/DEMOS/APPLE2/SDUTILS/FATGET#FE1000
|
||||
echo "DEMOS/APPLE2/SDUTILS/FATPUT"; atftp --option "disable windowsize" $1 --put -l rel/apple/FATPUT#FE1000 -r $2/DEMOS/APPLE2/SDUTILS/FATPUT#FE1000
|
||||
echo "DEMOS/APPLE2/SDUTILS/FATREADDSK"; atftp --option "disable windowsize" $1 --put -l rel/apple/FATREADDSK#FE1000 -r $2/DEMOS/APPLE2/SDUTILS/FATREADDSK#FE1000
|
||||
echo "DEMOS/APPLE2/SDUTILS/FATWRITEDSK"; atftp --option "disable windowsize" $1 --put -l rel/apple/FATWRITEDSK#FE1000 -r $2/DEMOS/APPLE2/SDUTILS/FATWRITEDSK#FE1000
|
||||
|
||||
10
src/tftpsane
10
src/tftpsane
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# SANE libraries
|
||||
echo "SYS/SANE"; atftp $1 --put -l rel/SANE#FE1000 -r $2/SYS/SANE#FE1000
|
||||
echo "SYS/FPSTR"; atftp $1 --put -l rel/FPSTR#FE1000 -r $2/SYS/FPSTR#FE1000
|
||||
echo "SYS/FPU"; atftp $1 --put -l rel/FPU#FE1000 -r $2/SYS/FPU#FE1000
|
||||
echo "SYS/FP6502.CODE"; atftp $1 --put -l ../sysfiles/FP6502.CODE#060000 -r $2/SYS/FP6502.CODE#060000
|
||||
echo "SYS/ELEMS.CODE"; atftp $1 --put -l ../sysfiles/ELEMS.CODE#060000 -r $2/SYS/ELEMS.CODE#060000
|
||||
echo "SYS/SANE"; atftp --option "disable windowsize" $1 --put -l rel/SANE#FE1000 -r $2/SYS/SANE#FE1000
|
||||
echo "SYS/FPSTR"; atftp --option "disable windowsize" $1 --put -l rel/FPSTR#FE1000 -r $2/SYS/FPSTR#FE1000
|
||||
echo "SYS/FPU"; atftp --option "disable windowsize" $1 --put -l rel/FPU#FE1000 -r $2/SYS/FPU#FE1000
|
||||
echo "SYS/FP6502.CODE"; atftp --option "disable windowsize" $1 --put -l ../sysfiles/FP6502.CODE#060000 -r $2/SYS/FP6502.CODE#060000
|
||||
echo "SYS/ELEMS.CODE"; atftp --option "disable windowsize" $1 --put -l ../sysfiles/ELEMS.CODE#060000 -r $2/SYS/ELEMS.CODE#060000
|
||||
|
||||
66
src/tftpsys
66
src/tftpsys
@@ -1,38 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Core VM, CMDSYS, JITC files
|
||||
echo "PLASMA.SYSTEM"; atftp $1 --put -l rel/apple/PLASMA.SYSTEM#FF2000 -r $2/PLASMA.SYSTEM#FF2000
|
||||
echo "PLVM.128"; atftp $1 --put -l rel/apple/PLVM.128#FF2000 -r $2/PLVM.128#FF2000
|
||||
echo "PLVM16"; atftp $1 --put -l rel/apple/PLVM16#FF2000 -r $2/PLVM16#FF2000
|
||||
echo "CMD"; atftp $1 --put -l rel/apple/CMD#061000 -r $2/CMD#061000
|
||||
echo "CMD128"; atftp $1 --put -l rel/apple/CMD128#061000 -r $2/CMD128#061000
|
||||
echo "SYS/JIT"; atftp $1 --put -l rel/apple/JIT#FE1000 -r $2/SYS/JIT#FE1000
|
||||
echo "SYS/JIT16"; atftp $1 --put -l rel/apple/JIT16#FE1000 -r $2/SYS/JIT16#FE1000
|
||||
echo "SYS/JITUNE"; atftp $1 --put -l rel/apple/JITUNE#FE1000 -r $2/SYS/JITUNE#FE1000
|
||||
echo "PLASMA.SYSTEM"; atftp --option "disable windowsize" $1 --put -l rel/apple/PLASMA.SYSTEM#FF2000 -r $2/PLASMA.SYSTEM#FF2000
|
||||
echo "PLVM.128"; atftp --option "disable windowsize" $1 --put -l rel/apple/PLVM.128#FF2000 -r $2/PLVM.128#FF2000
|
||||
echo "PLVM16"; atftp --option "disable windowsize" $1 --put -l rel/apple/PLVM16#FF2000 -r $2/PLVM16#FF2000
|
||||
echo "CMD"; atftp --option "disable windowsize" $1 --put -l rel/apple/CMD#061000 -r $2/CMD#061000
|
||||
echo "CMD128"; atftp --option "disable windowsize" $1 --put -l rel/apple/CMD128#061000 -r $2/CMD128#061000
|
||||
echo "SYS/JIT"; atftp --option "disable windowsize" $1 --put -l rel/apple/JIT#FE1000 -r $2/SYS/JIT#FE1000
|
||||
echo "SYS/JIT16"; atftp --option "disable windowsize" $1 --put -l rel/apple/JIT16#FE1000 -r $2/SYS/JIT16#FE1000
|
||||
echo "SYS/JITUNE"; atftp --option "disable windowsize" $1 --put -l rel/apple/JITUNE#FE1000 -r $2/SYS/JITUNE#disable FE1000
|
||||
|
||||
# Core libraries
|
||||
echo "SYS/MATCHFILES"; atftp $1 --put -l rel/apple/MATCHFILES#FE1000 -r $2/SYS/MATCHFILES#FE1000
|
||||
echo "SYS/ARGS"; atftp $1 --put -l rel/ARGS#FE1000 -r $2/SYS/ARGS#FE1000
|
||||
echo "SYS/INT32"; atftp $1 --put -l rel/INT32#FE1000 -r $2/SYS/INT32#FE1000
|
||||
echo "SYS/DHCP"; atftp $1 --put -l rel/DHCP#FE1000 -r $2/SYS/DHCP#FE1000
|
||||
echo "SYS/ETHERIP"; atftp $1 --put -l rel/ETHERIP#FE1000 -r $2/SYS/ETHERIP#FE1000
|
||||
echo "SYS/MOUSE"; atftp $1 --put -l rel/apple/MOUSE#FE1000 -r $2/SYS/MOUSE#FE1000
|
||||
echo "SYS/FIBER"; atftp $1 --put -l rel/FIBER#FE1000 -r $2/SYS/FIBER#FE1000
|
||||
echo "SYS/INET"; atftp $1 --put -l rel/INET#FE1000 -r $2/SYS/INET#FE1000
|
||||
echo "SYS/LONGJUMP"; atftp $1 --put -l rel/LONGJMP#FE1000 -r $2/SYS/LONGJMP#FE1000
|
||||
echo "SYS/MEMMGR"; atftp $1 --put -l rel/MEMMGR#FE1000 -r $2/SYS/MEMMGR#FE1000
|
||||
echo "SYS/LZ4"; atftp $1 --put -l rel/LZ4#FE1000 -r $2/SYS/LZ4#FE1000
|
||||
echo "SYS/CONIO"; atftp $1 --put -l rel/apple/CONIO#FE1000 -r $2/SYS/CONIO#FE1000
|
||||
echo "SYS/HGRTILE"; atftp $1 --put -l rel/apple/HGRTILE#FE1000 -r $2/SYS/HGRTILE#FE1000
|
||||
echo "SYS/HGRFONT"; atftp $1 --put -l rel/apple/HGRFONT#FE1000 -r $2/SYS/HGRFONT#FE1000
|
||||
echo "SYS/HGRSPRITE"; atftp $1 --put -l rel/apple/HGRSPRITE#FE1000 -r $2/SYS/HGRSPRITE#FE1000
|
||||
echo "SYS/LINES"; atftp $1 --put -l rel/LINES#FE1000 -r $2/SYS/LINES#FE1000
|
||||
echo "SYS/HGRLIB"; atftp $1 --put -l rel/apple/HGRLIB#FE1000 -r $2/SYS/HGRLIB#FE1000
|
||||
echo "SYS/GRLIB"; atftp $1 --put -l rel/apple/GRLIB#FE1000 -r $2/SYS/GRLIB#FE1000
|
||||
echo "SYS/DGRLIB"; atftp $1 --put -l rel/apple/DGRLIB#FE1000 -r $2/SYS/DGRLIB#FE1000
|
||||
echo "SYS/FILEIO"; atftp $1 --put -l rel/apple/FILEIO#FE1000 -r $2/SYS/FILEIO#FE1000
|
||||
echo "SYS/JOYBUZZ"; atftp $1 --put -l rel/apple/JOYBUZZ#FE1000 -r $2/SYS/JOYBUZZ#FE1000
|
||||
echo "SYS/SNDSEQ"; atftp $1 --put -l rel/apple/SNDSEQ#FE1000 -r $2/SYS/SNDSEQ#FE1000
|
||||
echo "SYS/PORTIO"; atftp $1 --put -l rel/apple/PORTIO#FE1000 -r $2/SYS/PORTIO#FE1000
|
||||
echo "SYS/UTHERNET2";atftp $1 --put -l rel/apple/UTHERNET2#FE1000 -r $2/SYS/UTHERNET2#FE1000
|
||||
echo "SYS/UTHERNET"; atftp $1 --put -l rel/apple/UTHERNET#FE1000 -r $2/SYS/UTHERNET#FE1000
|
||||
echo "SYS/MATCHFILES"; atftp --option "disable windowsize" $1 --put -l rel/apple/MATCHFILES#FE1000 -r $2/SYS/MATCHFILES#FE1000
|
||||
echo "SYS/ARGS"; atftp --option "disable windowsize" $1 --put -l rel/ARGS#FE1000 -r $2/SYS/ARGS#FE1000
|
||||
echo "SYS/INT32"; atftp --option "disable windowsize" $1 --put -l rel/INT32#FE1000 -r $2/SYS/INT32#FE1000
|
||||
echo "SYS/DHCP"; atftp --option "disable windowsize" $1 --put -l rel/DHCP#FE1000 -r $2/SYS/DHCP#FE1000
|
||||
echo "SYS/ETHERIP"; atftp --option "disable windowsize" $1 --put -l rel/ETHERIP#FE1000 -r $2/SYS/ETHERIP#FE1000
|
||||
echo "SYS/MOUSE"; atftp --option "disable windowsize" $1 --put -l rel/apple/MOUSE#FE1000 -r $2/SYS/MOUSE#FE1000
|
||||
echo "SYS/FIBER"; atftp --option "disable windowsize" $1 --put -l rel/FIBER#FE1000 -r $2/SYS/FIBER#FE1000
|
||||
echo "SYS/INET"; atftp --option "disable windowsize" $1 --put -l rel/INET#FE1000 -r $2/SYS/INET#FE1000
|
||||
echo "SYS/LONGJUMP"; atftp --option "disable windowsize" $1 --put -l rel/LONGJMP#FE1000 -r $2/SYS/LONGJMP#FE1000
|
||||
echo "SYS/MEMMGR"; atftp --option "disable windowsize" $1 --put -l rel/MEMMGR#FE1000 -r $2/SYS/MEMMGR#FE1000
|
||||
echo "SYS/LZ4"; atftp --option "disable windowsize" $1 --put -l rel/LZ4#FE1000 -r $2/SYS/LZ4#FE1000
|
||||
echo "SYS/CONIO"; atftp --option "disable windowsize" $1 --put -l rel/apple/CONIO#FE1000 -r $2/SYS/CONIO#FE1000
|
||||
echo "SYS/HGRTILE"; atftp --option "disable windowsize" $1 --put -l rel/apple/HGRTILE#FE1000 -r $2/SYS/HGRTILE#FE1000
|
||||
echo "SYS/HGRFONT"; atftp --option "disable windowsize" $1 --put -l rel/apple/HGRFONT#FE1000 -r $2/SYS/HGRFONT#FE1000
|
||||
echo "SYS/HGRSPRITE"; atftp --option "disable windowsize" $1 --put -l rel/apple/HGRSPRITE#FE1000 -r $2/SYS/HGRSPRITE#FE1000
|
||||
echo "SYS/LINES"; atftp --option "disable windowsize" $1 --put -l rel/LINES#FE1000 -r $2/SYS/LINES#FE1000
|
||||
echo "SYS/HGRLIB"; atftp --option "disable windowsize" $1 --put -l rel/apple/HGRLIB#FE1000 -r $2/SYS/HGRLIB#FE1000
|
||||
echo "SYS/GRLIB"; atftp --option "disable windowsize" $1 --put -l rel/apple/GRLIB#FE1000 -r $2/SYS/GRLIB#FE1000
|
||||
echo "SYS/DGRLIB"; atftp --option "disable windowsize" $1 --put -l rel/apple/DGRLIB#FE1000 -r $2/SYS/DGRLIB#FE1000
|
||||
echo "SYS/FILEIO"; atftp --option "disable windowsize" $1 --put -l rel/apple/FILEIO#FE1000 -r $2/SYS/FILEIO#FE1000
|
||||
echo "SYS/JOYBUZZ"; atftp --option "disable windowsize" $1 --put -l rel/apple/JOYBUZZ#FE1000 -r $2/SYS/JOYBUZZ#FE1000
|
||||
echo "SYS/SNDSEQ"; atftp --option "disable windowsize" $1 --put -l rel/apple/SNDSEQ#FE1000 -r $2/SYS/SNDSEQ#FE1000
|
||||
echo "SYS/PORTIO"; atftp --option "disable windowsize" $1 --put -l rel/apple/PORTIO#FE1000 -r $2/SYS/PORTIO#FE1000
|
||||
echo "SYS/UTHERNET2";atftp --option "disable windowsize" $1 --put -l rel/apple/UTHERNET2#FE1000 -r $2/SYS/UTHERNET2#FE1000
|
||||
echo "SYS/UTHERNET"; atftp --option "disable windowsize" $1 --put -l rel/apple/UTHERNET#FE1000 -r $2/SYS/UTHERNET#FE1000
|
||||
|
||||
22
src/tftputil
22
src/tftputil
@@ -1,14 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Core utilities
|
||||
echo "SYS/ED"; atftp $1 --put -l rel/ED#FE1000 -r $2/SYS/ED#FE1000
|
||||
echo "SYS/TFTPD"; atftp $1 --put -l rel/TFTPD#FE1000 -r $2/SYS/TFTPD#FE1000
|
||||
echo "SYS/COPY"; atftp $1 --put -l rel/apple/COPY#FE1000 -r $2/SYS/COPY#FE1000
|
||||
echo "SYS/DEL"; atftp $1 --put -l rel/apple/DEL#FE1000 -r $2/SYS/DEL#FE1000
|
||||
echo "SYS/REN"; atftp $1 --put -l rel/apple/REN#FE1000 -r $2/SYS/REN#FE1000
|
||||
echo "SYS/CAT"; atftp $1 --put -l rel/apple/CAT#FE1000 -r $2/SYS/CAT#FE1000
|
||||
echo "SYS/NEWDIR"; atftp $1 --put -l rel/apple/NEWDIR#FE1000 -r $2/SYS/NEWDIR#FE1000
|
||||
echo "SYS/TYPE"; atftp $1 --put -l rel/apple/TYPE#FE1000 -r $2/SYS/TYPE#FE1000
|
||||
echo "SYS/MON"; atftp $1 --put -l rel/apple/MON#FE1000 -r $2/SYS/MON#FE1000
|
||||
echo "SYS/SOS"; atftp $1 --put -l rel/apple/SOS#FE1000 -r $2/SYS/SOS#FE1000
|
||||
echo "SYS/ZIP"; atftp $1 --put -l rel/apple/ZIP#FE1000 -r $2/SYS/ZIP#FE1000
|
||||
echo "SYS/ED"; atftp --option "disable windowsize" $1 --put -l rel/ED#FE1000 -r $2/SYS/ED#FE1000
|
||||
echo "SYS/TFTPD"; atftp --option "disable windowsize" $1 --put -l rel/TFTPD#FE1000 -r $2/SYS/TFTPD#FE1000
|
||||
echo "SYS/COPY"; atftp --option "disable windowsize" $1 --put -l rel/apple/COPY#FE1000 -r $2/SYS/COPY#FE1000
|
||||
echo "SYS/DEL"; atftp --option "disable windowsize" $1 --put -l rel/apple/DEL#FE1000 -r $2/SYS/DEL#FE1000
|
||||
echo "SYS/REN"; atftp --option "disable windowsize" $1 --put -l rel/apple/REN#FE1000 -r $2/SYS/REN#FE1000
|
||||
echo "SYS/CAT"; atftp --option "disable windowsize" $1 --put -l rel/apple/CAT#FE1000 -r $2/SYS/CAT#FE1000
|
||||
echo "SYS/NEWDIR"; atftp --option "disable windowsize" $1 --put -l rel/apple/NEWDIR#FE1000 -r $2/SYS/NEWDIR#FE1000
|
||||
echo "SYS/TYPE"; atftp --option "disable windowsize" $1 --put -l rel/apple/TYPE#FE1000 -r $2/SYS/TYPE#FE1000
|
||||
echo "SYS/MON"; atftp --option "disable windowsize" $1 --put -l rel/apple/MON#FE1000 -r $2/SYS/MON#FE1000
|
||||
echo "SYS/SOS"; atftp --option "disable windowsize" $1 --put -l rel/apple/SOS#FE1000 -r $2/SYS/SOS#FE1000
|
||||
echo "SYS/ZIPCHIP"; atftp --option "disable windowsize" $1 --put -l rel/apple/ZIPCHIP#FE1000 -r $2/SYS/ZIPCHIP#FE1000
|
||||
|
||||
@@ -41,9 +41,9 @@ static t_opseq *pending_seq = 0;
|
||||
#define FIXUP_WORD 0x80
|
||||
int id_match(char *name, int len, char *id)
|
||||
{
|
||||
if (len > ID_LEN) len = ID_LEN;
|
||||
if (len == id[0])
|
||||
{
|
||||
if (len > 16) len = 16;
|
||||
while (len--)
|
||||
{
|
||||
if (toupper(name[len]) != id[1 + len])
|
||||
@@ -83,7 +83,7 @@ int idglobal_lookup(char *name, int len)
|
||||
}
|
||||
int idconst_add(char *name, int len, int value)
|
||||
{
|
||||
char c = name[len];
|
||||
char c;
|
||||
if (consts > 1024)
|
||||
{
|
||||
printf("Constant count overflow\n");
|
||||
@@ -99,11 +99,12 @@ int idconst_add(char *name, int len, int value)
|
||||
parse_error("global label already defined\n");
|
||||
return (0);
|
||||
}
|
||||
if (len > ID_LEN) len = ID_LEN;
|
||||
c = name[len];
|
||||
name[len] = '\0';
|
||||
emit_idconst(name, value);
|
||||
name[len] = c;
|
||||
idconst_name[consts][0] = len;
|
||||
if (len > ID_LEN) len = ID_LEN;
|
||||
while (len--)
|
||||
idconst_name[consts][1 + len] = toupper(name[len]);
|
||||
idconst_value[consts] = value;
|
||||
@@ -112,7 +113,7 @@ int idconst_add(char *name, int len, int value)
|
||||
}
|
||||
int idlocal_add(char *name, int len, int type, int size)
|
||||
{
|
||||
char c = name[len];
|
||||
char c;
|
||||
if (localsize > 255)
|
||||
{
|
||||
printf("Local variable size overflow\n");
|
||||
@@ -128,11 +129,12 @@ int idlocal_add(char *name, int len, int type, int size)
|
||||
parse_error("local label already defined\n");
|
||||
return (0);
|
||||
}
|
||||
if (len > ID_LEN) len = ID_LEN;
|
||||
c = name[len];
|
||||
name[len] = '\0';
|
||||
emit_idlocal(name, localsize);
|
||||
name[len] = c;
|
||||
idlocal_name[locals][0] = len;
|
||||
if (len > ID_LEN) len = ID_LEN;
|
||||
while (len--)
|
||||
idlocal_name[locals][1 + len] = toupper(name[len]);
|
||||
idlocal_type[locals] = type | LOCAL_TYPE;
|
||||
@@ -143,7 +145,6 @@ int idlocal_add(char *name, int len, int type, int size)
|
||||
}
|
||||
int idglobal_add(char *name, int len, int type, int size)
|
||||
{
|
||||
char c = name[len];
|
||||
if (globals > 1024)
|
||||
{
|
||||
printf("Global variable count overflow\n");
|
||||
@@ -159,10 +160,8 @@ int idglobal_add(char *name, int len, int type, int size)
|
||||
parse_error("global label already defined\n");
|
||||
return (0);
|
||||
}
|
||||
name[len] = '\0';
|
||||
name[len] = c;
|
||||
idglobal_name[globals][0] = len;
|
||||
if (len > ID_LEN) len = ID_LEN;
|
||||
idglobal_name[globals][0] = len;
|
||||
while (len--)
|
||||
idglobal_name[globals][1 + len] = toupper(name[len]);
|
||||
idglobal_type[globals] = type;
|
||||
@@ -174,7 +173,7 @@ int idglobal_add(char *name, int len, int type, int size)
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\t\t\t\t\t; %s -> X%03d\n", &idglobal_name[globals][1], externs);
|
||||
fprintf(outputfile, "\t\t\t\t\t; %s -> X%03d\n", &idglobal_name[globals][1], externs);
|
||||
idglobal_tag[globals++] = externs++;
|
||||
}
|
||||
return (1);
|
||||
@@ -213,14 +212,14 @@ int idfunc_add(char *name, int len, int type, int tag)
|
||||
printf("Global variable count overflow\n");
|
||||
return (0);
|
||||
}
|
||||
idglobal_name[globals][0] = len;
|
||||
if (len > ID_LEN) len = ID_LEN;
|
||||
idglobal_name[globals][0] = len;
|
||||
while (len--)
|
||||
idglobal_name[globals][1 + len] = toupper(name[len]);
|
||||
idglobal_type[globals] = type;
|
||||
idglobal_tag[globals++] = tag;
|
||||
if (type & EXTERN_TYPE)
|
||||
printf("\t\t\t\t\t; %s -> X%03d\n", &idglobal_name[globals - 1][1], tag);
|
||||
fprintf(outputfile, "\t\t\t\t\t; %s -> X%03d\n", &idglobal_name[globals - 1][1], tag);
|
||||
return (1);
|
||||
}
|
||||
int idfunc_set(char *name, int len, int type, int tag)
|
||||
@@ -344,11 +343,11 @@ void emit_dci(char *str, int len)
|
||||
{
|
||||
if (len--)
|
||||
{
|
||||
printf("\t; DCI STRING: %s\n", supper(str));
|
||||
printf("\t%s\t$%02X", DB, toupper(*str++) | (len ? 0x80 : 0x00));
|
||||
fprintf(outputfile, "\t; DCI STRING: %s\n", supper(str));
|
||||
fprintf(outputfile, "\t%s\t$%02X", DB, toupper(*str++) | (len ? 0x80 : 0x00));
|
||||
while (len--)
|
||||
printf(",$%02X", toupper(*str++) | (len ? 0x80 : 0x00));
|
||||
printf("\n");
|
||||
fprintf(outputfile, ",$%02X", toupper(*str++) | (len ? 0x80 : 0x00));
|
||||
fprintf(outputfile, "\n");
|
||||
}
|
||||
}
|
||||
void emit_flags(int flags)
|
||||
@@ -366,22 +365,22 @@ void emit_header(void)
|
||||
int i;
|
||||
|
||||
if (outflags & ACME)
|
||||
printf("; ACME COMPATIBLE OUTPUT\n");
|
||||
fprintf(outputfile, "; ACME COMPATIBLE OUTPUT\n");
|
||||
else
|
||||
printf("; CA65 COMPATIBLE OUTPUT\n");
|
||||
fprintf(outputfile, "; CA65 COMPATIBLE OUTPUT\n");
|
||||
if (outflags & MODULE)
|
||||
{
|
||||
printf("\t%s\t_SEGEND-_SEGBEGIN\t; LENGTH OF HEADER + CODE/DATA + BYTECODE SEGMENT\n", DW);
|
||||
printf("_SEGBEGIN%c\n", LBL);
|
||||
printf("\t%s\t$6502\t\t\t; MAGIC #\n", DW);
|
||||
printf("\t%s\t_SYSFLAGS\t\t\t; SYSTEM FLAGS\n", DW);
|
||||
printf("\t%s\t_SUBSEG\t\t\t; BYTECODE SUB-SEGMENT\n", DW);
|
||||
printf("\t%s\t_DEFCNT\t\t\t; BYTECODE DEF COUNT\n", DW);
|
||||
printf("\t%s\t_INIT\t\t\t; MODULE INITIALIZATION ROUTINE\n", DW);
|
||||
fprintf(outputfile, "\t%s\t_SEGEND-_SEGBEGIN\t; LENGTH OF HEADER + CODE/DATA + BYTECODE SEGMENT\n", DW);
|
||||
fprintf(outputfile, "_SEGBEGIN%c\n", LBL);
|
||||
fprintf(outputfile, "\t%s\t$6502\t\t\t; MAGIC #\n", DW);
|
||||
fprintf(outputfile, "\t%s\t_SYSFLAGS\t\t\t; SYSTEM FLAGS\n", DW);
|
||||
fprintf(outputfile, "\t%s\t_SUBSEG\t\t\t; BYTECODE SUB-SEGMENT\n", DW);
|
||||
fprintf(outputfile, "\t%s\t_DEFCNT\t\t\t; BYTECODE DEF COUNT\n", DW);
|
||||
fprintf(outputfile, "\t%s\t_INIT\t\t\t; MODULE INITIALIZATION ROUTINE\n", DW);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\tJMP\t_INIT\t\t\t; MODULE INITIALIZATION ROUTINE\n");
|
||||
fprintf(outputfile, "\tJMP\t_INIT\t\t\t; MODULE INITIALIZATION ROUTINE\n");
|
||||
}
|
||||
/*
|
||||
* Init free op sequence table
|
||||
@@ -394,7 +393,7 @@ void emit_rld(void)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
printf(";\n; RE-LOCATEABLE DICTIONARY\n;\n");
|
||||
fprintf(outputfile, ";\n; RE-LOCATEABLE DICTIONARY\n;\n");
|
||||
/*
|
||||
* First emit the bytecode definition entrypoint information.
|
||||
*/
|
||||
@@ -410,9 +409,9 @@ void emit_rld(void)
|
||||
j = outflags & INIT ? defs - 1 : defs;
|
||||
for (i = 0; i < j; i++)
|
||||
{
|
||||
printf("\t%s\t$02\t\t\t; CODE TABLE FIXUP\n", DB);
|
||||
printf("\t%s\t_C%03d\t\t\n", DW, i);
|
||||
printf("\t%s\t$00\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$02\t\t\t; CODE TABLE FIXUP\n", DB);
|
||||
fprintf(outputfile, "\t%s\t_C%03d\t\t\n", DW, i);
|
||||
fprintf(outputfile, "\t%s\t$00\n", DB);
|
||||
}
|
||||
/*
|
||||
* Now emit the fixup table.
|
||||
@@ -421,53 +420,53 @@ void emit_rld(void)
|
||||
{
|
||||
if (fixup_type[i] & EXTERN_TYPE)
|
||||
{
|
||||
printf("\t%s\t$%02X\t\t\t; EXTERNAL FIXUP\n", DB, 0x11 + fixup_size[i] & 0xFF);
|
||||
printf("\t%s\t_F%03d-_SEGBEGIN\t\t\n", DW, i);
|
||||
printf("\t%s\t%d\t\t\t; ESD INDEX\n", DB, fixup_tag[i]);
|
||||
fprintf(outputfile, "\t%s\t$%02X\t\t\t; EXTERNAL FIXUP\n", DB, 0x11 + fixup_size[i] & 0xFF);
|
||||
fprintf(outputfile, "\t%s\t_F%03d-_SEGBEGIN\t\t\n", DW, i);
|
||||
fprintf(outputfile, "\t%s\t%d\t\t\t; ESD INDEX\n", DB, fixup_tag[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\t%s\t$%02X\t\t\t; INTERNAL FIXUP\n", DB, 0x01 + fixup_size[i] & 0xFF);
|
||||
printf("\t%s\t_F%03d-_SEGBEGIN\t\t\n", DW, i);
|
||||
printf("\t%s\t$00\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$%02X\t\t\t; INTERNAL FIXUP\n", DB, 0x01 + fixup_size[i] & 0xFF);
|
||||
fprintf(outputfile, "\t%s\t_F%03d-_SEGBEGIN\t\t\n", DW, i);
|
||||
fprintf(outputfile, "\t%s\t$00\n", DB);
|
||||
}
|
||||
}
|
||||
printf("\t%s\t$00\t\t\t; END OF RLD\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$00\t\t\t; END OF RLD\n", DB);
|
||||
}
|
||||
void emit_esd(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
printf(";\n; EXTERNAL/ENTRY SYMBOL DICTIONARY\n;\n");
|
||||
fprintf(outputfile, ";\n; EXTERNAL/ENTRY SYMBOL DICTIONARY\n;\n");
|
||||
for (i = 0; i < globals; i++)
|
||||
{
|
||||
if (idglobal_type[i] & ACCESSED_TYPE) // Only refer to accessed externals
|
||||
{
|
||||
emit_dci(&idglobal_name[i][1], idglobal_name[i][0]);
|
||||
printf("\t%s\t$10\t\t\t; EXTERNAL SYMBOL FLAG\n", DB);
|
||||
printf("\t%s\t%d\t\t\t; ESD INDEX\n", DW, idglobal_tag[i]);
|
||||
fprintf(outputfile, "\t%s\t$10\t\t\t; EXTERNAL SYMBOL FLAG\n", DB);
|
||||
fprintf(outputfile, "\t%s\t%d\t\t\t; ESD INDEX\n", DW, idglobal_tag[i]);
|
||||
}
|
||||
else if (idglobal_type[i] & EXPORT_TYPE)
|
||||
{
|
||||
emit_dci(&idglobal_name[i][1], idglobal_name[i][0]);
|
||||
printf("\t%s\t$08\t\t\t; ENTRY SYMBOL FLAG\n", DB);
|
||||
printf("\t%s\t%s\t\t\n", DW, tag_string(idglobal_tag[i], idglobal_type[i]));
|
||||
fprintf(outputfile, "\t%s\t$08\t\t\t; ENTRY SYMBOL FLAG\n", DB);
|
||||
fprintf(outputfile, "\t%s\t%s\t\t\n", DW, tag_string(idglobal_tag[i], idglobal_type[i]));
|
||||
}
|
||||
}
|
||||
printf("\t%s\t$00\t\t\t; END OF ESD\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$00\t\t\t; END OF ESD\n", DB);
|
||||
}
|
||||
void emit_trailer(void)
|
||||
{
|
||||
if (!(outflags & BYTECODE_SEG))
|
||||
emit_bytecode_seg();
|
||||
if (!(outflags & INIT))
|
||||
printf("_INIT\t=\t0\n");
|
||||
fprintf(outputfile, "_INIT\t=\t0\n");
|
||||
if (!(outflags & SYSFLAGS))
|
||||
printf("_SYSFLAGS\t=\t0\n");
|
||||
fprintf(outputfile, "_SYSFLAGS\t=\t0\n");
|
||||
if (outflags & MODULE)
|
||||
{
|
||||
printf("_DEFCNT\t=\t%d\n", defs);
|
||||
printf("_SEGEND%c\n", LBL);
|
||||
fprintf(outputfile, "_DEFCNT\t=\t%d\n", defs);
|
||||
fprintf(outputfile, "_SEGEND%c\n", LBL);
|
||||
emit_rld();
|
||||
emit_esd();
|
||||
}
|
||||
@@ -482,12 +481,12 @@ void emit_moddep(char *name, int len)
|
||||
idglobal_add(name, len, EXTERN_TYPE | WORD_TYPE, 2); // Add to symbol table
|
||||
}
|
||||
else
|
||||
printf("\t%s\t$00\t\t\t; END OF MODULE DEPENDENCIES\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$00\t\t\t; END OF MODULE DEPENDENCIES\n", DB);
|
||||
}
|
||||
}
|
||||
void emit_sysflags(int val)
|
||||
{
|
||||
printf("_SYSFLAGS\t=\t$%04X\t\t; SYSTEM FLAGS\n", val);
|
||||
fprintf(outputfile, "_SYSFLAGS\t=\t$%04X\t\t; SYSTEM FLAGS\n", val);
|
||||
outflags |= SYSFLAGS;
|
||||
}
|
||||
void emit_bytecode_seg(void)
|
||||
@@ -495,57 +494,57 @@ void emit_bytecode_seg(void)
|
||||
if ((outflags & MODULE) && !(outflags & BYTECODE_SEG))
|
||||
{
|
||||
if (lastglobalsize == 0) // Pad a byte if last label is at end of data segment
|
||||
printf("\t%s\t$00\t\t\t; PAD BYTE\n", DB);
|
||||
printf("_SUBSEG%c\t\t\t\t; BYTECODE STARTS\n", LBL);
|
||||
fprintf(outputfile, "\t%s\t$00\t\t\t; PAD BYTE\n", DB);
|
||||
fprintf(outputfile, "_SUBSEG%c\t\t\t\t; BYTECODE STARTS\n", LBL);
|
||||
}
|
||||
outflags |= BYTECODE_SEG;
|
||||
}
|
||||
void emit_comment(char *s)
|
||||
{
|
||||
printf("\t\t\t\t\t; %s\n", s);
|
||||
fprintf(outputfile, "\t\t\t\t\t; %s\n", s);
|
||||
}
|
||||
void emit_asm(char *s)
|
||||
{
|
||||
printf("%s\n", s);
|
||||
fprintf(outputfile, "%s\n", s);
|
||||
}
|
||||
void emit_idlocal(char *name, int value)
|
||||
{
|
||||
printf("\t\t\t\t\t; %s -> [%d]\n", name, value);
|
||||
fprintf(outputfile, "\t\t\t\t\t; %s -> [%d]\n", name, value);
|
||||
}
|
||||
void emit_idglobal(int tag, int size, char *name)
|
||||
{
|
||||
lastglobalsize = size;
|
||||
if (size == 0)
|
||||
printf("_D%03d%c\t\t\t\t\t; %s\n", tag, LBL, name);
|
||||
fprintf(outputfile, "_D%03d%c\t\t\t\t\t; %s\n", tag, LBL, name);
|
||||
else
|
||||
printf("_D%03d%c\t%s\t%d\t\t\t; %s\n", tag, LBL, DS, size, name);
|
||||
fprintf(outputfile, "_D%03d%c\t%s\t%d\t\t\t; %s\n", tag, LBL, DS, size, name);
|
||||
}
|
||||
void emit_idfunc(int tag, int type, char *name, int is_bytecode)
|
||||
{
|
||||
if (name)
|
||||
printf("%s%c\t\t\t\t\t; %s()\n", tag_string(tag, type), LBL, name);
|
||||
fprintf(outputfile, "%s%c\t\t\t\t\t; %s()\n", tag_string(tag, type), LBL, name);
|
||||
if (!(outflags & MODULE))
|
||||
{
|
||||
//printf("%s%c\n", name, LBL);
|
||||
//fprintf(outputfile, "%s%c\n", name, LBL);
|
||||
if (is_bytecode)
|
||||
printf("\tJSR\tINTERP\n");
|
||||
fprintf(outputfile, "\tJSR\tINTERP\n");
|
||||
}
|
||||
}
|
||||
void emit_lambdafunc(int tag, char *name, int cparams, t_opseq *lambda_seq)
|
||||
{
|
||||
emit_idfunc(tag, DEF_TYPE, name, 1);
|
||||
if (cparams)
|
||||
printf("\t%s\t$58,$%02X,$%02X\t\t; ENTER\t%d,%d\n", DB, cparams*2, cparams, cparams*2, cparams);
|
||||
fprintf(outputfile, "\t%s\t$58,$%02X,$%02X\t\t; ENTER\t%d,%d\n", DB, cparams*2, cparams, cparams*2, cparams);
|
||||
emit_seq(lambda_seq);
|
||||
emit_pending_seq();
|
||||
if (cparams)
|
||||
printf("\t%s\t$5A,$%02X\t\t\t; LEAVE\t%d\n", DB, cparams*2, cparams*2);
|
||||
fprintf(outputfile, "\t%s\t$5A,$%02X\t\t\t; LEAVE\t%d\n", DB, cparams*2, cparams*2);
|
||||
else
|
||||
printf("\t%s\t$5C\t\t\t; RET\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$5C\t\t\t; RET\n", DB);
|
||||
}
|
||||
void emit_idconst(char *name, int value)
|
||||
{
|
||||
printf("\t\t\t\t\t; %s = %d\n", name, value);
|
||||
fprintf(outputfile, "\t\t\t\t\t; %s = %d\n", name, value);
|
||||
}
|
||||
int emit_data(int vartype, int consttype, long constval, int constsize)
|
||||
{
|
||||
@@ -554,25 +553,25 @@ int emit_data(int vartype, int consttype, long constval, int constsize)
|
||||
if (consttype == 0)
|
||||
{
|
||||
datasize = constsize;
|
||||
printf("\t%s\t$%02X\n", DS, constsize);
|
||||
fprintf(outputfile, "\t%s\t$%02X\n", DS, constsize);
|
||||
}
|
||||
else if (consttype & STRING_TYPE)
|
||||
{
|
||||
str = (unsigned char *)constval;
|
||||
constsize = *str++;
|
||||
datasize = constsize + 1;
|
||||
printf("\t%s\t$%02X\n", DB, constsize);
|
||||
fprintf(outputfile, "\t%s\t$%02X\n", DB, constsize);
|
||||
while (constsize-- > 0)
|
||||
{
|
||||
printf("\t%s\t$%02X", DB, *str++);
|
||||
fprintf(outputfile, "\t%s\t$%02X", DB, *str++);
|
||||
for (i = 0; i < 7; i++)
|
||||
{
|
||||
if (constsize-- > 0)
|
||||
printf(",$%02X", *str++);
|
||||
fprintf(outputfile, ",$%02X", *str++);
|
||||
else
|
||||
break;
|
||||
}
|
||||
printf("\n");
|
||||
fprintf(outputfile, "\n");
|
||||
}
|
||||
}
|
||||
else if (consttype & ADDR_TYPE)
|
||||
@@ -582,18 +581,18 @@ int emit_data(int vartype, int consttype, long constval, int constsize)
|
||||
int fixup = fixup_new(constval, consttype, FIXUP_WORD);
|
||||
datasize = 2;
|
||||
if (consttype & EXTERN_TYPE)
|
||||
printf("_F%03d%c\t%s\t0\t\t\t; %s\n", fixup, LBL, DW, tag_string(constval, consttype));
|
||||
fprintf(outputfile, "_F%03d%c\t%s\t0\t\t\t; %s\n", fixup, LBL, DW, tag_string(constval, consttype));
|
||||
else
|
||||
printf("_F%03d%c\t%s\t%s\n", fixup, LBL, DW, tag_string(constval, consttype));
|
||||
fprintf(outputfile, "_F%03d%c\t%s\t%s\n", fixup, LBL, DW, tag_string(constval, consttype));
|
||||
}
|
||||
else
|
||||
{
|
||||
int fixup = fixup_new(constval, consttype, FIXUP_BYTE);
|
||||
datasize = 1;
|
||||
if (consttype & EXTERN_TYPE)
|
||||
printf("_F%03d%c\t%s\t0\t\t\t; %s\n", fixup, LBL, DB, tag_string(constval, consttype));
|
||||
fprintf(outputfile, "_F%03d%c\t%s\t0\t\t\t; %s\n", fixup, LBL, DB, tag_string(constval, consttype));
|
||||
else
|
||||
printf("_F%03d%c\t%s\t%s\n", fixup, LBL, DB, tag_string(constval, consttype));
|
||||
fprintf(outputfile, "_F%03d%c\t%s\t%s\n", fixup, LBL, DB, tag_string(constval, consttype));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -601,12 +600,12 @@ int emit_data(int vartype, int consttype, long constval, int constsize)
|
||||
if (vartype & WORD_TYPE)
|
||||
{
|
||||
datasize = 2;
|
||||
printf("\t%s\t$%04lX\n", DW, constval & 0xFFFF);
|
||||
fprintf(outputfile, "\t%s\t$%04lX\n", DW, constval & 0xFFFF);
|
||||
}
|
||||
else
|
||||
{
|
||||
datasize = 1;
|
||||
printf("\t%s\t$%02lX\n", DB, constval & 0xFF);
|
||||
fprintf(outputfile, "\t%s\t$%02lX\n", DB, constval & 0xFF);
|
||||
}
|
||||
}
|
||||
return (datasize);
|
||||
@@ -614,78 +613,78 @@ int emit_data(int vartype, int consttype, long constval, int constsize)
|
||||
void emit_codetag(int tag)
|
||||
{
|
||||
emit_pending_seq();
|
||||
printf("_B%03d%c\n", tag, LBL);
|
||||
fprintf(outputfile, "_B%03d%c\n", tag, LBL);
|
||||
}
|
||||
void emit_const(int cval)
|
||||
{
|
||||
emit_pending_seq();
|
||||
if ((cval & 0xFFFF) == 0xFFFF)
|
||||
printf("\t%s\t$20\t\t\t; MINUS ONE\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$20\t\t\t; MINUS ONE\n", DB);
|
||||
else if ((cval & 0xFFF0) == 0x0000)
|
||||
printf("\t%s\t$%02X\t\t\t; CN\t%d\n", DB, cval*2, cval);
|
||||
fprintf(outputfile, "\t%s\t$%02X\t\t\t; CN\t%d\n", DB, cval*2, cval);
|
||||
else if ((cval & 0xFF00) == 0x0000)
|
||||
printf("\t%s\t$2A,$%02X\t\t\t; CB\t%d\n", DB, cval, cval);
|
||||
fprintf(outputfile, "\t%s\t$2A,$%02X\t\t\t; CB\t%d\n", DB, cval, cval);
|
||||
else if ((cval & 0xFF00) == 0xFF00)
|
||||
printf("\t%s\t$5E,$%02X\t\t\t; CFFB\t%d\n", DB, cval&0xFF, cval);
|
||||
fprintf(outputfile, "\t%s\t$5E,$%02X\t\t\t; CFFB\t%d\n", DB, cval&0xFF, cval);
|
||||
else
|
||||
printf("\t%s\t$2C,$%02X,$%02X\t\t; CW\t%d\n", DB, cval&0xFF,(cval>>8)&0xFF, cval);
|
||||
fprintf(outputfile, "\t%s\t$2C,$%02X,$%02X\t\t; CW\t%d\n", DB, cval&0xFF,(cval>>8)&0xFF, cval);
|
||||
}
|
||||
void emit_conststr(long conststr)
|
||||
{
|
||||
printf("\t%s\t$2E\t\t\t; CS\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$2E\t\t\t; CS\n", DB);
|
||||
emit_data(0, STRING_TYPE, conststr, 0);
|
||||
}
|
||||
void emit_addi(int cval)
|
||||
{
|
||||
emit_pending_seq();
|
||||
printf("\t%s\t$38,$%02X\t\t\t; ADDI\t%d\n", DB, cval, cval);
|
||||
fprintf(outputfile, "\t%s\t$38,$%02X\t\t\t; ADDI\t%d\n", DB, cval, cval);
|
||||
}
|
||||
void emit_subi(int cval)
|
||||
{
|
||||
emit_pending_seq();
|
||||
printf("\t%s\t$3A,$%02X\t\t\t; SUBI\t%d\n", DB, cval, cval);
|
||||
fprintf(outputfile, "\t%s\t$3A,$%02X\t\t\t; SUBI\t%d\n", DB, cval, cval);
|
||||
}
|
||||
void emit_andi(int cval)
|
||||
{
|
||||
emit_pending_seq();
|
||||
printf("\t%s\t$3C,$%02X\t\t\t; ANDI\t%d\n", DB, cval, cval);
|
||||
fprintf(outputfile, "\t%s\t$3C,$%02X\t\t\t; ANDI\t%d\n", DB, cval, cval);
|
||||
}
|
||||
void emit_ori(int cval)
|
||||
{
|
||||
emit_pending_seq();
|
||||
printf("\t%s\t$3E,$%02X\t\t\t; ORI\t%d\n", DB, cval, cval);
|
||||
fprintf(outputfile, "\t%s\t$3E,$%02X\t\t\t; ORI\t%d\n", DB, cval, cval);
|
||||
}
|
||||
void emit_lb(void)
|
||||
{
|
||||
printf("\t%s\t$60\t\t\t; LB\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$60\t\t\t; LB\n", DB);
|
||||
}
|
||||
void emit_lw(void)
|
||||
{
|
||||
printf("\t%s\t$62\t\t\t; LW\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$62\t\t\t; LW\n", DB);
|
||||
}
|
||||
void emit_llb(int index)
|
||||
{
|
||||
printf("\t%s\t$64,$%02X\t\t\t; LLB\t[%d]\n", DB, index, index);
|
||||
fprintf(outputfile, "\t%s\t$64,$%02X\t\t\t; LLB\t[%d]\n", DB, index, index);
|
||||
}
|
||||
void emit_llw(int index)
|
||||
{
|
||||
printf("\t%s\t$66,$%02X\t\t\t; LLW\t[%d]\n", DB, index, index);
|
||||
fprintf(outputfile, "\t%s\t$66,$%02X\t\t\t; LLW\t[%d]\n", DB, index, index);
|
||||
}
|
||||
void emit_addlb(int index)
|
||||
{
|
||||
printf("\t%s\t$B0,$%02X\t\t\t; ADDLB\t[%d]\n", DB, index, index);
|
||||
fprintf(outputfile, "\t%s\t$B0,$%02X\t\t\t; ADDLB\t[%d]\n", DB, index, index);
|
||||
}
|
||||
void emit_addlw(int index)
|
||||
{
|
||||
printf("\t%s\t$B2,$%02X\t\t\t; ADDLW\t[%d]\n", DB, index, index);
|
||||
fprintf(outputfile, "\t%s\t$B2,$%02X\t\t\t; ADDLW\t[%d]\n", DB, index, index);
|
||||
}
|
||||
void emit_idxlb(int index)
|
||||
{
|
||||
printf("\t%s\t$B8,$%02X\t\t\t; IDXLB\t[%d]\n", DB, index, index);
|
||||
fprintf(outputfile, "\t%s\t$B8,$%02X\t\t\t; IDXLB\t[%d]\n", DB, index, index);
|
||||
}
|
||||
void emit_idxlw(int index)
|
||||
{
|
||||
printf("\t%s\t$BA,$%02X\t\t\t; IDXLW\t[%d]\n", DB, index, index);
|
||||
fprintf(outputfile, "\t%s\t$BA,$%02X\t\t\t; IDXLW\t[%d]\n", DB, index, index);
|
||||
}
|
||||
void emit_lab(int tag, int offset, int type)
|
||||
{
|
||||
@@ -693,12 +692,12 @@ void emit_lab(int tag, int offset, int type)
|
||||
{
|
||||
int fixup = fixup_new(tag, type, FIXUP_WORD);
|
||||
char *taglbl = tag_string(tag, type);
|
||||
printf("\t%s\t$68\t\t\t; LAB\t%s+%d\n", DB, taglbl, offset);
|
||||
printf("_F%03d%c\t%s\t%s+%d\t\t\n", fixup, LBL, DW, type & EXTERN_TYPE ? "0" : taglbl, offset);
|
||||
fprintf(outputfile, "\t%s\t$68\t\t\t; LAB\t%s+%d\n", DB, taglbl, offset);
|
||||
fprintf(outputfile, "_F%03d%c\t%s\t%s+%d\t\t\n", fixup, LBL, DW, type & EXTERN_TYPE ? "0" : taglbl, offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\t%s\t$68,$%02X,$%02X\t\t; LAB\t%d\n", DB, offset&0xFF,(offset>>8)&0xFF, offset);
|
||||
fprintf(outputfile, "\t%s\t$68,$%02X,$%02X\t\t; LAB\t%d\n", DB, offset&0xFF,(offset>>8)&0xFF, offset);
|
||||
}
|
||||
}
|
||||
void emit_law(int tag, int offset, int type)
|
||||
@@ -707,12 +706,12 @@ void emit_law(int tag, int offset, int type)
|
||||
{
|
||||
int fixup = fixup_new(tag, type, FIXUP_WORD);
|
||||
char *taglbl = tag_string(tag, type);
|
||||
printf("\t%s\t$6A\t\t\t; LAW\t%s+%d\n", DB, taglbl, offset);
|
||||
printf("_F%03d%c\t%s\t%s+%d\t\t\n", fixup, LBL, DW, type & EXTERN_TYPE ? "0" : taglbl, offset);
|
||||
fprintf(outputfile, "\t%s\t$6A\t\t\t; LAW\t%s+%d\n", DB, taglbl, offset);
|
||||
fprintf(outputfile, "_F%03d%c\t%s\t%s+%d\t\t\n", fixup, LBL, DW, type & EXTERN_TYPE ? "0" : taglbl, offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\t%s\t$6A,$%02X,$%02X\t\t; LAW\t%d\n", DB, offset&0xFF,(offset>>8)&0xFF, offset);
|
||||
fprintf(outputfile, "\t%s\t$6A,$%02X,$%02X\t\t; LAW\t%d\n", DB, offset&0xFF,(offset>>8)&0xFF, offset);
|
||||
}
|
||||
}
|
||||
void emit_addab(int tag, int offset, int type)
|
||||
@@ -721,12 +720,12 @@ void emit_addab(int tag, int offset, int type)
|
||||
{
|
||||
int fixup = fixup_new(tag, type, FIXUP_WORD);
|
||||
char *taglbl = tag_string(tag, type);
|
||||
printf("\t%s\t$B4\t\t\t; ADDAB\t%s+%d\n", DB, taglbl, offset);
|
||||
printf("_F%03d%c\t%s\t%s+%d\t\t\n", fixup, LBL, DW, type & EXTERN_TYPE ? "0" : taglbl, offset);
|
||||
fprintf(outputfile, "\t%s\t$B4\t\t\t; ADDAB\t%s+%d\n", DB, taglbl, offset);
|
||||
fprintf(outputfile, "_F%03d%c\t%s\t%s+%d\t\t\n", fixup, LBL, DW, type & EXTERN_TYPE ? "0" : taglbl, offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\t%s\t$B4,$%02X,$%02X\t\t; ADDAB\t%d\n", DB, offset&0xFF,(offset>>8)&0xFF, offset);
|
||||
fprintf(outputfile, "\t%s\t$B4,$%02X,$%02X\t\t; ADDAB\t%d\n", DB, offset&0xFF,(offset>>8)&0xFF, offset);
|
||||
}
|
||||
}
|
||||
void emit_addaw(int tag, int offset, int type)
|
||||
@@ -735,12 +734,12 @@ void emit_addaw(int tag, int offset, int type)
|
||||
{
|
||||
int fixup = fixup_new(tag, type, FIXUP_WORD);
|
||||
char *taglbl = tag_string(tag, type);
|
||||
printf("\t%s\t$B6\t\t\t; ADDAW\t%s+%d\n", DB, taglbl, offset);
|
||||
printf("_F%03d%c\t%s\t%s+%d\t\t\n", fixup, LBL, DW, type & EXTERN_TYPE ? "0" : taglbl, offset);
|
||||
fprintf(outputfile, "\t%s\t$B6\t\t\t; ADDAW\t%s+%d\n", DB, taglbl, offset);
|
||||
fprintf(outputfile, "_F%03d%c\t%s\t%s+%d\t\t\n", fixup, LBL, DW, type & EXTERN_TYPE ? "0" : taglbl, offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\t%s\t$B6,$%02X,$%02X\t\t; ADDAW\t%d\n", DB, offset&0xFF,(offset>>8)&0xFF, offset);
|
||||
fprintf(outputfile, "\t%s\t$B6,$%02X,$%02X\t\t; ADDAW\t%d\n", DB, offset&0xFF,(offset>>8)&0xFF, offset);
|
||||
}
|
||||
}
|
||||
void emit_idxab(int tag, int offset, int type)
|
||||
@@ -749,12 +748,12 @@ void emit_idxab(int tag, int offset, int type)
|
||||
{
|
||||
int fixup = fixup_new(tag, type, FIXUP_WORD);
|
||||
char *taglbl = tag_string(tag, type);
|
||||
printf("\t%s\t$BC\t\t\t; IDXAB\t%s+%d\n", DB, taglbl, offset);
|
||||
printf("_F%03d%c\t%s\t%s+%d\t\t\n", fixup, LBL, DW, type & EXTERN_TYPE ? "0" : taglbl, offset);
|
||||
fprintf(outputfile, "\t%s\t$BC\t\t\t; IDXAB\t%s+%d\n", DB, taglbl, offset);
|
||||
fprintf(outputfile, "_F%03d%c\t%s\t%s+%d\t\t\n", fixup, LBL, DW, type & EXTERN_TYPE ? "0" : taglbl, offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\t%s\t$BC,$%02X,$%02X\t\t; IDXAB\t%d\n", DB, offset&0xFF,(offset>>8)&0xFF, offset);
|
||||
fprintf(outputfile, "\t%s\t$BC,$%02X,$%02X\t\t; IDXAB\t%d\n", DB, offset&0xFF,(offset>>8)&0xFF, offset);
|
||||
}
|
||||
}
|
||||
void emit_idxaw(int tag, int offset, int type)
|
||||
@@ -763,37 +762,37 @@ void emit_idxaw(int tag, int offset, int type)
|
||||
{
|
||||
int fixup = fixup_new(tag, type, FIXUP_WORD);
|
||||
char *taglbl = tag_string(tag, type);
|
||||
printf("\t%s\t$BE\t\t\t; IDXAW\t%s+%d\n", DB, taglbl, offset);
|
||||
printf("_F%03d%c\t%s\t%s+%d\t\t\n", fixup, LBL, DW, type & EXTERN_TYPE ? "0" : taglbl, offset);
|
||||
fprintf(outputfile, "\t%s\t$BE\t\t\t; IDXAW\t%s+%d\n", DB, taglbl, offset);
|
||||
fprintf(outputfile, "_F%03d%c\t%s\t%s+%d\t\t\n", fixup, LBL, DW, type & EXTERN_TYPE ? "0" : taglbl, offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\t%s\t$BE,$%02X,$%02X\t\t; IDXAW\t%d\n", DB, offset&0xFF,(offset>>8)&0xFF, offset);
|
||||
fprintf(outputfile, "\t%s\t$BE,$%02X,$%02X\t\t; IDXAW\t%d\n", DB, offset&0xFF,(offset>>8)&0xFF, offset);
|
||||
}
|
||||
}
|
||||
void emit_sb(void)
|
||||
{
|
||||
printf("\t%s\t$70\t\t\t; SB\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$70\t\t\t; SB\n", DB);
|
||||
}
|
||||
void emit_sw(void)
|
||||
{
|
||||
printf("\t%s\t$72\t\t\t; SW\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$72\t\t\t; SW\n", DB);
|
||||
}
|
||||
void emit_slb(int index)
|
||||
{
|
||||
printf("\t%s\t$74,$%02X\t\t\t; SLB\t[%d]\n", DB, index, index);
|
||||
fprintf(outputfile, "\t%s\t$74,$%02X\t\t\t; SLB\t[%d]\n", DB, index, index);
|
||||
}
|
||||
void emit_slw(int index)
|
||||
{
|
||||
printf("\t%s\t$76,$%02X\t\t\t; SLW\t[%d]\n", DB, index, index);
|
||||
fprintf(outputfile, "\t%s\t$76,$%02X\t\t\t; SLW\t[%d]\n", DB, index, index);
|
||||
}
|
||||
void emit_dlb(int index)
|
||||
{
|
||||
printf("\t%s\t$6C,$%02X\t\t\t; DLB\t[%d]\n", DB, index, index);
|
||||
fprintf(outputfile, "\t%s\t$6C,$%02X\t\t\t; DLB\t[%d]\n", DB, index, index);
|
||||
}
|
||||
void emit_dlw(int index)
|
||||
{
|
||||
printf("\t%s\t$6E,$%02X\t\t\t; DLW\t[%d]\n", DB, index, index);
|
||||
fprintf(outputfile, "\t%s\t$6E,$%02X\t\t\t; DLW\t[%d]\n", DB, index, index);
|
||||
}
|
||||
void emit_sab(int tag, int offset, int type)
|
||||
{
|
||||
@@ -801,12 +800,12 @@ void emit_sab(int tag, int offset, int type)
|
||||
{
|
||||
int fixup = fixup_new(tag, type, FIXUP_WORD);
|
||||
char *taglbl = tag_string(tag, type);
|
||||
printf("\t%s\t$78\t\t\t; SAB\t%s+%d\n", DB, taglbl, offset);
|
||||
printf("_F%03d%c\t%s\t%s+%d\t\t\n", fixup, LBL, DW, type & EXTERN_TYPE ? "0" : taglbl, offset);
|
||||
fprintf(outputfile, "\t%s\t$78\t\t\t; SAB\t%s+%d\n", DB, taglbl, offset);
|
||||
fprintf(outputfile, "_F%03d%c\t%s\t%s+%d\t\t\n", fixup, LBL, DW, type & EXTERN_TYPE ? "0" : taglbl, offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\t%s\t$78,$%02X,$%02X\t\t; SAB\t%d\n", DB, offset&0xFF,(offset>>8)&0xFF, offset);
|
||||
fprintf(outputfile, "\t%s\t$78,$%02X,$%02X\t\t; SAB\t%d\n", DB, offset&0xFF,(offset>>8)&0xFF, offset);
|
||||
}
|
||||
}
|
||||
void emit_saw(int tag, int offset, int type)
|
||||
@@ -815,12 +814,12 @@ void emit_saw(int tag, int offset, int type)
|
||||
{
|
||||
int fixup = fixup_new(tag, type, FIXUP_WORD);
|
||||
char *taglbl = tag_string(tag, type);
|
||||
printf("\t%s\t$7A\t\t\t; SAW\t%s+%d\n", DB, taglbl, offset);
|
||||
printf("_F%03d%c\t%s\t%s+%d\t\t\n", fixup, LBL, DW, type & EXTERN_TYPE ? "0" : taglbl, offset);
|
||||
fprintf(outputfile, "\t%s\t$7A\t\t\t; SAW\t%s+%d\n", DB, taglbl, offset);
|
||||
fprintf(outputfile, "_F%03d%c\t%s\t%s+%d\t\t\n", fixup, LBL, DW, type & EXTERN_TYPE ? "0" : taglbl, offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\t%s\t$7A,$%02X,$%02X\t\t; SAW\t%d\n", DB, offset&0xFF,(offset>>8)&0xFF, offset);
|
||||
fprintf(outputfile, "\t%s\t$7A,$%02X,$%02X\t\t; SAW\t%d\n", DB, offset&0xFF,(offset>>8)&0xFF, offset);
|
||||
}
|
||||
}
|
||||
void emit_dab(int tag, int offset, int type)
|
||||
@@ -829,11 +828,11 @@ void emit_dab(int tag, int offset, int type)
|
||||
{
|
||||
int fixup = fixup_new(tag, type, FIXUP_WORD);
|
||||
char *taglbl = tag_string(tag, type);
|
||||
printf("\t%s\t$7C\t\t\t; DAB\t%s+%d\n", DB, taglbl, offset);
|
||||
printf("_F%03d%c\t%s\t%s+%d\t\t\n", fixup, LBL, DW, type & EXTERN_TYPE ? "0" : taglbl, offset);
|
||||
fprintf(outputfile, "\t%s\t$7C\t\t\t; DAB\t%s+%d\n", DB, taglbl, offset);
|
||||
fprintf(outputfile, "_F%03d%c\t%s\t%s+%d\t\t\n", fixup, LBL, DW, type & EXTERN_TYPE ? "0" : taglbl, offset);
|
||||
}
|
||||
else
|
||||
printf("\t%s\t$7C,$%02X,$%02X\t\t; DAB\t%d\n", DB, offset&0xFF,(offset>>8)&0xFF, offset);
|
||||
fprintf(outputfile, "\t%s\t$7C,$%02X,$%02X\t\t; DAB\t%d\n", DB, offset&0xFF,(offset>>8)&0xFF, offset);
|
||||
}
|
||||
void emit_daw(int tag, int offset, int type)
|
||||
{
|
||||
@@ -841,36 +840,36 @@ void emit_daw(int tag, int offset, int type)
|
||||
{
|
||||
int fixup = fixup_new(tag, type, FIXUP_WORD);
|
||||
char *taglbl = tag_string(tag, type);
|
||||
printf("\t%s\t$7E\t\t\t; DAW\t%s+%d\n", DB, taglbl, offset);
|
||||
printf("_F%03d%c\t%s\t%s+%d\t\t\n", fixup, LBL, DW, type & EXTERN_TYPE ? "0" : taglbl, offset);
|
||||
fprintf(outputfile, "\t%s\t$7E\t\t\t; DAW\t%s+%d\n", DB, taglbl, offset);
|
||||
fprintf(outputfile, "_F%03d%c\t%s\t%s+%d\t\t\n", fixup, LBL, DW, type & EXTERN_TYPE ? "0" : taglbl, offset);
|
||||
}
|
||||
else
|
||||
printf("\t%s\t$7E,$%02X,$%02X\t\t; DAW\t%d\n", DB, offset&0xFF,(offset>>8)&0xFF, offset);
|
||||
fprintf(outputfile, "\t%s\t$7E,$%02X,$%02X\t\t; DAW\t%d\n", DB, offset&0xFF,(offset>>8)&0xFF, offset);
|
||||
}
|
||||
void emit_localaddr(int index)
|
||||
{
|
||||
printf("\t%s\t$28,$%02X\t\t\t; LLA\t[%d]\n", DB, index, index);
|
||||
fprintf(outputfile, "\t%s\t$28,$%02X\t\t\t; LLA\t[%d]\n", DB, index, index);
|
||||
}
|
||||
void emit_globaladdr(int tag, int offset, int type)
|
||||
{
|
||||
int fixup = fixup_new(tag, type, FIXUP_WORD);
|
||||
char *taglbl = tag_string(tag, type);
|
||||
printf("\t%s\t$26\t\t\t; LA\t%s+%d\n", DB, taglbl, offset);
|
||||
printf("_F%03d%c\t%s\t%s+%d\t\t\n", fixup, LBL, DW, type & EXTERN_TYPE ? "0" : taglbl, offset);
|
||||
fprintf(outputfile, "\t%s\t$26\t\t\t; LA\t%s+%d\n", DB, taglbl, offset);
|
||||
fprintf(outputfile, "_F%03d%c\t%s\t%s+%d\t\t\n", fixup, LBL, DW, type & EXTERN_TYPE ? "0" : taglbl, offset);
|
||||
}
|
||||
void emit_indexbyte(void)
|
||||
{
|
||||
printf("\t%s\t$82\t\t\t; IDXB\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$82\t\t\t; IDXB\n", DB);
|
||||
}
|
||||
void emit_indexword(void)
|
||||
{
|
||||
printf("\t%s\t$9E\t\t\t; IDXW\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$9E\t\t\t; IDXW\n", DB);
|
||||
}
|
||||
void emit_select(int tag)
|
||||
{
|
||||
emit_pending_seq();
|
||||
printf("\t%s\t$52\t\t\t; SEL\n", DB);
|
||||
printf("\t%s\t_B%03d-*\n", DW, tag);
|
||||
fprintf(outputfile, "\t%s\t$52\t\t\t; SEL\n", DB);
|
||||
fprintf(outputfile, "\t%s\t_B%03d-*\n", DW, tag);
|
||||
}
|
||||
void emit_caseblock(int casecnt, int *caseof, int *casetag)
|
||||
{
|
||||
@@ -879,144 +878,144 @@ void emit_caseblock(int casecnt, int *caseof, int *casetag)
|
||||
if (casecnt < 1 || casecnt > 256)
|
||||
parse_error("Switch count under/overflow\n");
|
||||
emit_pending_seq();
|
||||
printf("\t%s\t$%02lX\t\t\t; CASEBLOCK\n", DB, casecnt & 0xFF);
|
||||
fprintf(outputfile, "\t%s\t$%02X\t\t\t; CASEBLOCK\n", DB, casecnt & 0xFF);
|
||||
for (i = 0; i < casecnt; i++)
|
||||
{
|
||||
printf("\t%s\t$%04lX\n", DW, caseof[i] & 0xFFFF);
|
||||
printf("\t%s\t_B%03d-*\n", DW, casetag[i]);
|
||||
fprintf(outputfile, "\t%s\t$%04X\n", DW, caseof[i] & 0xFFFF);
|
||||
fprintf(outputfile, "\t%s\t_B%03d-*\n", DW, casetag[i]);
|
||||
}
|
||||
}
|
||||
void emit_breq(int tag)
|
||||
{
|
||||
printf("\t%s\t$22\t\t\t; BREQ\t_B%03d\n", DB, tag);
|
||||
printf("\t%s\t_B%03d-*\n", DW, tag);
|
||||
fprintf(outputfile, "\t%s\t$22\t\t\t; BREQ\t_B%03d\n", DB, tag);
|
||||
fprintf(outputfile, "\t%s\t_B%03d-*\n", DW, tag);
|
||||
}
|
||||
void emit_brne(int tag)
|
||||
{
|
||||
printf("\t%s\t$24\t\t\t; BRNE\t_B%03d\n", DB, tag);
|
||||
printf("\t%s\t_B%03d-*\n", DW, tag);
|
||||
fprintf(outputfile, "\t%s\t$24\t\t\t; BRNE\t_B%03d\n", DB, tag);
|
||||
fprintf(outputfile, "\t%s\t_B%03d-*\n", DW, tag);
|
||||
}
|
||||
void emit_brfls(int tag)
|
||||
{
|
||||
printf("\t%s\t$4C\t\t\t; BRFLS\t_B%03d\n", DB, tag);
|
||||
printf("\t%s\t_B%03d-*\n", DW, tag);
|
||||
fprintf(outputfile, "\t%s\t$4C\t\t\t; BRFLS\t_B%03d\n", DB, tag);
|
||||
fprintf(outputfile, "\t%s\t_B%03d-*\n", DW, tag);
|
||||
}
|
||||
void emit_brtru(int tag)
|
||||
{
|
||||
printf("\t%s\t$4E\t\t\t; BRTRU\t_B%03d\n", DB, tag);
|
||||
printf("\t%s\t_B%03d-*\n", DW, tag);
|
||||
fprintf(outputfile, "\t%s\t$4E\t\t\t; BRTRU\t_B%03d\n", DB, tag);
|
||||
fprintf(outputfile, "\t%s\t_B%03d-*\n", DW, tag);
|
||||
}
|
||||
void emit_brnch(int tag)
|
||||
{
|
||||
emit_pending_seq();
|
||||
printf("\t%s\t$50\t\t\t; BRNCH\t_B%03d\n", DB, tag);
|
||||
printf("\t%s\t_B%03d-*\n", DW, tag);
|
||||
fprintf(outputfile, "\t%s\t$50\t\t\t; BRNCH\t_B%03d\n", DB, tag);
|
||||
fprintf(outputfile, "\t%s\t_B%03d-*\n", DW, tag);
|
||||
}
|
||||
void emit_brand(int tag)
|
||||
{
|
||||
emit_pending_seq();
|
||||
printf("\t%s\t$AC\t\t\t; BRAND\t_B%03d\n", DB, tag);
|
||||
printf("\t%s\t_B%03d-*\n", DW, tag);
|
||||
fprintf(outputfile, "\t%s\t$AC\t\t\t; BRAND\t_B%03d\n", DB, tag);
|
||||
fprintf(outputfile, "\t%s\t_B%03d-*\n", DW, tag);
|
||||
}
|
||||
void emit_bror(int tag)
|
||||
{
|
||||
emit_pending_seq();
|
||||
printf("\t%s\t$AE\t\t\t; BROR\t_B%03d\n", DB, tag);
|
||||
printf("\t%s\t_B%03d-*\n", DW, tag);
|
||||
fprintf(outputfile, "\t%s\t$AE\t\t\t; BROR\t_B%03d\n", DB, tag);
|
||||
fprintf(outputfile, "\t%s\t_B%03d-*\n", DW, tag);
|
||||
}
|
||||
void emit_brgt(int tag)
|
||||
{
|
||||
emit_pending_seq();
|
||||
printf("\t%s\t$A0\t\t\t; BRGT\t_B%03d\n", DB, tag);
|
||||
printf("\t%s\t_B%03d-*\n", DW, tag);
|
||||
fprintf(outputfile, "\t%s\t$A0\t\t\t; BRGT\t_B%03d\n", DB, tag);
|
||||
fprintf(outputfile, "\t%s\t_B%03d-*\n", DW, tag);
|
||||
}
|
||||
void emit_brlt(int tag)
|
||||
{
|
||||
emit_pending_seq();
|
||||
printf("\t%s\t$A2\t\t\t; BRLT\t_B%03d\n", DB, tag);
|
||||
printf("\t%s\t_B%03d-*\n", DW, tag);
|
||||
fprintf(outputfile, "\t%s\t$A2\t\t\t; BRLT\t_B%03d\n", DB, tag);
|
||||
fprintf(outputfile, "\t%s\t_B%03d-*\n", DW, tag);
|
||||
}
|
||||
void emit_incbrle(int tag)
|
||||
{
|
||||
emit_pending_seq();
|
||||
printf("\t%s\t$A4\t\t\t; INCBRLE\t_B%03d\n", DB, tag);
|
||||
printf("\t%s\t_B%03d-*\n", DW, tag);
|
||||
fprintf(outputfile, "\t%s\t$A4\t\t\t; INCBRLE\t_B%03d\n", DB, tag);
|
||||
fprintf(outputfile, "\t%s\t_B%03d-*\n", DW, tag);
|
||||
}
|
||||
void emit_addbrle(int tag)
|
||||
{
|
||||
emit_pending_seq();
|
||||
printf("\t%s\t$A6\t\t\t; ADDBRLE\t_B%03d\n", DB, tag);
|
||||
printf("\t%s\t_B%03d-*\n", DW, tag);
|
||||
fprintf(outputfile, "\t%s\t$A6\t\t\t; ADDBRLE\t_B%03d\n", DB, tag);
|
||||
fprintf(outputfile, "\t%s\t_B%03d-*\n", DW, tag);
|
||||
}
|
||||
void emit_decbrge(int tag)
|
||||
{
|
||||
emit_pending_seq();
|
||||
printf("\t%s\t$A8\t\t\t; DECBRGE\t_B%03d\n", DB, tag);
|
||||
printf("\t%s\t_B%03d-*\n", DW, tag);
|
||||
fprintf(outputfile, "\t%s\t$A8\t\t\t; DECBRGE\t_B%03d\n", DB, tag);
|
||||
fprintf(outputfile, "\t%s\t_B%03d-*\n", DW, tag);
|
||||
}
|
||||
void emit_subbrge(int tag)
|
||||
{
|
||||
emit_pending_seq();
|
||||
printf("\t%s\t$AA\t\t\t; SUBBRGE\t_B%03d\n", DB, tag);
|
||||
printf("\t%s\t_B%03d-*\n", DW, tag);
|
||||
fprintf(outputfile, "\t%s\t$AA\t\t\t; SUBBRGE\t_B%03d\n", DB, tag);
|
||||
fprintf(outputfile, "\t%s\t_B%03d-*\n", DW, tag);
|
||||
}
|
||||
void emit_call(int tag, int type)
|
||||
{
|
||||
if (type == CONST_TYPE)
|
||||
{
|
||||
printf("\t%s\t$54\t\t\t; CALL\t%i\n", DB, tag);
|
||||
printf("\t%s\t%i\t\t\n", DW, tag);
|
||||
fprintf(outputfile, "\t%s\t$54\t\t\t; CALL\t%i\n", DB, tag);
|
||||
fprintf(outputfile, "\t%s\t%i\t\t\n", DW, tag);
|
||||
}
|
||||
else
|
||||
{
|
||||
int fixup = fixup_new(tag, type, FIXUP_WORD);
|
||||
char *taglbl = tag_string(tag, type);
|
||||
printf("\t%s\t$54\t\t\t; CALL\t%s\n", DB, taglbl);
|
||||
printf("_F%03d%c\t%s\t%s\t\t\n", fixup, LBL, DW, type & EXTERN_TYPE ? "0" : taglbl);
|
||||
fprintf(outputfile, "\t%s\t$54\t\t\t; CALL\t%s\n", DB, taglbl);
|
||||
fprintf(outputfile, "_F%03d%c\t%s\t%s\t\t\n", fixup, LBL, DW, type & EXTERN_TYPE ? "0" : taglbl);
|
||||
}
|
||||
}
|
||||
void emit_ical(void)
|
||||
{
|
||||
printf("\t%s\t$56\t\t\t; ICAL\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$56\t\t\t; ICAL\n", DB);
|
||||
}
|
||||
void emit_leave(void)
|
||||
{
|
||||
emit_pending_seq();
|
||||
if (localsize)
|
||||
printf("\t%s\t$5A,$%02X\t\t\t; LEAVE\t%d\n", DB, localsize, localsize);
|
||||
fprintf(outputfile, "\t%s\t$5A,$%02X\t\t\t; LEAVE\t%d\n", DB, localsize, localsize);
|
||||
else
|
||||
printf("\t%s\t$5C\t\t\t; RET\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$5C\t\t\t; RET\n", DB);
|
||||
}
|
||||
void emit_ret(void)
|
||||
{
|
||||
emit_pending_seq();
|
||||
printf("\t%s\t$5C\t\t\t; RET\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$5C\t\t\t; RET\n", DB);
|
||||
}
|
||||
void emit_enter(int cparams)
|
||||
{
|
||||
if (localsize)
|
||||
printf("\t%s\t$58,$%02X,$%02X\t\t; ENTER\t%d,%d\n", DB, localsize, cparams, localsize, cparams);
|
||||
fprintf(outputfile, "\t%s\t$58,$%02X,$%02X\t\t; ENTER\t%d,%d\n", DB, localsize, cparams, localsize, cparams);
|
||||
}
|
||||
void emit_start(void)
|
||||
{
|
||||
printf("_INIT%c\n", LBL);
|
||||
fprintf(outputfile, "_INIT%c\n", LBL);
|
||||
outflags |= INIT;
|
||||
defs++;
|
||||
}
|
||||
void emit_drop(void)
|
||||
{
|
||||
emit_pending_seq();
|
||||
printf("\t%s\t$30\t\t\t; DROP \n", DB);
|
||||
fprintf(outputfile, "\t%s\t$30\t\t\t; DROP \n", DB);
|
||||
}
|
||||
void emit_drop2(void)
|
||||
{
|
||||
emit_pending_seq();
|
||||
printf("\t%s\t$32\t\t\t; DROP2\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$32\t\t\t; DROP2\n", DB);
|
||||
}
|
||||
void emit_dup(void)
|
||||
{
|
||||
emit_pending_seq();
|
||||
printf("\t%s\t$34\t\t\t; DUP\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$34\t\t\t; DUP\n", DB);
|
||||
}
|
||||
int emit_unaryop(t_token op)
|
||||
{
|
||||
@@ -1024,19 +1023,19 @@ int emit_unaryop(t_token op)
|
||||
switch (op)
|
||||
{
|
||||
case NEG_TOKEN:
|
||||
printf("\t%s\t$90\t\t\t; NEG\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$90\t\t\t; NEG\n", DB);
|
||||
break;
|
||||
case COMP_TOKEN:
|
||||
printf("\t%s\t$92\t\t\t; COMP\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$92\t\t\t; COMP\n", DB);
|
||||
break;
|
||||
case LOGIC_NOT_TOKEN:
|
||||
printf("\t%s\t$80\t\t\t; NOT\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$80\t\t\t; NOT\n", DB);
|
||||
break;
|
||||
case INC_TOKEN:
|
||||
printf("\t%s\t$8C\t\t\t; INCR\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$8C\t\t\t; INCR\n", DB);
|
||||
break;
|
||||
case DEC_TOKEN:
|
||||
printf("\t%s\t$8E\t\t\t; DECR\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$8E\t\t\t; DECR\n", DB);
|
||||
break;
|
||||
case BPTR_TOKEN:
|
||||
emit_lb();
|
||||
@@ -1056,52 +1055,52 @@ int emit_op(t_token op)
|
||||
switch (op)
|
||||
{
|
||||
case MUL_TOKEN:
|
||||
printf("\t%s\t$86\t\t\t; MUL\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$86\t\t\t; MUL\n", DB);
|
||||
break;
|
||||
case DIV_TOKEN:
|
||||
printf("\t%s\t$88\t\t\t; DIV\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$88\t\t\t; DIV\n", DB);
|
||||
break;
|
||||
case MOD_TOKEN:
|
||||
printf("\t%s\t$8A\t\t\t; MOD\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$8A\t\t\t; MOD\n", DB);
|
||||
break;
|
||||
case ADD_TOKEN:
|
||||
printf("\t%s\t$82\t\t\t; ADD \n", DB);
|
||||
fprintf(outputfile, "\t%s\t$82\t\t\t; ADD \n", DB);
|
||||
break;
|
||||
case SUB_TOKEN:
|
||||
printf("\t%s\t$84\t\t\t; SUB \n", DB);
|
||||
fprintf(outputfile, "\t%s\t$84\t\t\t; SUB \n", DB);
|
||||
break;
|
||||
case SHL_TOKEN:
|
||||
printf("\t%s\t$9A\t\t\t; SHL\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$9A\t\t\t; SHL\n", DB);
|
||||
break;
|
||||
case SHR_TOKEN:
|
||||
printf("\t%s\t$9C\t\t\t; SHR\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$9C\t\t\t; SHR\n", DB);
|
||||
break;
|
||||
case AND_TOKEN:
|
||||
printf("\t%s\t$94\t\t\t; AND \n", DB);
|
||||
fprintf(outputfile, "\t%s\t$94\t\t\t; AND \n", DB);
|
||||
break;
|
||||
case OR_TOKEN:
|
||||
printf("\t%s\t$96\t\t\t; OR \n", DB);
|
||||
fprintf(outputfile, "\t%s\t$96\t\t\t; OR \n", DB);
|
||||
break;
|
||||
case EOR_TOKEN:
|
||||
printf("\t%s\t$98\t\t\t; XOR\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$98\t\t\t; XOR\n", DB);
|
||||
break;
|
||||
case EQ_TOKEN:
|
||||
printf("\t%s\t$40\t\t\t; ISEQ\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$40\t\t\t; ISEQ\n", DB);
|
||||
break;
|
||||
case NE_TOKEN:
|
||||
printf("\t%s\t$42\t\t\t; ISNE\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$42\t\t\t; ISNE\n", DB);
|
||||
break;
|
||||
case GE_TOKEN:
|
||||
printf("\t%s\t$48\t\t\t; ISGE\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$48\t\t\t; ISGE\n", DB);
|
||||
break;
|
||||
case LT_TOKEN:
|
||||
printf("\t%s\t$46\t\t\t; ISLT\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$46\t\t\t; ISLT\n", DB);
|
||||
break;
|
||||
case GT_TOKEN:
|
||||
printf("\t%s\t$44\t\t\t; ISGT\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$44\t\t\t; ISGT\n", DB);
|
||||
break;
|
||||
case LE_TOKEN:
|
||||
printf("\t%s\t$4A\t\t\t; ISLE\n", DB);
|
||||
fprintf(outputfile, "\t%s\t$4A\t\t\t; ISLE\n", DB);
|
||||
break;
|
||||
case COMMA_TOKEN:
|
||||
break;
|
||||
@@ -2041,7 +2040,7 @@ int emit_pending_seq()
|
||||
emit_brlt(op->tag);
|
||||
break;
|
||||
case CODETAG_CODE:
|
||||
printf("_B%03d%c\n", op->tag, LBL);
|
||||
fprintf(outputfile, "_B%03d%c\n", op->tag, LBL);
|
||||
break;
|
||||
case NOP_CODE:
|
||||
break;
|
||||
|
||||
@@ -449,6 +449,7 @@ end
|
||||
def idmatch(nameptr, len, idptr, idcnt)
|
||||
byte i
|
||||
|
||||
if len > ID_LEN; len = ID_LEN; fin
|
||||
while idcnt
|
||||
if len == idptr->idname
|
||||
i = 1; while i <= len and nameptr->[i - 1] == idptr->idname.[i]; i++; loop
|
||||
@@ -516,6 +517,7 @@ def size_iddata(type, varsize, initsize)#0
|
||||
end
|
||||
def new_idglobal(nameptr, len, type, value, cparms, cvals)#0
|
||||
if idmatch(nameptr, len, idglobal_tbl, globals); exit_err(ERR_DUP|ERR_ID); fin
|
||||
if len > ID_LEN; len = ID_LEN; fin
|
||||
lastglobal=>idval = value
|
||||
lastglobal=>idtype = type
|
||||
lastglobal->funcparms = cparms
|
||||
@@ -588,6 +590,7 @@ def init_idglobal#0
|
||||
end
|
||||
def new_idlocal(nameptr, len, type, size)#0
|
||||
if idmatch(nameptr, len, @idlocal_tbl, locals); exit_err(ERR_DUP|ERR_ID); fin
|
||||
if len > ID_LEN; len = ID_LEN; fin
|
||||
lastlocal=>idval = framesize
|
||||
lastlocal=>idtype = type | LOCAL_TYPE
|
||||
nametostr(nameptr, len, lastlocal + idname)
|
||||
|
||||
@@ -993,11 +993,27 @@ def keyin3
|
||||
return key | $80
|
||||
end
|
||||
def keyin2e
|
||||
byte key
|
||||
byte key, vbl
|
||||
^$C079 = 0 // IOU enable and clear VBL int on //c
|
||||
^$C05B = 0 // Enable VBL Ints on //c
|
||||
vbl = ^$C019
|
||||
repeat
|
||||
cursflash
|
||||
if flags & showcurs
|
||||
if flash == 0
|
||||
^cursptr = curschr
|
||||
elsif flash == 128
|
||||
^cursptr = underchr
|
||||
fin
|
||||
if vbl ^ ^$C019
|
||||
flash = flash + 8
|
||||
vbl = ^$C019
|
||||
^$C079 = 0 // Clear VBL int on //c
|
||||
fin
|
||||
fin
|
||||
key = ^keyboard
|
||||
until key >= 128
|
||||
^$C05A = 0 // Disable VBL Ints on //c
|
||||
^$C078 = 0 // IOU disable on //c
|
||||
^keystrobe
|
||||
if ^pushbttn2 & 128 // Closed Apple pressed
|
||||
when key
|
||||
@@ -1192,7 +1208,7 @@ def pastesel#0
|
||||
fin
|
||||
end
|
||||
def indentsel#0
|
||||
byte indentstr[MAXLNLEN+1], l
|
||||
byte indentstr[MAXLNLEN+1], j, l
|
||||
word firstsel, lastsel, i
|
||||
|
||||
freesel
|
||||
@@ -1204,6 +1220,18 @@ def indentsel#0
|
||||
indentstr[0] = l + 2
|
||||
indentstr[1] = keyspace
|
||||
indentstr[2] = keyspace
|
||||
//
|
||||
// Align indent
|
||||
//
|
||||
for j = 3 to indentstr[0]
|
||||
if indentstr[j] <> keyspace
|
||||
if j & 1 == 0
|
||||
indentstr[0]--
|
||||
memcpy(@indentstr + 1, @indentstr + 2, indentstr[0])
|
||||
fin
|
||||
break
|
||||
fin
|
||||
next
|
||||
delstr(txtlinbuf=>[i])
|
||||
txtlinbuf=>[i] = newstr(@indentstr)
|
||||
flags = flags | changed
|
||||
@@ -1527,7 +1555,7 @@ def prfiles(optpath)
|
||||
byte firstblk
|
||||
byte entrylen, entriesblk
|
||||
byte i, type, len
|
||||
word databuff, entry, filecnt
|
||||
word databuff, entry
|
||||
|
||||
if ^optpath
|
||||
strstripcpy(@path, optpath)
|
||||
@@ -1542,37 +1570,31 @@ def prfiles(optpath)
|
||||
return perr
|
||||
fin
|
||||
firstblk = 1
|
||||
repeat
|
||||
if fileio:read(refnum, databuff, 512) == 512
|
||||
entry = databuff + 4
|
||||
if firstblk
|
||||
entrylen = databuff->$23
|
||||
entriesblk = databuff->$24
|
||||
filecnt = databuff=>$25
|
||||
entry = entry + entrylen
|
||||
fin
|
||||
for i = firstblk to entriesblk
|
||||
type = ^entry
|
||||
if type <> 0
|
||||
len = type & $0F
|
||||
^entry = len
|
||||
puts(entry)
|
||||
if type & $F0 == $D0 // Is it a directory?
|
||||
putc('/')
|
||||
len++
|
||||
fin
|
||||
for len = 20 - len downto 1
|
||||
putc(' ')
|
||||
next
|
||||
filecnt--
|
||||
fin
|
||||
entry = entry + entrylen
|
||||
next
|
||||
firstblk = 0
|
||||
else
|
||||
filecnt = 0
|
||||
while fileio:read(refnum, databuff, 512) == 512
|
||||
entry = databuff + 4
|
||||
if firstblk
|
||||
entrylen = databuff->$23
|
||||
entriesblk = databuff->$24
|
||||
entry = entry + entrylen
|
||||
fin
|
||||
until filecnt == 0
|
||||
for i = firstblk to entriesblk
|
||||
type = ^entry
|
||||
if type <> 0
|
||||
len = type & $0F
|
||||
^entry = len
|
||||
puts(entry)
|
||||
if type & $F0 == $D0 // Is it a directory?
|
||||
putc('/')
|
||||
len++
|
||||
fin
|
||||
for len = 20 - len downto 1
|
||||
putc(' ')
|
||||
next
|
||||
fin
|
||||
entry = entry + entrylen
|
||||
next
|
||||
firstblk = 0
|
||||
loop
|
||||
fileio:close(refnum)
|
||||
heaprelease(databuff)
|
||||
putln
|
||||
@@ -1609,7 +1631,7 @@ def cmdmode#0
|
||||
word cmdptr, line
|
||||
|
||||
clrscrn
|
||||
puts("PLASMA Editor, Version 2.0 DP2\n")
|
||||
puts("PLASMA Editor, Version 2.0\n")
|
||||
while not exit
|
||||
puts(@filename)
|
||||
cmdptr = gets($BA)
|
||||
|
||||
3173
src/toolsrc/forthtran.c
Normal file
3173
src/toolsrc/forthtran.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -9,8 +9,6 @@ char *statement, *tokenstr, *scanpos = "", *strpos = "";
|
||||
t_token scantoken = EOL_TOKEN, prevtoken;
|
||||
int tokenlen;
|
||||
long constval;
|
||||
FILE* inputfile;
|
||||
char *filename;
|
||||
int lineno = 0;
|
||||
FILE* outer_inputfile = NULL;
|
||||
char* outer_filename;
|
||||
@@ -448,14 +446,6 @@ int next_line(void)
|
||||
t_token token;
|
||||
char* new_filename;
|
||||
strpos = conststr;
|
||||
if (inputfile == NULL)
|
||||
{
|
||||
/*
|
||||
* First-time init
|
||||
*/
|
||||
inputfile = stdin;
|
||||
filename = "<stdin>";
|
||||
}
|
||||
if (*scanpos == ';')
|
||||
{
|
||||
statement = ++scanpos;
|
||||
@@ -500,7 +490,7 @@ int next_line(void)
|
||||
inputline[len-1] = '\0';
|
||||
lineno++;
|
||||
scantoken = EOL_TOKEN;
|
||||
printf("; %s: %04d: %s\n", filename, lineno, inputline);
|
||||
fprintf(outputfile, "; %s: %04d: %s\n", filename, lineno, inputline);
|
||||
}
|
||||
token = scan();
|
||||
/*
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include "plasm.h"
|
||||
#define LVALUE 0
|
||||
#define RVALUE 1
|
||||
#define MAX_LAMBDA 64
|
||||
|
||||
int id_match(char *name, int len, char *id);
|
||||
int parse_mods(void);
|
||||
|
||||
int infunc = 0, break_tag = 0, cont_tag = 0, stack_loop = 0;
|
||||
@@ -558,7 +560,7 @@ t_opseq *parse_value(t_opseq *codeseq, int rvalue, int *stackdepth)
|
||||
parse_error("Using BYTE value as a pointer");
|
||||
else
|
||||
deref++;
|
||||
type = (type & PTR_TYPE) | (scantoken == PTRB_TOKEN) ? BYTE_TYPE : WORD_TYPE; // Type override
|
||||
type = (type & PTR_TYPE) | ((scantoken == PTRB_TOKEN) ? BYTE_TYPE : WORD_TYPE); // Type override
|
||||
if (!parse_const(&const_offset))
|
||||
{
|
||||
/*
|
||||
@@ -685,7 +687,7 @@ t_opseq *parse_value(t_opseq *codeseq, int rvalue, int *stackdepth)
|
||||
}
|
||||
return (cat_seq(codeseq, valseq));
|
||||
}
|
||||
t_opseq *parse_expr(t_opseq *codeseq, int *stackdepth)
|
||||
t_opseq *parse_subexpr(t_opseq *codeseq, int *stackdepth)
|
||||
{
|
||||
int prevmatch;
|
||||
int matchop = 0;
|
||||
@@ -744,7 +746,7 @@ t_opseq *parse_expr(t_opseq *codeseq, int *stackdepth)
|
||||
parse_error("AND must evaluate to single value");
|
||||
tag_and = tag_new(BRANCH_TYPE);
|
||||
codeseq = gen_brand(codeseq, tag_and);
|
||||
codeseq = parse_expr(codeseq, &stackdepth1);
|
||||
codeseq = parse_subexpr(codeseq, &stackdepth1);
|
||||
if (stackdepth1 != *stackdepth)
|
||||
parse_error("Inconsistent AND value counts");
|
||||
codeseq = gen_codetag(codeseq, tag_and);
|
||||
@@ -761,12 +763,24 @@ t_opseq *parse_expr(t_opseq *codeseq, int *stackdepth)
|
||||
parse_error("OR must evaluate to single value");
|
||||
tag_or = tag_new(BRANCH_TYPE);
|
||||
codeseq = gen_bror(codeseq, tag_or);
|
||||
codeseq = parse_expr(codeseq, &stackdepth1);
|
||||
codeseq = parse_subexpr(codeseq, &stackdepth1);
|
||||
if (stackdepth1 != *stackdepth)
|
||||
parse_error("Inconsistent AND value counts");
|
||||
codeseq = gen_codetag(codeseq, tag_or);
|
||||
}
|
||||
else if (scantoken == TERNARY_TOKEN)
|
||||
return (codeseq);
|
||||
}
|
||||
t_opseq *parse_expr(t_opseq *codeseq, int *stackdepth)
|
||||
{
|
||||
int prevmatch;
|
||||
int matchop = 0;
|
||||
int optos = opsptr;
|
||||
int i, valdepth;
|
||||
int prevtype, type = 0;
|
||||
t_opseq *valseq;
|
||||
|
||||
codeseq = parse_subexpr(codeseq, stackdepth);
|
||||
if (scantoken == TERNARY_TOKEN)
|
||||
{
|
||||
int tag_else, tag_endtri;
|
||||
int stackdepth1;
|
||||
@@ -1210,7 +1224,7 @@ int parse_stmnt(void)
|
||||
}
|
||||
return (scan() == EOL_TOKEN);
|
||||
}
|
||||
int parse_var(int type, long basesize)
|
||||
int parse_var(int type, long basesize, int ignore_var)
|
||||
{
|
||||
char *idstr;
|
||||
long constval;
|
||||
@@ -1256,7 +1270,7 @@ int parse_var(int type, long basesize)
|
||||
else
|
||||
parse_error("Bad variable initializer");
|
||||
}
|
||||
else
|
||||
else if (!ignore_var)
|
||||
{
|
||||
if (idlen)
|
||||
id_add(idstr, idlen, type, size);
|
||||
@@ -1330,7 +1344,7 @@ int parse_struc(void)
|
||||
scan();
|
||||
return (1);
|
||||
}
|
||||
int parse_vars(int type)
|
||||
int parse_vars(int type, int ignore_vars)
|
||||
{
|
||||
long value;
|
||||
int idlen, size, cfnparms, emit = 0;
|
||||
@@ -1347,6 +1361,8 @@ int parse_vars(int type)
|
||||
emit_sysflags(value);
|
||||
break;
|
||||
case CONST_TOKEN:
|
||||
if (type & LOCAL_TYPE)
|
||||
parse_error("Cannot define local constant");
|
||||
if (scan() != ID_TOKEN)
|
||||
parse_error("Missing variable");
|
||||
idstr = tokenstr;
|
||||
@@ -1395,7 +1411,7 @@ int parse_vars(int type)
|
||||
scan_rewind(tokenstr);
|
||||
if (type & WORD_TYPE)
|
||||
cfnvals *= 2;
|
||||
do parse_var(type, cfnvals); while (scantoken == COMMA_TOKEN);
|
||||
do parse_var(type, cfnvals, ignore_vars); while (scantoken == COMMA_TOKEN);
|
||||
emit = type == GLOBAL_TYPE;
|
||||
break;
|
||||
case PREDEF_TOKEN:
|
||||
@@ -1452,13 +1468,18 @@ int parse_vars(int type)
|
||||
}
|
||||
int parse_mods(void)
|
||||
{
|
||||
int i, ignore_emit;
|
||||
|
||||
if (scantoken == IMPORT_TOKEN)
|
||||
{
|
||||
if (scan() != ID_TOKEN)
|
||||
parse_error("Bad import definition");
|
||||
emit_moddep(tokenstr, tokenlen);
|
||||
for (i = 0; i < tokenlen; i++)
|
||||
tokenstr[i] = toupper(tokenstr[i]);
|
||||
if (!(ignore_emit = id_match(tokenstr, tokenlen, modfile)))
|
||||
emit_moddep(tokenstr, tokenlen);
|
||||
scan();
|
||||
while (parse_vars(EXTERN_TYPE)) next_line();
|
||||
while (parse_vars(EXTERN_TYPE, ignore_emit)) next_line();
|
||||
if (scantoken != END_TOKEN)
|
||||
parse_error("Missing END");
|
||||
scan();
|
||||
@@ -1538,7 +1559,7 @@ int parse_defs(void)
|
||||
{
|
||||
case CONST_TOKEN:
|
||||
case STRUC_TOKEN:
|
||||
return parse_vars(GLOBAL_TYPE);
|
||||
return parse_vars(GLOBAL_TYPE, FALSE);
|
||||
case EXPORT_TOKEN:
|
||||
if (scan() != DEF_TOKEN && scantoken != ASM_TOKEN)
|
||||
parse_error("Bad export definition");
|
||||
@@ -1606,7 +1627,7 @@ int parse_defs(void)
|
||||
/*
|
||||
* Parse local vars
|
||||
*/
|
||||
while (parse_vars(LOCAL_TYPE)) next_line();
|
||||
while (parse_vars(LOCAL_TYPE, FALSE)) next_line();
|
||||
emit_enter(cfnparms);
|
||||
prevstmnt = 0;
|
||||
while (parse_stmnt()) next_line();
|
||||
@@ -1703,7 +1724,7 @@ int parse_module(void)
|
||||
if (next_line())
|
||||
{
|
||||
while (parse_mods()) next_line();
|
||||
while (parse_vars(GLOBAL_TYPE)) next_line();
|
||||
while (parse_vars(GLOBAL_TYPE, FALSE)) next_line();
|
||||
while (parse_defs()) next_line();
|
||||
emit_bytecode_seg();
|
||||
emit_start();
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
int id_match(char *name, int len, char *id);
|
||||
int parse_module(void);
|
||||
|
||||
@@ -138,10 +138,13 @@ def parse_constval
|
||||
is ID_TKN
|
||||
size = 2
|
||||
idptr = lookup_id(tknptr, tknlen)
|
||||
type = idptr=>idtype
|
||||
if not idptr; exit_err(ERR_INVAL|ERR_CONST); fin
|
||||
type = idptr=>idtype
|
||||
if type & (FUNC_TYPE|ADDR_TYPE)
|
||||
if mod <> 8; exit_err(ERR_INVAL|ERR_CONST); fin
|
||||
type = CONSTADDR_TYPE
|
||||
elsif type <> CONST_TYPE
|
||||
exit_err(ERR_INVAL|ERR_CONST)
|
||||
fin
|
||||
value = idptr=>idval
|
||||
break
|
||||
@@ -493,7 +496,7 @@ def parse_value(codeseq, r_val)#2
|
||||
fin
|
||||
return cat_seq(codeseq, valseq), stackdepth
|
||||
end
|
||||
def parse_expr(codeseq)#2
|
||||
def parse_subexpr(codeseq)#2
|
||||
byte stackdepth, matchdepth, stkdepth1, prevmatch, matchop, i
|
||||
word optos
|
||||
word tag_else, tag_endop
|
||||
@@ -530,17 +533,25 @@ def parse_expr(codeseq)#2
|
||||
if stackdepth <> 1; exit_err(ERR_OVER|ERR_SYNTAX); fin
|
||||
tag_endop = new_tag(RELATIVE_FIXUP)
|
||||
codeseq = gen_oprel(codeseq, BRAND_CODE, tag_endop)
|
||||
codeseq, stkdepth1 = parse_expr(codeseq)
|
||||
codeseq, stkdepth1 = parse_subexpr(codeseq)
|
||||
if stkdepth1 <> stackdepth; exit_err(ERR_INVAL|ERR_CODE); fin
|
||||
codeseq = gen_ctag(codeseq, tag_endop)
|
||||
elsif token == LOGIC_OR_TKN
|
||||
if stackdepth <> 1; exit_err(ERR_OVER|ERR_SYNTAX); fin
|
||||
tag_endop = new_tag(RELATIVE_FIXUP)
|
||||
codeseq = gen_oprel(codeseq, BROR_CODE, tag_endop)
|
||||
codeseq, stkdepth1 = parse_expr(codeseq)
|
||||
codeseq, stkdepth1 = parse_subexpr(codeseq)
|
||||
if stkdepth1 <> stackdepth; exit_err(ERR_INVAL|ERR_CODE); fin
|
||||
codeseq = gen_ctag(codeseq, tag_endop)
|
||||
elsif token == TERNARY_TKN
|
||||
fin
|
||||
return codeseq, stackdepth
|
||||
end
|
||||
def parse_expr(codeseq)#2
|
||||
byte stackdepth, stkdepth1
|
||||
word tag_else, tag_endop
|
||||
|
||||
codeseq, stackdepth = parse_subexpr(codeseq)
|
||||
if token == TERNARY_TKN
|
||||
if stackdepth <> 1; exit_err(ERR_OVER|ERR_SYNTAX); fin
|
||||
tag_else = new_tag(RELATIVE_FIXUP)
|
||||
tag_endop = new_tag(RELATIVE_FIXUP)
|
||||
@@ -956,7 +967,7 @@ def parse_stmnt
|
||||
wend
|
||||
return scan == EOL_TKN
|
||||
end
|
||||
def parse_var(type, basesize)#0
|
||||
def parse_var(type, basesize, ignore_var)#0
|
||||
byte consttype, constsize, idlen
|
||||
word idptr, constval, arraysize, size
|
||||
|
||||
@@ -984,7 +995,7 @@ def parse_var(type, basesize)#0
|
||||
arraysize = arraysize + emit_data(type, consttype, constval, constsize)
|
||||
loop
|
||||
size_iddata(PTR_TYPE, size, arraysize)
|
||||
else
|
||||
elsif not ignore_var
|
||||
if idlen
|
||||
if infunc
|
||||
new_idlocal(idptr, idlen, type, size)
|
||||
@@ -1055,9 +1066,9 @@ def parse_struc#0
|
||||
if token <> END_TKN; exit_err(ERR_MISS|ERR_CLOSE|ERR_STATE); fin
|
||||
scan
|
||||
end
|
||||
def parse_vars(type)
|
||||
byte idlen, size, cfnparms, cfnvals
|
||||
word value, idptr
|
||||
def parse_vars(type, ignore_vars)
|
||||
byte idlen, cfnparms, cfnvals
|
||||
word size, value, idptr
|
||||
|
||||
when token
|
||||
is SYSFLAGS_TKN
|
||||
@@ -1065,6 +1076,7 @@ def parse_vars(type)
|
||||
modsysflags, drop, drop = parse_constexpr
|
||||
break
|
||||
is CONST_TKN
|
||||
if type & LOCAL_TYPE; exit_err(ERR_INVAL|ERR_GLOBAL|ERR_INIT); fin
|
||||
if scan <> ID_TKN; exit_err(ERR_INVAL|ERR_CONST); fin
|
||||
idptr = tknptr
|
||||
idlen = tknlen
|
||||
@@ -1096,7 +1108,7 @@ def parse_vars(type)
|
||||
rewind(tknptr)
|
||||
fin
|
||||
if type & WORD_TYPE; size = size * 2; fin
|
||||
repeat; parse_var(type, size); until token <> COMMA_TKN
|
||||
repeat; parse_var(type, size, ignore_vars); until token <> COMMA_TKN
|
||||
break
|
||||
is PREDEF_TKN
|
||||
repeat
|
||||
@@ -1138,11 +1150,23 @@ def parse_vars(type)
|
||||
return TRUE
|
||||
end
|
||||
def parse_mods
|
||||
byte i, ignore_emit
|
||||
|
||||
if token == IMPORT_TKN
|
||||
if scan <> ID_TKN; exit_err(ERR_MISS|ERR_ID); fin
|
||||
new_moddep(tknptr, tknlen)
|
||||
if tknlen == modfile
|
||||
ignore_emit = TRUE
|
||||
for i = 1 to tknlen
|
||||
if toupper(tknptr->[i - 1]) <> modfile[i]; ignore_emit = FALSE; break; fin
|
||||
next
|
||||
else
|
||||
ignore_emit = FALSE
|
||||
fin
|
||||
if not ignore_emit
|
||||
new_moddep(tknptr, tknlen)
|
||||
fin
|
||||
scan
|
||||
while parse_vars(EXTERN_TYPE); nextln; loop
|
||||
while parse_vars(EXTERN_TYPE, ignore_emit); nextln; loop
|
||||
if token <> END_TKN; exit_err(ERR_MISS|ERR_CLOSE|ERR_STATE); fin
|
||||
scan
|
||||
fin
|
||||
@@ -1217,7 +1241,7 @@ def parse_defs
|
||||
when token
|
||||
is CONST_TKN
|
||||
is STRUC_TKN
|
||||
return parse_vars(GLOBAL_TYPE)
|
||||
return parse_vars(GLOBAL_TYPE, FALSE)
|
||||
is EXPORT_TKN
|
||||
if scan <> DEF_TKN; exit_err(ERR_INVAL|ERR_STATE); fin
|
||||
type = type | EXPORT_TYPE
|
||||
@@ -1262,7 +1286,7 @@ def parse_defs
|
||||
defcodeptr = codeptr
|
||||
emit_tag(func_tag)
|
||||
new_dfd(func_tag)
|
||||
while parse_vars(LOCAL_TYPE); nextln; loop
|
||||
while parse_vars(LOCAL_TYPE, FALSE); nextln; loop
|
||||
emit_enter(cfnparms)
|
||||
prevstmnt = 0
|
||||
while parse_stmnt; nextln; loop
|
||||
@@ -1288,18 +1312,19 @@ end
|
||||
def parse_module#0
|
||||
init_idglobal
|
||||
init_idlocal
|
||||
puts("Data+Code buffer size = "); puti(codebufsz); putln
|
||||
puts("Data+Code buffer size = "); puti(codebufsz); putln; putln
|
||||
puts(@modfile); putln
|
||||
if nextln
|
||||
//
|
||||
// Compile module
|
||||
//
|
||||
puts("\nDATA:");
|
||||
puts("DATA:");
|
||||
while parse_mods; nextln; loop
|
||||
while parse_vars(GLOBAL_TYPE); nextln; loop
|
||||
while parse_vars(GLOBAL_TYPE, FALSE); nextln; loop
|
||||
emit_codeseg
|
||||
puti(codeptr - codebuff); puts(@bytesln)
|
||||
while parse_defs; nextln; loop
|
||||
puts("INIT:")
|
||||
puts("INIT:");
|
||||
entrypoint = codeptr
|
||||
prevstmnt = 0
|
||||
init_idlocal
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <strings.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include "plasm.h"
|
||||
|
||||
int outflags = 0;
|
||||
FILE *inputfile = NULL, *outputfile;
|
||||
char *filename, asmfile[128], modfile[17];
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int j, i, flags = 0;
|
||||
int k, j, i, flags = 0;
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
if (argv[i][0] == '-')
|
||||
@@ -29,14 +35,72 @@ int main(int argc, char **argv)
|
||||
break;
|
||||
case 'W':
|
||||
outflags |= WARNINGS;
|
||||
break;
|
||||
case 'S':
|
||||
outflags |= STREAM;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (inputfile == NULL)
|
||||
{
|
||||
filename = argv[i];
|
||||
inputfile = fopen(filename, "r");
|
||||
if (!inputfile)
|
||||
{
|
||||
printf("Error opening input file: %s\n", filename);
|
||||
exit(1);
|
||||
}
|
||||
strcpy(asmfile, filename);
|
||||
j = strlen(asmfile);
|
||||
while (j && asmfile[j] != '.')
|
||||
{
|
||||
asmfile[j] = '\0';
|
||||
j--;
|
||||
}
|
||||
asmfile[j+1] = 'a';
|
||||
while (j && asmfile[j-1] != '/')
|
||||
j--;
|
||||
k = 1;
|
||||
while (asmfile[j] != '.')
|
||||
modfile[k++] = toupper(asmfile[j++]);
|
||||
modfile[k] = '\0';
|
||||
modfile[0] = k - 1;
|
||||
if (outflags & STREAM)
|
||||
{
|
||||
strcpy(asmfile, "STDOUT");
|
||||
outputfile = stdout;
|
||||
}
|
||||
else
|
||||
{
|
||||
outputfile = fopen(asmfile, "w");
|
||||
if (!outputfile)
|
||||
{
|
||||
printf("Error opening output file %s\n", asmfile);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Too many input files\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (inputfile == NULL)
|
||||
{
|
||||
printf("Usage: %s [-AMONWS] <inputfile>\n", argv[0]);
|
||||
return (0);
|
||||
}
|
||||
emit_flags(outflags);
|
||||
if (parse_module())
|
||||
{
|
||||
fprintf(stderr, "Compilation complete.\n");
|
||||
}
|
||||
fclose(inputfile);
|
||||
fclose(outputfile);
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,12 @@
|
||||
#define SYSFLAGS (1<<5)
|
||||
#define WARNINGS (1<<6)
|
||||
#define NO_COMBINE (1<<7)
|
||||
#define STREAM (1<<8)
|
||||
#define FALSE 0
|
||||
#define TRUE (!FALSE)
|
||||
extern int outflags;
|
||||
extern FILE *inputfile, *outputfile;
|
||||
extern char *filename, modfile[17];
|
||||
#include "tokens.h"
|
||||
#include "lex.h"
|
||||
#include "symbols.h"
|
||||
|
||||
@@ -5,6 +5,7 @@ include "inc/longjmp.plh"
|
||||
//
|
||||
// Tokens
|
||||
//
|
||||
const ID_LEN = 32
|
||||
const ID_TKN = $D6 // V
|
||||
const CHR_TKN = $C3 // C
|
||||
const INT_TKN = $C9 // I
|
||||
@@ -275,7 +276,7 @@ byte outflags
|
||||
// ProDOS/SOS file references
|
||||
//
|
||||
byte refnum, srcref, incref
|
||||
byte[32] srcfile, incfile, relfile
|
||||
byte[32] srcfile, incfile, relfile, modfile
|
||||
word parsefile // Pointer to current file
|
||||
word srcline // Saved source line number
|
||||
//
|
||||
@@ -507,7 +508,7 @@ include "toolsrc/parse.pla"
|
||||
//
|
||||
// Look at command line arguments and compile module
|
||||
//
|
||||
puts("PLASMA Compiler, Version 2.0 DP3\n")
|
||||
puts("PLASMA Compiler, Version 2.0\n")
|
||||
arg = argNext(argFirst)
|
||||
if ^arg and ^(arg + 1) == '-'
|
||||
opt = arg + 2
|
||||
@@ -559,6 +560,15 @@ if ^arg
|
||||
//
|
||||
strcpy(@relfile, "A.OUT")
|
||||
fin
|
||||
modfile = 0
|
||||
for srcref = 1 to relfile
|
||||
if relfile[srcref] == '/'
|
||||
modfile = 0
|
||||
else
|
||||
modfile++
|
||||
modfile[modfile] = toupper(relfile[srcref])
|
||||
fin
|
||||
next
|
||||
fin
|
||||
fin
|
||||
if srcfile and relfile
|
||||
|
||||
@@ -12,23 +12,6 @@ char[64] path, wildname
|
||||
res[t_fileinfo] fileinfo
|
||||
res[t_fileentry] fileentry
|
||||
//
|
||||
// Convert byte to two hex chars
|
||||
//
|
||||
def putb(b)#0
|
||||
char h
|
||||
|
||||
h = ((b >> 4) & $0F) + '0'
|
||||
if h > '9'
|
||||
h = h + 7
|
||||
fin
|
||||
putc(h)
|
||||
h = (b & $0F) + '0'
|
||||
if h > '9'
|
||||
h = h + 7
|
||||
fin
|
||||
putc(h)
|
||||
end
|
||||
//
|
||||
// Copy string with upper case conversion
|
||||
//
|
||||
def struprcpy(dst, src)#0
|
||||
@@ -46,23 +29,12 @@ def struprcpy(dst, src)#0
|
||||
fin
|
||||
^dst = ^src
|
||||
end
|
||||
def filefrompath(filestr, pathstr)#0
|
||||
byte i
|
||||
|
||||
for i = ^pathstr downto 1
|
||||
if pathstr->[i] == '/'
|
||||
break
|
||||
fin
|
||||
next
|
||||
^filestr = ^pathstr - i
|
||||
memcpy(filestr + 1, pathstr + 1 + i, ^filestr)
|
||||
end
|
||||
//
|
||||
// Print out a directory entry
|
||||
//
|
||||
def printentry(entryptr)#0
|
||||
char type, pad, eofstr[12]
|
||||
|
||||
|
||||
puts(entryptr)
|
||||
when entryptr->entry_type
|
||||
is $0F // Is it a directory?
|
||||
@@ -88,12 +60,12 @@ def printentry(entryptr)#0
|
||||
for pad = eofstr to 9
|
||||
putc(' ')
|
||||
next
|
||||
puts(@eofstr)
|
||||
puts(@eofstr)
|
||||
putln
|
||||
end
|
||||
def printentries(pathstr, entries, num)#0
|
||||
byte page
|
||||
|
||||
|
||||
puts(pathstr); putln
|
||||
puts("=NAME==========TYPE===AUX====LENGTH=\n")
|
||||
page = 20
|
||||
|
||||
@@ -16,7 +16,7 @@ res[t_fileinfo] srcfileinfo, dstfileinfo
|
||||
//
|
||||
def pathcpy(dst, src)#0
|
||||
byte i, chr
|
||||
|
||||
|
||||
if ^src
|
||||
for i = 1 to ^src
|
||||
chr = src->[i]
|
||||
@@ -52,7 +52,7 @@ end
|
||||
def pathdiff(path1, path2)#1
|
||||
byte i, d
|
||||
char[64] abs1, abs2
|
||||
|
||||
|
||||
abspath(@abs1, path1)
|
||||
abspath(@abs2, path2)
|
||||
|
||||
@@ -67,17 +67,6 @@ def pathdiff(path1, path2)#1
|
||||
next
|
||||
return FALSE
|
||||
end
|
||||
def filefrompath(filestr, pathstr)#0
|
||||
byte i
|
||||
|
||||
for i = ^pathstr + 1 downto 1
|
||||
if pathstr->[i] == '/'
|
||||
break
|
||||
fin
|
||||
next
|
||||
^filestr = ^pathstr - i
|
||||
memcpy(filestr + 1, pathstr + 1 + i, ^filestr)
|
||||
end
|
||||
//
|
||||
// Check destination path
|
||||
//
|
||||
@@ -89,7 +78,7 @@ def chkdstpath(dstfile)
|
||||
//
|
||||
// Check if copying into a directory
|
||||
//
|
||||
if dstfileinfo.file_type == $0F
|
||||
if dstfileinfo.storage_type & $0D == $0D
|
||||
if dstfile->[^dstfile] <> '/'
|
||||
//
|
||||
// Add path seperator
|
||||
@@ -108,14 +97,14 @@ def copyfiles(srcfile, dstfile)#0
|
||||
char[64] srcfilepath
|
||||
char[64] dstfilepath
|
||||
char[16] wildname
|
||||
|
||||
|
||||
//
|
||||
// Check if copying a directory
|
||||
//
|
||||
strcpy(@srcpath, srcfile)
|
||||
wildname = 0
|
||||
if fileio:getfileinfo(@srcpath, @srcfileinfo) <> FILE_ERR_OK or srcfileinfo.file_type <> $0F
|
||||
filefrompath(@wildname, @srcpath)
|
||||
if fileio:getfileinfo(@srcpath, @srcfileinfo) <> FILE_ERR_OK or (srcfileinfo.storage_type & $0D <> $0D)
|
||||
fileFromPath(@wildname, @srcpath)
|
||||
srcpath = srcpath - wildname
|
||||
fin
|
||||
entrylist, entrycnt = matchList(@srcpath, @wildname)
|
||||
@@ -186,7 +175,7 @@ def copyfiles(srcfile, dstfile)#0
|
||||
puts(" ==> "); puts(@dstfilepath); putln
|
||||
fin
|
||||
entry = entry + t_fileentry
|
||||
entrycnt--
|
||||
entrycnt--
|
||||
loop
|
||||
heaprelease(entrylist)
|
||||
fin
|
||||
@@ -228,6 +217,9 @@ if not except(exit)
|
||||
pathcpy(@dstpath, arg)
|
||||
arg = argNext(arg)
|
||||
loop
|
||||
if dstpath[0] == 1 and dstpath[1] == '='
|
||||
fileio:getpfx(@dstpath)
|
||||
fin
|
||||
if not chkdstpath(@dstpath) and (srccnt > 1 or isWildName(srcfilelist))
|
||||
puts("Destination must be a directory: "); puts(@dstpath); putln
|
||||
return
|
||||
|
||||
@@ -25,17 +25,6 @@ def struprcpy(dst, src)#0
|
||||
fin
|
||||
^dst = ^src
|
||||
end
|
||||
def filefrompath(filestr, pathstr)#0
|
||||
byte i
|
||||
|
||||
for i = ^pathstr downto 1
|
||||
if pathstr->[i] == '/'
|
||||
break
|
||||
fin
|
||||
next
|
||||
^filestr = ^pathstr - i
|
||||
memcpy(filestr + 1, pathstr + 1 + i, ^filestr)
|
||||
end
|
||||
//
|
||||
// Check filename
|
||||
//
|
||||
@@ -81,9 +70,8 @@ def delfiles(delfile)#0
|
||||
|
||||
strcpy(@delpath, delfile)
|
||||
wildname = 0
|
||||
//if fileio:getfileinfo(@delpath, @fileinfo) <> FILE_ERR_OK or fileinfo.file_type <> $0F
|
||||
if delpath[delpath] <> '/'
|
||||
filefrompath(@wildname, @delpath)
|
||||
fileFromPath(@wildname, @delpath)
|
||||
delpath = delpath - wildname
|
||||
fin
|
||||
//
|
||||
@@ -115,7 +103,7 @@ def delfiles(delfile)#0
|
||||
fileio:destroy(@delfilepath)
|
||||
fin
|
||||
entry = entry + t_fileentry
|
||||
entrycnt--
|
||||
entrycnt--
|
||||
loop
|
||||
elsif not wildname
|
||||
puts("Not found: "); puts(@delpath); puts("/"); puts(@wildname); putln
|
||||
@@ -156,7 +144,7 @@ if not except(exit)
|
||||
strcpy(@path,fileptr)
|
||||
strcat(@path, "/")
|
||||
delfiles(@path)
|
||||
fin
|
||||
fin
|
||||
delfiles(fileptr)
|
||||
fileptr = fileptr + ^fileptr + 1
|
||||
filecnt--
|
||||
|
||||
@@ -8,23 +8,23 @@ var arg, type, aux
|
||||
//
|
||||
// Convert byte to two hex chars
|
||||
//
|
||||
def putb(b)#0
|
||||
char h
|
||||
|
||||
h = ((b >> 4) & $0F) + '0'
|
||||
if h > '9'
|
||||
h = h + 7
|
||||
fin
|
||||
putc(h)
|
||||
h = (b & $0F) + '0'
|
||||
if h > '9'
|
||||
h = h + 7
|
||||
fin
|
||||
putc(h)
|
||||
end
|
||||
//def putb(b)#0
|
||||
// char h
|
||||
//
|
||||
// h = ((b >> 4) & $0F) + '0'
|
||||
// if h > '9'
|
||||
// h = h + 7
|
||||
// fin
|
||||
// putc(h)
|
||||
// h = (b & $0F) + '0'
|
||||
// if h > '9'
|
||||
// h = h + 7
|
||||
// fin
|
||||
// putc(h)
|
||||
//end
|
||||
def htoi(hexptr)
|
||||
var val, i, n
|
||||
|
||||
|
||||
val = 0
|
||||
for i = 1 to ^hexptr
|
||||
n = toupper(^(hexptr + i)) - '0'
|
||||
|
||||
@@ -19,6 +19,7 @@ end
|
||||
def lock#0
|
||||
^$C05A = $A5 // Lock regs
|
||||
end
|
||||
|
||||
arg = argNext(argFirst)
|
||||
if ^arg
|
||||
when toupper(arg->[1])
|
||||
@@ -43,6 +44,7 @@ clock = ^$C05D
|
||||
state = ^$C05E
|
||||
cache = ^$C05F
|
||||
lock
|
||||
^$C05F // AN3 off
|
||||
puts("Status: $"); puth(status); putln
|
||||
puts("Slots: $"); puth(slots); putln
|
||||
puts("Clock: $"); puth(clock); putln
|
||||
@@ -5,6 +5,7 @@ include "inc/cmdsys.plh"
|
||||
include "inc/inet.plh"
|
||||
include "inc/fileio.plh"
|
||||
include "inc/conio.plh"
|
||||
sysflags nojitc // Keep JITC from compiling and pausing while transferring
|
||||
//
|
||||
// TFTP values
|
||||
//
|
||||
@@ -357,9 +358,9 @@ end
|
||||
def volumes#0
|
||||
word strbuf
|
||||
byte i
|
||||
|
||||
|
||||
strbuf = heapmark()
|
||||
fileio:online(0, strbuf)
|
||||
fileio:online(0, strbuf)
|
||||
for i = 0 to 15
|
||||
^strbuf = ^strbuf & $0F
|
||||
if ^strbuf
|
||||
@@ -369,7 +370,7 @@ def volumes#0
|
||||
next
|
||||
end
|
||||
|
||||
puts("TFTP Server Version 2.0 DP3\n")
|
||||
puts("TFTP Server, Version 2.0\n")
|
||||
if !iNet:initIP()
|
||||
return -1
|
||||
fin
|
||||
|
||||
@@ -52,7 +52,7 @@ byte perr, refauto
|
||||
// String pool.
|
||||
//
|
||||
byte autorun[] = "AUTORUN"
|
||||
byte verstr[] = "\nPLASMA DP3"
|
||||
byte verstr[] = "\nPLASMA BETA"
|
||||
byte freestr[] = "MEM FREE:$"
|
||||
byte errorstr[] = "ERR:$"
|
||||
byte prompt[] = "PLASMA"
|
||||
@@ -911,7 +911,7 @@ end
|
||||
//
|
||||
def lookupextern(esd, index)#1
|
||||
word sym, addr
|
||||
byte str[16]
|
||||
byte str[33]
|
||||
while ^esd
|
||||
sym = esd
|
||||
esd = sym + dcitos(sym, @str)
|
||||
|
||||
@@ -72,7 +72,6 @@ byte hpalignstr = "HEAPALLOCALIGN"
|
||||
byte hpallocstr = "HEAPALLOC"
|
||||
byte hprelstr = "HEAPRELEASE"
|
||||
byte hpavlstr = "HEAPAVAIL"
|
||||
byte sysmods[] // overlay with exported strings
|
||||
word memsetstr = "MEMSET"
|
||||
byte memcpystr = "MEMCPY"
|
||||
byte uisgtstr = "ISUGT"
|
||||
@@ -84,7 +83,6 @@ byte divmodstr = "DIVMOD"
|
||||
byte machidstr = "MACHID"
|
||||
byte sysstr = "SYSCALL"
|
||||
byte callstr = "CALL"
|
||||
byte prefix[] // overlay with exported symbols table
|
||||
word exports = @sysmodstr, @version
|
||||
word = @sysstr, @syscall
|
||||
word = @callstr, @call
|
||||
@@ -98,6 +96,7 @@ word = @getcstr, @cin
|
||||
word = @getsstr, @rdstr
|
||||
word = @toupstr, @toupper
|
||||
word = @hpmarkstr, @markheap
|
||||
byte sysmods[] // overlay with exported strings
|
||||
word = @hpallocstr,@allocheap
|
||||
word = @hpalignstr,@allocalignheap
|
||||
word = @hprelstr, @releaseheap
|
||||
@@ -946,7 +945,7 @@ end
|
||||
//
|
||||
def lookupextern(esd, index)#1
|
||||
word sym, addr
|
||||
byte str[16]
|
||||
byte str[33]
|
||||
sym = lookupidx(esd, index)
|
||||
if sym
|
||||
addr = lookuptbl(sym, symtbl)
|
||||
@@ -1172,53 +1171,44 @@ def catalog(path)#0
|
||||
byte firstblk
|
||||
byte entrylen, entriesblk
|
||||
byte i, type, len
|
||||
word entry, filecnt
|
||||
word entry
|
||||
|
||||
if !^path
|
||||
path = @prefix
|
||||
fin
|
||||
refnum = open(path)
|
||||
if perr
|
||||
return
|
||||
fin
|
||||
firstblk = 1
|
||||
repeat
|
||||
if read(refnum, heap, 512) == 512
|
||||
entry = heap + 4
|
||||
if firstblk
|
||||
entrylen = heap->$23
|
||||
entriesblk = heap->$24
|
||||
filecnt = heap=>$25
|
||||
entry = entry + entrylen
|
||||
fin
|
||||
for i = firstblk to entriesblk
|
||||
if ^entry
|
||||
^entry = ^entry & $0F
|
||||
prstr(entry)
|
||||
type = ' '
|
||||
when entry->$10
|
||||
is $0F // Is it a directory?
|
||||
type = '/'
|
||||
break
|
||||
is $FF // SYSTEM file
|
||||
type = '-'
|
||||
break
|
||||
is $FE // REL file
|
||||
type = '+'
|
||||
wend
|
||||
cout(type)
|
||||
for len = ^entry to 18
|
||||
cout(' ')
|
||||
next
|
||||
filecnt--
|
||||
fin
|
||||
entry = entry + entrylen
|
||||
next
|
||||
firstblk = 0
|
||||
else
|
||||
filecnt = 0
|
||||
while read(refnum, heap, 512) == 512
|
||||
entry = heap + 4
|
||||
if firstblk
|
||||
entrylen = heap->$23
|
||||
entriesblk = heap->$24 - 1
|
||||
entry = entry + entrylen
|
||||
fin
|
||||
until !filecnt
|
||||
for i = firstblk to entriesblk
|
||||
if ^entry
|
||||
^entry = ^entry & $0F
|
||||
prstr(entry)
|
||||
type = ' '
|
||||
when entry->$10
|
||||
is $0F // Is it a directory?
|
||||
type = '/'
|
||||
break
|
||||
is $FF // SYSTEM file
|
||||
type = '-'
|
||||
break
|
||||
is $FE // REL file
|
||||
type = '+'
|
||||
wend
|
||||
cout(type)
|
||||
for len = ^entry to 18
|
||||
cout(' ')
|
||||
next
|
||||
fin
|
||||
entry = entry + entrylen
|
||||
next
|
||||
firstblk = 0
|
||||
loop
|
||||
close(refnum)
|
||||
crout()
|
||||
end
|
||||
@@ -1326,23 +1316,25 @@ end
|
||||
// Command line processor
|
||||
//
|
||||
def docmds#0
|
||||
strcpy(getlnbuf, @cmdln)
|
||||
while 1
|
||||
word prefix
|
||||
|
||||
prefix = pfxop(heap, GET_PFX)
|
||||
repeat
|
||||
if ^getlnbuf
|
||||
strcpy(@cmdln, getlnbuf)
|
||||
when toupper(parsecmd(getlnbuf))
|
||||
is 'C'
|
||||
catalog(getlnbuf)
|
||||
catalog(^getlnbuf ?? getlnbuf :: prefix)
|
||||
break
|
||||
is 'P'
|
||||
pfxop(getlnbuf, SET_PFX)
|
||||
break
|
||||
is '/'
|
||||
repeat
|
||||
prefix--
|
||||
until prefix[prefix] == '/'
|
||||
if prefix > 1
|
||||
pfxop(@prefix, SET_PFX)
|
||||
^prefix--
|
||||
until ^(prefix + ^prefix) == '/'
|
||||
if ^prefix > 1
|
||||
pfxop(prefix, SET_PFX)
|
||||
fin
|
||||
break
|
||||
is 'V'
|
||||
@@ -1352,6 +1344,9 @@ def docmds#0
|
||||
execsys(getlnbuf)
|
||||
break
|
||||
is '+'
|
||||
//
|
||||
// Exec module
|
||||
//
|
||||
execmod(striptrail(getlnbuf))
|
||||
//
|
||||
// Clean up
|
||||
@@ -1367,9 +1362,9 @@ def docmds#0
|
||||
crout()
|
||||
fin
|
||||
fin
|
||||
prstr(pfxop(@prefix, GET_PFX))
|
||||
prstr(pfxop(prefix, GET_PFX))
|
||||
rdstr($BA)
|
||||
loop
|
||||
until 0
|
||||
end
|
||||
//
|
||||
// Dummy definition to get free heap
|
||||
@@ -1383,7 +1378,7 @@ heap = @lastdef
|
||||
//
|
||||
// Print PLASMA version
|
||||
//
|
||||
prstr("PLASMA 2.0 DP3 64K\n")//; prbyte(version.1); cout('.'); prbyte(version.0); crout
|
||||
prstr("PLASMA 2.0 64K\n")//; prbyte(version.1); cout('.'); prbyte(version.0); crout
|
||||
//
|
||||
// Init symbol table.
|
||||
//
|
||||
@@ -1404,13 +1399,14 @@ syscmdln = @cmdln
|
||||
autorun = open(@autorun)
|
||||
if autorun
|
||||
cmdln = read(autorun, @cmdln+1, 81)
|
||||
strcpy(getlnbuf, @cmdln)
|
||||
close(0)
|
||||
else
|
||||
^getlnbuf = 0
|
||||
//
|
||||
// Print some startup info.
|
||||
//
|
||||
prstr("MEM FREE:$"); prword(availheap); crout
|
||||
fin
|
||||
pfxop(@prefix, GET_PFX)
|
||||
docmds
|
||||
done
|
||||
|
||||
@@ -90,7 +90,6 @@ byte hpalignstr = "HEAPALLOCALIGN"
|
||||
byte hpallocstr = "HEAPALLOC"
|
||||
byte hprelstr = "HEAPRELEASE"
|
||||
byte hpavlstr = "HEAPAVAIL"
|
||||
byte sysmods[] // overlay with exported strings
|
||||
word memsetstr = "MEMSET"
|
||||
byte memcpystr = "MEMCPY"
|
||||
byte uisgtstr = "ISUGT"
|
||||
@@ -102,7 +101,6 @@ byte divmodstr = "DIVMOD"
|
||||
byte machidstr = "MACHID"
|
||||
byte sysstr = "SYSCALL"
|
||||
byte callstr = "CALL"
|
||||
byte prefix[] // overlay with exported symbols table
|
||||
word exports = @sysmodstr, @version
|
||||
word = @sysstr, @syscall
|
||||
word = @callstr, @call
|
||||
@@ -116,6 +114,7 @@ word = @getcstr, @cin
|
||||
word = @getsstr, @rdstr
|
||||
word = @toupstr, @toupper
|
||||
word = @hpmarkstr, @markheap
|
||||
byte sysmods[] // overlay with exported strings
|
||||
word = @hpallocstr,@allocheap
|
||||
word = @hpalignstr,@allocalignheap
|
||||
word = @hprelstr, @releaseheap
|
||||
@@ -988,7 +987,7 @@ end
|
||||
//
|
||||
def lookupextern(esd, index)#1
|
||||
word sym, addr
|
||||
byte str[16]
|
||||
byte str[33]
|
||||
sym = lookupidx(esd, index)
|
||||
if sym
|
||||
addr = lookuptbl(sym, symtbl)
|
||||
@@ -1237,53 +1236,44 @@ def catalog(path)#0
|
||||
byte firstblk
|
||||
byte entrylen, entriesblk
|
||||
byte i, type, len
|
||||
word entry, filecnt
|
||||
word entry
|
||||
|
||||
if !^path
|
||||
path = @prefix
|
||||
fin
|
||||
refnum = open(path)
|
||||
if perr
|
||||
return
|
||||
fin
|
||||
firstblk = 1
|
||||
repeat
|
||||
if read(refnum, heap, 512) == 512
|
||||
entry = heap + 4
|
||||
if firstblk
|
||||
entrylen = heap->$23
|
||||
entriesblk = heap->$24
|
||||
filecnt = heap=>$25
|
||||
entry = entry + entrylen
|
||||
fin
|
||||
for i = firstblk to entriesblk
|
||||
if ^entry
|
||||
^entry = ^entry & $0F
|
||||
prstr(entry)
|
||||
type = ' '
|
||||
when entry->$10
|
||||
is $0F // Is it a directory?
|
||||
type = '/'
|
||||
break
|
||||
is $FF // SYSTEM file
|
||||
type = '-'
|
||||
break
|
||||
is $FE // REL file
|
||||
type = '+'
|
||||
wend
|
||||
cout(type)
|
||||
for len = ^entry to 18
|
||||
cout(' ')
|
||||
next
|
||||
filecnt--
|
||||
fin
|
||||
entry = entry + entrylen
|
||||
next
|
||||
firstblk = 0
|
||||
else
|
||||
filecnt = 0
|
||||
while read(refnum, heap, 512) == 512
|
||||
entry = heap + 4
|
||||
if firstblk
|
||||
entrylen = heap->$23
|
||||
entriesblk = heap->$24 - 1
|
||||
entry = entry + entrylen
|
||||
fin
|
||||
until !filecnt
|
||||
for i = firstblk to entriesblk
|
||||
if ^entry
|
||||
^entry = ^entry & $0F
|
||||
prstr(entry)
|
||||
type = ' '
|
||||
when entry->$10
|
||||
is $0F // Is it a directory?
|
||||
type = '/'
|
||||
break
|
||||
is $FF // SYSTEM file
|
||||
type = '-'
|
||||
break
|
||||
is $FE // REL file
|
||||
type = '+'
|
||||
wend
|
||||
cout(type)
|
||||
for len = ^entry to 18
|
||||
cout(' ')
|
||||
next
|
||||
fin
|
||||
entry = entry + entrylen
|
||||
next
|
||||
firstblk = 0
|
||||
loop
|
||||
close(refnum)
|
||||
crout()
|
||||
end
|
||||
@@ -1393,26 +1383,28 @@ end
|
||||
// Command line processor
|
||||
//
|
||||
def docmds#0
|
||||
word prefix
|
||||
|
||||
loadmod(jitmod) // Cannot do this in init code - it will overwrite it!
|
||||
xheap = $0400 // Reset heap to point at low memory
|
||||
xheaptop = $A000 // Top below JITC
|
||||
strcpy(getlnbuf, @cmdln)
|
||||
while 1
|
||||
prefix = pfxop(heap, GET_PFX)
|
||||
repeat
|
||||
if ^getlnbuf
|
||||
strcpy(@cmdln, getlnbuf)
|
||||
when toupper(parsecmd(getlnbuf))
|
||||
is 'C'
|
||||
catalog(getlnbuf)
|
||||
catalog(^getlnbuf ?? getlnbuf :: prefix)
|
||||
break
|
||||
is 'P'
|
||||
pfxop(getlnbuf, SET_PFX)
|
||||
break
|
||||
is '/'
|
||||
repeat
|
||||
prefix--
|
||||
until prefix[prefix] == '/'
|
||||
if prefix > 1
|
||||
pfxop(@prefix, SET_PFX)
|
||||
^prefix--
|
||||
until ^(prefix + ^prefix) == '/'
|
||||
if ^prefix > 1
|
||||
pfxop(prefix, SET_PFX)
|
||||
fin
|
||||
break
|
||||
is 'V'
|
||||
@@ -1444,9 +1436,9 @@ def docmds#0
|
||||
crout()
|
||||
fin
|
||||
fin
|
||||
prstr(pfxop(@prefix, GET_PFX))
|
||||
prstr(pfxop(prefix, GET_PFX))
|
||||
rdstr($BA)
|
||||
loop
|
||||
until 0
|
||||
end
|
||||
//
|
||||
// Dummy definition to get free heap
|
||||
@@ -1460,7 +1452,7 @@ heap = @lastdef
|
||||
//
|
||||
// Print PLASMA version
|
||||
//
|
||||
prstr("PLASMA 2.0 DP3 128K\n")//; prbyte(version.1); cout('.'); prbyte(version.0); crout
|
||||
prstr("PLASMA 2.0 128K\n")//; prbyte(version.1); cout('.'); prbyte(version.0); crout
|
||||
//
|
||||
// Init symbol table.
|
||||
//
|
||||
@@ -1481,13 +1473,14 @@ syscmdln = @cmdln
|
||||
autorun = open(@autorun)
|
||||
if autorun
|
||||
cmdln = read(autorun, @cmdln+1, 81)
|
||||
strcpy(getlnbuf, @cmdln)
|
||||
close(0)
|
||||
else
|
||||
^getlnbuf = 0
|
||||
//
|
||||
// Print some startup info.
|
||||
//
|
||||
prstr("MEM FREE:$"); prword(availheap); crout
|
||||
fin
|
||||
pfxop(@prefix, GET_PFX)
|
||||
docmds
|
||||
done
|
||||
|
||||
@@ -1028,11 +1028,10 @@ _CALL TYA
|
||||
;*
|
||||
;* ENTER FUNCTION WITH FRAME SIZE AND PARAM COUNT
|
||||
;*
|
||||
ENTER INY
|
||||
LDA (IP),Y
|
||||
EOR #$FF
|
||||
ENTER LDA IFPL ; ALLOCATE FRAME
|
||||
INY
|
||||
SEC
|
||||
ADC IFPL
|
||||
SBC (IP),Y
|
||||
STA IFPL
|
||||
BCS +
|
||||
DEC IFPH
|
||||
@@ -1054,10 +1053,10 @@ ENTER INY
|
||||
;*
|
||||
;* LEAVE FUNCTION
|
||||
;*
|
||||
LEAVE INY ;+INC_IP
|
||||
LDA (IP),Y
|
||||
LEAVE LDA IFPL
|
||||
INY ;+INC_IP
|
||||
CLC
|
||||
ADC IFPL
|
||||
ADC (IP),Y
|
||||
STA IFPL
|
||||
BCS +
|
||||
RTS
|
||||
|
||||
@@ -1402,11 +1402,10 @@ ICAL LDA ESTKL,X
|
||||
;*
|
||||
;* ENTER FUNCTION WITH FRAME SIZE AND PARAM COUNT
|
||||
;*
|
||||
ENTER INY
|
||||
LDA (IP),Y
|
||||
EOR #$FF
|
||||
ENTER LDA IFPL ; ALLOCATE FRAME
|
||||
INY
|
||||
SEC
|
||||
ADC IFPL
|
||||
SBC (IP),Y
|
||||
STA IFPL
|
||||
BCS +
|
||||
DEC IFPH
|
||||
@@ -1428,10 +1427,10 @@ ENTER INY
|
||||
;*
|
||||
;* LEAVE FUNCTION
|
||||
;*
|
||||
LEAVE INY ;+INC_IP
|
||||
LDA (IP),Y
|
||||
LEAVE LDA IFPL
|
||||
INY ;+INC_IP
|
||||
CLC
|
||||
ADC IFPL
|
||||
ADC (IP),Y
|
||||
STA IFPL
|
||||
BCS +
|
||||
RTS
|
||||
|
||||
@@ -1328,15 +1328,14 @@ ENTER LDA IFPH
|
||||
PHA ; SAVE ON STACK FOR LEAVE
|
||||
LDA IFPL
|
||||
PHA
|
||||
LDA PPL ; ALLOCATE FRAME
|
||||
INY
|
||||
LDA (IP),Y
|
||||
EOR #$FF
|
||||
SEC
|
||||
ADC PPL
|
||||
SBC (IP),Y
|
||||
STA PPL
|
||||
STA IFPL
|
||||
LDA #$FF
|
||||
ADC PPH
|
||||
LDA PPH
|
||||
SBC #$00
|
||||
STA PPH
|
||||
STA IFPH
|
||||
INY
|
||||
@@ -1357,13 +1356,13 @@ ENTER LDA IFPH
|
||||
;*
|
||||
;* LEAVE FUNCTION
|
||||
;*
|
||||
LEAVE INY ;+INC_IP
|
||||
LDA (IP),Y
|
||||
LEAVE LDA IFPL
|
||||
INY ;+INC_IP
|
||||
CLC
|
||||
ADC IFPL
|
||||
ADC (IP),Y
|
||||
STA PPL
|
||||
LDA #$00
|
||||
ADC IFPH
|
||||
LDA IFPH
|
||||
ADC #$00
|
||||
STA PPH
|
||||
PLA ; RESTORE PREVIOUS FRAME
|
||||
STA IFPL
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
;*
|
||||
;**********************************************************
|
||||
!CPU 65816
|
||||
DEBUG = 0
|
||||
;*
|
||||
;* THE DEFAULT CPU MODE FOR EXECUTING OPCODES IS:
|
||||
;* 16 BIT A/M
|
||||
@@ -289,13 +288,9 @@ DINTRP PHP
|
||||
TSX
|
||||
STX HWSP
|
||||
LDX #>OPTBL
|
||||
!IF DEBUG {
|
||||
BRA SETDBG
|
||||
} ELSE {
|
||||
STX OPPAGE
|
||||
LDY #$00
|
||||
JMP FETCHOP
|
||||
}
|
||||
!AS
|
||||
IINTRPX PHP
|
||||
PLA
|
||||
@@ -314,14 +309,6 @@ IINTRPX PHP
|
||||
STX HWSP
|
||||
STX ALTRDON
|
||||
LDX #>OPXTBL
|
||||
!IF DEBUG {
|
||||
SETDBG LDY LCRWEN+LCBNK2
|
||||
LDY LCRWEN+LCBNK2
|
||||
STX DBG_OP+2
|
||||
LDY LCRDEN+LCBNK2
|
||||
LDX #>DBGTBL
|
||||
LDY #$00
|
||||
}
|
||||
STX OPPAGE
|
||||
JMP FETCHOP
|
||||
;************************************************************
|
||||
@@ -356,10 +343,6 @@ CMDENTRY = *
|
||||
BIT $C051
|
||||
BIT $C05F
|
||||
JSR $FC58 ; HOME
|
||||
!IF DEBUG {
|
||||
LDA #20 ; SET TEXT WINDOW ABOVE DEBUG OUTPUT
|
||||
STA $23
|
||||
}
|
||||
;
|
||||
; INSTALL PAGE 0 FETCHOP ROUTINE
|
||||
;
|
||||
@@ -473,18 +456,11 @@ PAGE3 = *
|
||||
BIT LCRDEN+LCBNK2 ; $03DC - INDIRECT INTERPX ENTRY
|
||||
JMP IINTRPX
|
||||
}
|
||||
!IF DEBUG {
|
||||
DEFCMD !FILL 23
|
||||
} ELSE {
|
||||
DEFCMD !FILL 28
|
||||
}
|
||||
ENDBYE = *
|
||||
}
|
||||
!IF DEBUG {
|
||||
LCDEFCMD = *-23 ;*-28 ; DEFCMD IN LC MEMORY
|
||||
} ELSE {
|
||||
LCDEFCMD = *-28 ; DEFCMD IN LC MEMORY
|
||||
}
|
||||
|
||||
;*****************
|
||||
;* *
|
||||
;* OPXCODE TABLE *
|
||||
@@ -507,82 +483,63 @@ OPXTBL !WORD ZERO,CN,CN,CN,CN,CN,CN,CN ; 00 02
|
||||
;*
|
||||
;* JIT PROFILING ENTRY INTO INTERPRETER
|
||||
;*
|
||||
!AS
|
||||
JITINTRPX PHP
|
||||
PLA
|
||||
STA PSR
|
||||
SEI
|
||||
PLA
|
||||
SEC
|
||||
SBC #$02 ; POINT TO DEF ENTRY
|
||||
STA TMPL
|
||||
PLA
|
||||
SBC #$00
|
||||
STA TMPH
|
||||
LDY #$05
|
||||
LDA (TMP),Y ; DEC JIT COUNT
|
||||
DEC
|
||||
STA (TMP),Y
|
||||
BEQ RUNJIT
|
||||
CLC ; SWITCH TO NATIVE MODE
|
||||
XCE
|
||||
LDY #$03 ; DEC JIT COUNT
|
||||
LDA (TOS,S),Y
|
||||
DEC
|
||||
STA (TOS,S),Y
|
||||
+ACCMEM16 ; 16 BIT A/M
|
||||
LDY #$3 ; INTERP BYTECODE AS USUAL
|
||||
LDA (TMP),Y
|
||||
BEQ RUNJIT
|
||||
LDY #$01
|
||||
LDA (TOS,S),Y
|
||||
DEY
|
||||
STA IP
|
||||
PLA
|
||||
STX ESP
|
||||
TSX
|
||||
STX HWSP
|
||||
STX ALTRDON
|
||||
LDX #>OPXTBL
|
||||
!IF DEBUG {
|
||||
LDY LCRWEN+LCBNK2
|
||||
LDY LCRWEN+LCBNK2
|
||||
STX DBG_OP+2
|
||||
LDY LCRDEN+LCBNK2
|
||||
LDX #>DBGTBL
|
||||
}
|
||||
STX OPPAGE
|
||||
LDY #$00
|
||||
JMP FETCHOP
|
||||
;
|
||||
!AS
|
||||
RUNJIT DEX ; ADD PARAMETER TO DEF ENTRY
|
||||
LDA TMPL
|
||||
PHA ; AND SAVE IT FOR LATER
|
||||
STA ESTKL,X
|
||||
LDA TMPH
|
||||
!AL
|
||||
RUNJIT PLA ; BACK UP DEF ENTRY TO POINT TO JSR
|
||||
SEC
|
||||
SBC #$0002
|
||||
PHA
|
||||
+ACCMEM8 ; 8 BIT A/M
|
||||
DEX ; ADD PARAMETER TO DEF ENTRY
|
||||
STA ESTKL,X
|
||||
XBA
|
||||
STA ESTKH,X
|
||||
CLC ; SWITCH TO NATIVE MODE
|
||||
XCE
|
||||
STX ESP
|
||||
+ACCMEM16 ; 16 BIT A/M
|
||||
LDA JITCOMP
|
||||
STA SRC
|
||||
LDY #$03
|
||||
LDA (SRC),Y
|
||||
STA IP
|
||||
STX ESP
|
||||
TSX
|
||||
DEX ; TAKE INTO ACCOUNT JSR BELOW
|
||||
DEX
|
||||
STX HWSP
|
||||
STX ALTRDON
|
||||
LDX #>OPXTBL
|
||||
!IF DEBUG {
|
||||
LDY LCRWEN+LCBNK2
|
||||
LDY LCRWEN+LCBNK2
|
||||
STX DBG_OP+2
|
||||
LDY LCRDEN+LCBNK2
|
||||
LDX #>DBGTBL
|
||||
}
|
||||
STX OPPAGE
|
||||
LDY #$00
|
||||
JSR FETCHOP ; CALL JIT COMPILER
|
||||
!AS ; RETURN IN EMULATION MODE
|
||||
PLA
|
||||
STA TMPH
|
||||
PLA
|
||||
STA TMPL
|
||||
PLA
|
||||
STA TMPH
|
||||
JMP (TMP) ; RE-CALL ORIGINAL DEF ENTRY
|
||||
;*********************************************************************
|
||||
;*
|
||||
@@ -1599,51 +1556,28 @@ EMUSTK STA TMP
|
||||
SEC
|
||||
ADC IP
|
||||
STA IP
|
||||
SEC ; SWITCH TO EMULATED MODE
|
||||
SEC ; SWITCH TO EMULATION MODE
|
||||
XCE
|
||||
!AS
|
||||
TSC ; MOVE HW EVAL STACK TO ZP EVAL STACK
|
||||
EOR #$FF
|
||||
SEC
|
||||
ADC HWSP ; STACK DEPTH = (HWSP - SP)/2
|
||||
LSR
|
||||
!IF DEBUG {
|
||||
PHA
|
||||
CLC
|
||||
ADC #$80+'0'
|
||||
STA $7D0+31
|
||||
PLA
|
||||
}
|
||||
EOR #$FF
|
||||
SEC
|
||||
SBC HWSP ; STACK DEPTH = (HWSP - SP)/2
|
||||
CMP #$80
|
||||
ROR
|
||||
ADC ESP ; ESP - STACK DEPTH
|
||||
TAY
|
||||
TAX
|
||||
CPX ESP
|
||||
TAY
|
||||
CPY ESP
|
||||
BEQ +
|
||||
- PLA
|
||||
STA ESTKL,X
|
||||
STA ESTKL,Y
|
||||
PLA
|
||||
STA ESTKH,X
|
||||
INX
|
||||
CPX ESP
|
||||
STA ESTKH,Y
|
||||
INY
|
||||
CPY ESP
|
||||
BNE -
|
||||
+
|
||||
!IF DEBUG {
|
||||
TXA
|
||||
TSX
|
||||
CPX HWSP
|
||||
BEQ +
|
||||
LDX #$80+'C'
|
||||
STX $7D0+30
|
||||
- LDX $C000
|
||||
BPL -
|
||||
LDX $C010
|
||||
+ TAX
|
||||
}
|
||||
PEI (IP) ; SAVE INSTRUCTION POINTER
|
||||
PHX ; SAVE BASELINE ESP
|
||||
TYX
|
||||
+ PEI (IP) ; SAVE INSTRUCTION POINTER
|
||||
PHY ; SAVE BASELINE ESP
|
||||
LDA PSR
|
||||
PHA
|
||||
PLP
|
||||
@@ -1652,45 +1586,26 @@ EMUSTK STA TMP
|
||||
PLA
|
||||
STA PSR
|
||||
SEI
|
||||
CLC ; SWITCH BACK TO NATIVE MODE
|
||||
XCE
|
||||
+ACCMEM16 ; 16 BIT A/M
|
||||
PLY ; MOVE RETURN VALUES TO HW EVAL STACK
|
||||
STY ESP ; RESTORE BASELINE ESP
|
||||
PLA
|
||||
STA IPL
|
||||
PLA
|
||||
STA IPH
|
||||
!IF DEBUG {
|
||||
TXA
|
||||
EOR #$FF
|
||||
SEC
|
||||
ADC ESP
|
||||
CLC
|
||||
ADC #$80+'0'
|
||||
STA $7D0+32
|
||||
}
|
||||
STA IP
|
||||
STX TMPL
|
||||
TSX ; RESTORE BASELINE HWSP
|
||||
STX HWSP
|
||||
CPY TMPL
|
||||
BEQ +
|
||||
TYX
|
||||
- DEX
|
||||
LDA ESTKH,X
|
||||
PHA
|
||||
LDA ESTKL,X
|
||||
PHA
|
||||
CPX TMPL
|
||||
- DEY
|
||||
LDX ESTKH,Y
|
||||
PHX
|
||||
LDX ESTKL,Y
|
||||
PHX
|
||||
CPY TMPL
|
||||
BNE -
|
||||
+ CLC ; SWITCH BACK TO NATIVE MODE
|
||||
XCE
|
||||
+ACCMEM16 ; 16 BIT A/M
|
||||
LDX #>OPTBL ; MAKE SURE WE'RE INDEXING THE RIGHT TABLE
|
||||
!IF DEBUG {
|
||||
LDY LCRWEN+LCBNK2
|
||||
LDY LCRWEN+LCBNK2
|
||||
STX DBG_OP+2
|
||||
LDY LCRDEN+LCBNK2
|
||||
LDX #>DBGTBL
|
||||
}
|
||||
+ LDX #>OPTBL ; MAKE SURE WE'RE INDEXING THE RIGHT TABLE
|
||||
STX OPPAGE
|
||||
LDY #$00
|
||||
JMP FETCHOP
|
||||
@@ -1714,48 +1629,25 @@ EMUSTKX STA TMP
|
||||
XCE
|
||||
!AS
|
||||
TSC ; MOVE HW EVAL STACK TO ZP EVAL STACK
|
||||
EOR #$FF
|
||||
SEC
|
||||
ADC HWSP ; STACK DEPTH = (HWSP - SP)/2
|
||||
LSR
|
||||
!IF DEBUG {
|
||||
PHA
|
||||
CLC
|
||||
ADC #$80+'0'
|
||||
STA $7D0+31
|
||||
PLA
|
||||
}
|
||||
EOR #$FF
|
||||
SEC
|
||||
SBC HWSP ; STACK DEPTH = (HWSP - SP)/2
|
||||
CMP #$80
|
||||
ROR
|
||||
ADC ESP ; ESP - STACK DEPTH
|
||||
TAY
|
||||
TAX
|
||||
CPX ESP
|
||||
TAY
|
||||
CPY ESP
|
||||
BEQ +
|
||||
- PLA
|
||||
STA ESTKL,X
|
||||
STA ESTKL,Y
|
||||
PLA
|
||||
STA ESTKH,X
|
||||
INX
|
||||
CPX ESP
|
||||
STA ESTKH,Y
|
||||
INY
|
||||
CPY ESP
|
||||
BNE -
|
||||
+
|
||||
!IF DEBUG {
|
||||
TXA
|
||||
TSX
|
||||
CPX HWSP
|
||||
BEQ +
|
||||
LDX #$80+'X'
|
||||
STX $7D0+30
|
||||
- LDX $C000
|
||||
BPL -
|
||||
LDX $C010
|
||||
+ TAX
|
||||
}
|
||||
PEI (IP) ; SAVE INSTRUCTION POINTER
|
||||
PHX ; SAVE BASELINE ESP
|
||||
TYX
|
||||
STX ALTRDOFF
|
||||
+ PEI (IP) ; SAVE INSTRUCTION POINTER
|
||||
PHY ; SAVE BASELINE ESP
|
||||
STA ALTRDOFF
|
||||
LDA PSR
|
||||
PHA
|
||||
PLP
|
||||
@@ -1765,53 +1657,30 @@ EMUSTKX STA TMP
|
||||
STA PSR
|
||||
SEI
|
||||
STX ALTRDON
|
||||
CLC ; SWITCH BACK TO NATIVE MODE
|
||||
XCE
|
||||
+ACCMEM16 ; 16 BIT A/M
|
||||
PLY ; MOVE RETURN VALUES TO HW EVAL STACK
|
||||
STY ESP ; RESTORE BASELINE ESP
|
||||
PLA
|
||||
STA IPL
|
||||
PLA
|
||||
STA IPH
|
||||
!IF DEBUG {
|
||||
TXA
|
||||
EOR #$FF
|
||||
SEC
|
||||
ADC ESP
|
||||
CLC
|
||||
ADC #$80+'0'
|
||||
STA $7D0+32
|
||||
}
|
||||
STA IP
|
||||
STX TMPL
|
||||
TSX ; RESTORE BASELINE HWSP
|
||||
STX HWSP
|
||||
CPY TMPL
|
||||
BEQ +
|
||||
TYX
|
||||
- DEX
|
||||
LDA ESTKH,X
|
||||
PHA
|
||||
LDA ESTKL,X
|
||||
PHA
|
||||
CPX TMPL
|
||||
- DEY
|
||||
LDX ESTKH,Y
|
||||
PHX
|
||||
LDX ESTKL,Y
|
||||
PHX
|
||||
CPY TMPL
|
||||
BNE -
|
||||
+ CLC ; SWITCH BACK TO NATIVE MODE
|
||||
XCE
|
||||
+ACCMEM16 ; 16 BIT A/M
|
||||
LDX #>OPXTBL ; MAKE SURE WE'RE INDEXING THE RIGHT TABLE
|
||||
!IF DEBUG {
|
||||
LDY LCRWEN+LCBNK2
|
||||
LDY LCRWEN+LCBNK2
|
||||
STX DBG_OP+2
|
||||
LDY LCRDEN+LCBNK2
|
||||
LDX #>DBGTBL
|
||||
}
|
||||
+ LDX #>OPXTBL ; MAKE SURE WE'RE INDEXING THE RIGHT TABLE
|
||||
STX OPPAGE
|
||||
LDY #$00
|
||||
JMP FETCHOP
|
||||
;*
|
||||
;* JUMP INDIRECT THROUGH TMP
|
||||
;*
|
||||
;JMPTMP JMP (TMP)
|
||||
;*
|
||||
;* ENTER FUNCTION WITH FRAME SIZE AND PARAM COUNT
|
||||
;*
|
||||
ENTER PEI (IFP) ; SAVE ON STACK FOR LEAVE
|
||||
@@ -1820,15 +1689,6 @@ ENTER PEI (IFP) ; SAVE ON STACK FOR LEAVE
|
||||
INY
|
||||
LDA (IP),Y
|
||||
AND #$00FF
|
||||
!IF DEBUG {
|
||||
+ACCMEM8 ; 8 BIT A/M
|
||||
PHA
|
||||
CLC
|
||||
ADC #$80+'0'
|
||||
STA $7D0+31
|
||||
PLA
|
||||
+ACCMEM16 ; 16 BIT A/M
|
||||
}
|
||||
EOR #$FFFF ; ALLOCATE FRAME
|
||||
SEC
|
||||
ADC PP
|
||||
@@ -1866,43 +1726,22 @@ LEAVEX INY ;+INC_IP
|
||||
STA ALTRDOFF
|
||||
+ STA TMPL
|
||||
TSC ; MOVE HW EVAL STACK TO ZP EVAL STACK
|
||||
EOR #$FF
|
||||
SEC
|
||||
ADC HWSP ; STACK DEPTH = (HWSP - SP)/2
|
||||
LSR
|
||||
!IF DEBUG {
|
||||
PHA
|
||||
CLC
|
||||
ADC #$80+'0'
|
||||
STA $7D0+31
|
||||
PLA
|
||||
}
|
||||
EOR #$FF
|
||||
SEC
|
||||
SBC HWSP ; STACK DEPTH = (HWSP - SP)/2
|
||||
CMP #$80
|
||||
ROR
|
||||
ADC ESP ; ESP - STACK DEPTH
|
||||
TAX
|
||||
CPX ESP
|
||||
BEQ ++
|
||||
TAY
|
||||
- PLA
|
||||
STA ESTKL,X
|
||||
STA ESTKL,Y
|
||||
PLA
|
||||
STA ESTKH,X
|
||||
INX
|
||||
CPX ESP
|
||||
STA ESTKH,Y
|
||||
INY
|
||||
CPY ESP
|
||||
BNE -
|
||||
!IF DEBUG {
|
||||
TSX
|
||||
CPX HWSP
|
||||
BEQ +
|
||||
LDX #$80+'L'
|
||||
STX $7D0+30
|
||||
- LDX $C000
|
||||
BPL -
|
||||
LDX $C010
|
||||
+
|
||||
}
|
||||
TYX ; RESTORE NEW ESP
|
||||
++ +ACCMEM16 ; 16 BIT A/M
|
||||
LDY TMPL ; DEALLOCATE POOL + FRAME
|
||||
TYA
|
||||
@@ -1917,55 +1756,33 @@ LEAVEX INY ;+INC_IP
|
||||
LDA PSR
|
||||
PHA
|
||||
PLP
|
||||
RTS
|
||||
RTS ; RETURN IN EMULATION MODE
|
||||
!AL
|
||||
RETX STX ALTRDOFF
|
||||
RET SEC ; SWITCH TO EMULATION MODE
|
||||
XCE
|
||||
!AS
|
||||
;+ACCMEM8 ; 8 BIT A/M
|
||||
TSC ; MOVE HW EVAL STACK TO ZP EVAL STACK
|
||||
EOR #$FF
|
||||
SEC
|
||||
ADC HWSP ; STACK DEPTH = (HWSP - SP)/2
|
||||
LSR
|
||||
!IF DEBUG {
|
||||
PHA
|
||||
CLC
|
||||
ADC #$80+'0'
|
||||
STA $7D0+31
|
||||
PLA
|
||||
}
|
||||
EOR #$FF
|
||||
SEC
|
||||
SBC HWSP ; STACK DEPTH = (HWSP - SP)/2
|
||||
CMP #$80
|
||||
ROR
|
||||
ADC ESP ; ESP - STACK DEPTH
|
||||
TAX
|
||||
CPX ESP
|
||||
BEQ ++
|
||||
TAY
|
||||
- PLA
|
||||
STA ESTKL,X
|
||||
STA ESTKL,Y
|
||||
PLA
|
||||
STA ESTKH,X
|
||||
INX
|
||||
CPX ESP
|
||||
STA ESTKH,Y
|
||||
INY
|
||||
CPY ESP
|
||||
BNE -
|
||||
!IF DEBUG {
|
||||
TSX
|
||||
CPX HWSP
|
||||
BEQ +
|
||||
LDX #$80+'X'
|
||||
STX $7D0+30
|
||||
- LDX $C000
|
||||
BPL -
|
||||
LDX $C010
|
||||
+
|
||||
}
|
||||
TYX
|
||||
++ LDA PSR
|
||||
PHA
|
||||
PLP
|
||||
RTS
|
||||
RTS ; RETURN IN EMULATION MODE
|
||||
;*
|
||||
;* RETURN TO NATIVE CODE
|
||||
;*
|
||||
@@ -1975,217 +1792,5 @@ NATV TYA ; FLATTEN IP
|
||||
STA IP
|
||||
+INDEX16 ; SET 16 BIT X/Y
|
||||
JMP (IP)
|
||||
!IF DEBUG {
|
||||
;*****************
|
||||
;* *
|
||||
;* DEBUG TABLE *
|
||||
;* *
|
||||
;*****************
|
||||
!ALIGN 255,0
|
||||
DBGTBL !WORD STEP,STEP,STEP,STEP,STEP,STEP,STEP,STEP ; 00 02 04 06 08 0A 0C 0E
|
||||
!WORD STEP,STEP,STEP,STEP,STEP,STEP,STEP,STEP ; 10 12 14 16 18 1A 1C 1E
|
||||
!WORD STEP,STEP,STEP,STEP,STEP,STEP,STEP,STEP ; 20 22 24 26 28 2A 2C 2E
|
||||
!WORD STEP,STEP,STEP,STEP,STEP,STEP,STEP,STEP ; 30 32 34 36 38 3A 3C 3E
|
||||
!WORD STEP,STEP,STEP,STEP,STEP,STEP,STEP,STEP ; 40 42 44 46 48 4A 4C 4E
|
||||
!WORD STEP,STEP,STEP,STEP,STEP,STEP,STEP,STEP ; 50 52 54 56 58 5A 5C 5E
|
||||
!WORD STEP,STEP,STEP,STEP,STEP,STEP,STEP,STEP ; 60 62 64 66 68 6A 6C 6E
|
||||
!WORD STEP,STEP,STEP,STEP,STEP,STEP,STEP,STEP ; 70 72 74 76 78 7A 7C 7E
|
||||
!WORD STEP,STEP,STEP,STEP,STEP,STEP,STEP,STEP ; 80 82 84 86 88 8A 8C 8E
|
||||
!WORD STEP,STEP,STEP,STEP,STEP,STEP,STEP,STEP ; 90 92 94 96 98 9A 9C 9E
|
||||
!WORD STEP,STEP,STEP,STEP,STEP,STEP,STEP,STEP ; A0 A2 A4 A6 A8 AA AC AE
|
||||
!WORD STEP,STEP,STEP,STEP,STEP,STEP,STEP,STEP ; B0 B2 B4 B6 B8 BA BC BE
|
||||
!WORD STEP ; C0
|
||||
;*
|
||||
;* DEBUG PRINT ROUTINES
|
||||
;*
|
||||
!AS
|
||||
PRHEX PHA
|
||||
LSR
|
||||
LSR
|
||||
LSR
|
||||
LSR
|
||||
CLC
|
||||
ADC #'0'
|
||||
CMP #':'
|
||||
BCC +
|
||||
ADC #6
|
||||
+ ORA #$80
|
||||
STA $7D0,X
|
||||
INX
|
||||
PLA
|
||||
AND #$0F
|
||||
ADC #'0'
|
||||
CMP #':'
|
||||
BCC +
|
||||
ADC #6
|
||||
+ ORA #$80
|
||||
STA $7D0,X
|
||||
INX
|
||||
RTS
|
||||
PRCHR ORA #$80
|
||||
STA $7D0,X
|
||||
INX
|
||||
RTS
|
||||
PRBYTE PHA
|
||||
LDA #'$'
|
||||
JSR PRCHR
|
||||
PLA
|
||||
JMP PRHEX
|
||||
PRWORD PHA
|
||||
LDA #'$'
|
||||
JSR PRCHR
|
||||
XBA
|
||||
JSR PRHEX
|
||||
PLA
|
||||
JMP PRHEX
|
||||
!AL
|
||||
; MESSAGES
|
||||
BADEMU !TEXT "IN EMULATION MODE!", 0
|
||||
BADMODE !TEXT "IN 8 BIT A/M MODE!", 0
|
||||
;*
|
||||
;* DEBUG STEP ROUTINE
|
||||
;*
|
||||
STEP STX TMPL
|
||||
PHP ; VALIDATE MODES
|
||||
SEC ; SWITCH TO EMULATED MODE
|
||||
XCE
|
||||
+ACCMEM8 ; 8 BIT A/M
|
||||
BCC +
|
||||
LDX #$00
|
||||
-- LDA BADEMU,X
|
||||
- BEQ -
|
||||
JSR PRCHR
|
||||
BRA --
|
||||
+ XCE ; SWITCH BACK TO NATIVE MODE
|
||||
PLX
|
||||
TXA
|
||||
AND #$20
|
||||
BEQ ++
|
||||
LDX #$00
|
||||
- LDA BADMODE,X
|
||||
BNE +
|
||||
JMP DBGKEY
|
||||
+ JSR PRCHR
|
||||
BRA -
|
||||
++ LDX $C013 ; SAVE RAMRD
|
||||
STX $C002
|
||||
STX TMPH
|
||||
LDX #39 ; SCROLL PREVIOUS LINES UP
|
||||
- LDA $6D0,X
|
||||
STA $650,X
|
||||
LDA $750,X
|
||||
STA $6D0,X
|
||||
LDA $7D0,X
|
||||
STA $750,X
|
||||
DEX
|
||||
BPL -
|
||||
LDA #' '
|
||||
BIT TMPH ; RAMRD SET?
|
||||
BPL +
|
||||
STX $C003
|
||||
LDA #'X'
|
||||
+ LDX #$00
|
||||
JSR PRCHR
|
||||
+ACCMEM16 ; 16 BIT A/M
|
||||
TYA
|
||||
CLC
|
||||
ADC IP
|
||||
+ACCMEM8 ; 8 BIT A/M
|
||||
JSR PRWORD
|
||||
LDA #':'
|
||||
JSR PRCHR
|
||||
LDA (IP),Y
|
||||
JSR PRBYTE
|
||||
INX
|
||||
+ACCMEM16 ; 16 BIT A/M
|
||||
TSC
|
||||
+ACCMEM8 ; 8 BIT A/M
|
||||
JSR PRWORD
|
||||
LDA #$80+'['
|
||||
JSR PRCHR
|
||||
STX TMPH
|
||||
TSX
|
||||
TXA
|
||||
EOR #$FF
|
||||
SEC
|
||||
ADC HWSP
|
||||
LSR
|
||||
CLC
|
||||
ADC #$80+'0'
|
||||
LDX TMPH
|
||||
JSR PRCHR
|
||||
LDA #$80+']'
|
||||
JSR PRCHR
|
||||
LDA #':'
|
||||
JSR PRCHR
|
||||
STX TMPH
|
||||
TSX
|
||||
CPX HWSP
|
||||
BEQ ++
|
||||
BCC +
|
||||
LDX TMPH
|
||||
LDA #' '
|
||||
JSR PRCHR
|
||||
LDA #'<' ; STACK UNDERFLOW!
|
||||
JSR PRCHR
|
||||
JSR PRCHR
|
||||
JSR PRCHR
|
||||
JSR PRCHR
|
||||
BRA DBGKEY
|
||||
+ LDA $102,X
|
||||
XBA
|
||||
LDA $101,X
|
||||
LDX TMPH
|
||||
JSR PRWORD
|
||||
BRA +++
|
||||
++ LDX TMPH
|
||||
LDA #' '
|
||||
JSR PRCHR
|
||||
LDA #'-'
|
||||
JSR PRCHR
|
||||
JSR PRCHR
|
||||
JSR PRCHR
|
||||
JSR PRCHR
|
||||
+++ LDA #' '
|
||||
- JSR PRCHR
|
||||
CPX #40
|
||||
BNE -
|
||||
TSX
|
||||
CMP #$10
|
||||
BCC DBGKEY
|
||||
LDX TMPL
|
||||
; CPX #$00 ; FORCE PAUSE AT 'ZERO'
|
||||
; BEQ DBGKEY
|
||||
- LDX $C000
|
||||
CPX #$9B
|
||||
BNE +
|
||||
DBGKEY STX $C010
|
||||
- LDX $C000
|
||||
BPL -
|
||||
CPX #$9B
|
||||
BEQ +
|
||||
STX $C010
|
||||
CPX #$80+'Q'
|
||||
BNE +
|
||||
SEC ; SWITCH TO EMU MODE
|
||||
XCE
|
||||
BIT $C054 ; SET TEXT MODE
|
||||
BIT $C051
|
||||
BIT $C05F
|
||||
LDA #20 ; SET TEXT WINDOW ABOVE DEBUG OUTPUT
|
||||
STA $23
|
||||
STZ $20
|
||||
STZ $22
|
||||
STZ $24
|
||||
STZ $25
|
||||
STZ $28
|
||||
LDA #$04
|
||||
STA $29
|
||||
BRK
|
||||
+ +ACCMEM16 ; 16 BIT A/M
|
||||
LDX TMPL
|
||||
DBG_OP JMP (OPTBL,X)
|
||||
}
|
||||
|
||||
VMEND = *
|
||||
}
|
||||
|
||||
@@ -40,8 +40,7 @@ ALTRDON = $C003
|
||||
ALTWROFF= $C004
|
||||
ALTWRON = $C005
|
||||
!SOURCE "vmsrc/plvmzp.inc"
|
||||
PSR = TMP+2
|
||||
DVSIGN = PSR+1
|
||||
DVSIGN = TMP+2
|
||||
DROP = $EF
|
||||
NEXTOP = $F0
|
||||
FETCHOP = NEXTOP+1
|
||||
@@ -236,11 +235,7 @@ DINTRP PLA
|
||||
;*
|
||||
;* INDIRECTLY ENTER INTO BYTECODE INTERPRETER
|
||||
;*
|
||||
IINTRPX PHP
|
||||
PLA
|
||||
STA PSR
|
||||
SEI
|
||||
PLA
|
||||
IINTRPX PLA
|
||||
STA TMPL
|
||||
PLA
|
||||
STA TMPH
|
||||
@@ -253,6 +248,8 @@ IINTRPX PHP
|
||||
DEY
|
||||
LDA #>OPXTBL
|
||||
STA OPPAGE
|
||||
PHP ; SAVE PSR
|
||||
SEI
|
||||
STA ALTRDON
|
||||
JMP FETCHOP
|
||||
;************************************************************
|
||||
@@ -402,7 +399,7 @@ OPXTBL !WORD ZERO,CN,CN,CN,CN,CN,CN,CN ; 00 02
|
||||
!WORD MINUS1,BREQ,BRNE,LA,LLA,CB,CW,CSX ; 20 22 24 26 28 2A 2C 2E
|
||||
!WORD DROP,DROP2,DUP,DIVMOD,ADDI,SUBI,ANDI,ORI ; 30 32 34 36 38 3A 3C 3E
|
||||
!WORD ISEQ,ISNE,ISGT,ISLT,ISGE,ISLE,BRFLS,BRTRU ; 40 42 44 46 48 4A 4C 4E
|
||||
!WORD BRNCH,SEL,CALLX,ICALX,ENTER,LEAVEX,RETX,CFFB ; 50 52 54 56 58 5A 5C 5E
|
||||
!WORD BRNCH,SEL,CALLX,ICALX,ENTERX,LEAVEX,RETX,CFFB ; 50 52 54 56 58 5A 5C 5E
|
||||
!WORD LBX,LWX,LLBX,LLWX,LABX,LAWX,DLB,DLW ; 60 62 64 66 68 6A 6C 6E
|
||||
!WORD SB,SW,SLB,SLW,SAB,SAW,DAB,DAW ; 70 72 74 76 78 7A 7C 7E
|
||||
!WORD LNOT,ADD,SUB,MUL,DIV,MOD,INCR,DECR ; 80 82 84 86 88 8A 8C 8E
|
||||
@@ -413,11 +410,7 @@ OPXTBL !WORD ZERO,CN,CN,CN,CN,CN,CN,CN ; 00 02
|
||||
;*
|
||||
;* JIT PROFILING ENTRY INTO INTERPRETER
|
||||
;*
|
||||
JITINTRPX PHP
|
||||
PLA
|
||||
STA PSR
|
||||
SEI
|
||||
PLA
|
||||
JITINTRPX PLA
|
||||
SEC
|
||||
SBC #$02 ; POINT TO DEF ENTRY
|
||||
STA TMPL
|
||||
@@ -439,6 +432,8 @@ JITINTRPX PHP
|
||||
LDY #$00
|
||||
LDA #>OPXTBL
|
||||
STA OPPAGE
|
||||
PHP
|
||||
SEI
|
||||
STA ALTRDON
|
||||
JMP FETCHOP
|
||||
RUNJIT LDA JITCOMP
|
||||
@@ -461,9 +456,15 @@ RUNJIT LDA JITCOMP
|
||||
LDY #$00
|
||||
LDA #>OPXTBL
|
||||
STA OPPAGE
|
||||
LDA #>(RETJIT-1)
|
||||
PHA
|
||||
LDA #<(RETJIT-1)
|
||||
PHA
|
||||
PHP
|
||||
SEI
|
||||
STA ALTRDON
|
||||
JSR FETCHOP ; CALL JIT COMPILER
|
||||
PLA
|
||||
JMP FETCHOP ; CALL JIT COMPILER
|
||||
RETJIT PLA
|
||||
STA TMPH
|
||||
PLA
|
||||
STA TMPL
|
||||
@@ -1857,6 +1858,8 @@ CALLX INY ;+INC_IP
|
||||
INY ;+INC_IP
|
||||
LDA (IP),Y
|
||||
STA TMPH
|
||||
STA ALTRDOFF
|
||||
PLP ; RESTORE FLAGS
|
||||
TYA
|
||||
SEC
|
||||
ADC IPL
|
||||
@@ -1864,16 +1867,7 @@ CALLX INY ;+INC_IP
|
||||
LDA IPH
|
||||
ADC #$00
|
||||
PHA
|
||||
STA ALTRDOFF
|
||||
LDA PSR
|
||||
PHA
|
||||
PLP
|
||||
JSR JMPTMP
|
||||
PHP
|
||||
PLA
|
||||
STA PSR
|
||||
SEI
|
||||
STA ALTRDON
|
||||
PLA
|
||||
STA IPH
|
||||
PLA
|
||||
@@ -1881,6 +1875,9 @@ CALLX INY ;+INC_IP
|
||||
LDA #>OPXTBL ; MAKE SURE WE'RE INDEXING THE RIGHT TABLE
|
||||
STA OPPAGE
|
||||
LDY #$00
|
||||
PHP
|
||||
SEI
|
||||
STA ALTRDON
|
||||
JMP FETCHOP
|
||||
;*
|
||||
;* INDIRECT CALL TO ADDRESS (NATIVE CODE)
|
||||
@@ -1906,7 +1903,9 @@ ICAL LDA ESTKL,X
|
||||
STA OPPAGE
|
||||
LDY #$00
|
||||
JMP FETCHOP
|
||||
ICALX LDA ESTKL,X
|
||||
ICALX STA ALTRDOFF
|
||||
PLP ; RESTORE FLAGS
|
||||
LDA ESTKL,X
|
||||
STA TMPL
|
||||
LDA ESTKH,X
|
||||
STA TMPH
|
||||
@@ -1918,16 +1917,7 @@ ICALX LDA ESTKL,X
|
||||
LDA IPH
|
||||
ADC #$00
|
||||
PHA
|
||||
STA ALTRDOFF
|
||||
LDA PSR
|
||||
PHA
|
||||
PLP
|
||||
JSR JMPTMP
|
||||
PHP
|
||||
PLA
|
||||
STA PSR
|
||||
SEI
|
||||
STA ALTRDON
|
||||
PLA
|
||||
STA IPH
|
||||
PLA
|
||||
@@ -1935,6 +1925,9 @@ ICALX LDA ESTKL,X
|
||||
LDA #>OPXTBL ; MAKE SURE WE'RE INDEXING THE RIGHT TABLE
|
||||
STA OPPAGE
|
||||
LDY #$00
|
||||
PHP
|
||||
SEI
|
||||
STA ALTRDON
|
||||
JMP FETCHOP
|
||||
;*
|
||||
;* JUMP INDIRECT TRHOUGH TMP
|
||||
@@ -1943,19 +1936,51 @@ ICALX LDA ESTKL,X
|
||||
;*
|
||||
;* ENTER FUNCTION WITH FRAME SIZE AND PARAM COUNT
|
||||
;*
|
||||
ENTERX PLA ; KEEP PSR ON TOP OF STACK
|
||||
TAY
|
||||
LDA IFPH
|
||||
PHA ; SAVE ON STACK FOR LEAVE
|
||||
LDA IFPL
|
||||
PHA
|
||||
TYA
|
||||
PHA
|
||||
LDA PPL ; ALLOCATE FRAME
|
||||
LDY #$01
|
||||
SEC
|
||||
SBC (IP),Y
|
||||
STA PPL
|
||||
STA IFPL
|
||||
LDA PPH
|
||||
SBC #$00
|
||||
STA PPH
|
||||
STA IFPH
|
||||
INY
|
||||
LDA (IP),Y
|
||||
BEQ +
|
||||
ASL
|
||||
TAY
|
||||
- LDA ESTKH,X
|
||||
DEY
|
||||
STA (IFP),Y
|
||||
LDA ESTKL,X
|
||||
INX
|
||||
DEY
|
||||
STA (IFP),Y
|
||||
BNE -
|
||||
+ LDY #$03
|
||||
JMP FETCHOP
|
||||
ENTER LDA IFPH
|
||||
PHA ; SAVE ON STACK FOR LEAVE
|
||||
LDA IFPL
|
||||
PHA
|
||||
LDA PPL ; ALLOCATE FRAME
|
||||
INY
|
||||
LDA (IP),Y
|
||||
EOR #$FF ; ALLOCATE FRAME
|
||||
SEC
|
||||
ADC PPL
|
||||
SBC (IP),Y
|
||||
STA PPL
|
||||
STA IFPL
|
||||
LDA #$FF
|
||||
ADC PPH
|
||||
LDA PPH
|
||||
SBC #$00
|
||||
STA PPH
|
||||
STA IFPH
|
||||
INY
|
||||
@@ -1976,30 +2001,31 @@ ENTER LDA IFPH
|
||||
;*
|
||||
;* LEAVE FUNCTION
|
||||
;*
|
||||
LEAVEX INY ;+INC_IP
|
||||
LDA (IP),Y
|
||||
LEAVEX LDA IFPL
|
||||
INY ;+INC_IP
|
||||
CLC
|
||||
ADC IFPL
|
||||
ADC (IP),Y
|
||||
STA PPL
|
||||
LDA #$00
|
||||
ADC IFPH
|
||||
LDA IFPH
|
||||
ADC #$00
|
||||
STA PPH
|
||||
STA ALTRDOFF
|
||||
PLP
|
||||
PLA ; RESTORE PREVIOUS FRAME
|
||||
STA IFPL
|
||||
PLA
|
||||
STA IFPH
|
||||
RTS
|
||||
RETX STA ALTRDOFF
|
||||
LDA PSR
|
||||
PHA
|
||||
PLP
|
||||
RTS
|
||||
LEAVE INY ;+INC_IP
|
||||
LDA (IP),Y
|
||||
LEAVE LDA IFPL
|
||||
INY ;+INC_IP
|
||||
CLC
|
||||
ADC IFPL
|
||||
ADC (IP),Y
|
||||
STA PPL
|
||||
LDA #$00
|
||||
ADC IFPH
|
||||
LDA IFPH
|
||||
ADC #$00
|
||||
STA PPH
|
||||
PLA ; RESTORE PREVIOUS FRAME
|
||||
STA IFPL
|
||||
@@ -2352,6 +2378,43 @@ CBRNCH TYA ; FLATTEN IP
|
||||
DEY
|
||||
JMP FETCHOP
|
||||
CBRNCHEND
|
||||
;
|
||||
LDA #<ENTERX
|
||||
LDX #>ENTERX
|
||||
LDY #(CENTERXEND-CENTERX)
|
||||
JSR OPCPY
|
||||
CENTERX PLY ; KEEP PSR ON TOP OF STACK
|
||||
LDA IFPH
|
||||
PHA ; SAVE ON STACK FOR LEAVE
|
||||
LDA IFPL
|
||||
PHA
|
||||
PHY
|
||||
LDA PPL ; ALLOCATE FRAME
|
||||
LDY #$01
|
||||
SEC
|
||||
SBC (IP),Y
|
||||
STA PPL
|
||||
STA IFPL
|
||||
LDA PPH
|
||||
SBC #$00
|
||||
STA PPH
|
||||
STA IFPH
|
||||
INY
|
||||
LDA (IP),Y
|
||||
BEQ +
|
||||
ASL
|
||||
TAY
|
||||
- LDA ESTKH,X
|
||||
DEY
|
||||
STA (IFP),Y
|
||||
LDA ESTKL,X
|
||||
INX
|
||||
DEY
|
||||
STA (IFP),Y
|
||||
BNE -
|
||||
+ LDY #$03
|
||||
JMP FETCHOP
|
||||
CENTERXEND
|
||||
;
|
||||
RTS
|
||||
;*
|
||||
|
||||
@@ -160,11 +160,11 @@ OPTBL !WORD ZERO,CN,CN,CN,CN,CN,CN,CN ; 00 02
|
||||
;* SYSTEM INTERPRETER ENTRYPOINT
|
||||
;*
|
||||
INTERP PLA
|
||||
CLC
|
||||
ADC #$01
|
||||
CLC
|
||||
ADC #$01
|
||||
STA IPL
|
||||
PLA
|
||||
ADC #$00
|
||||
ADC #$00
|
||||
STA IPH
|
||||
LDY #$00
|
||||
STY IPX
|
||||
@@ -1376,15 +1376,14 @@ ENTER LDA IFPH
|
||||
PHA ; SAVE ON STACK FOR LEAVE
|
||||
LDA IFPL
|
||||
PHA
|
||||
LDA PPL ; ALLOCATE FRAME
|
||||
INY
|
||||
LDA (IP),Y
|
||||
EOR #$FF
|
||||
SEC
|
||||
ADC PPL
|
||||
SBC (IP),Y
|
||||
STA PPL
|
||||
STA IFPL
|
||||
LDA #$FF
|
||||
ADC PPH
|
||||
LDA PPH
|
||||
SBC #$00
|
||||
STA PPH
|
||||
STA IFPH
|
||||
INY
|
||||
@@ -1405,13 +1404,13 @@ ENTER LDA IFPH
|
||||
;*
|
||||
;* LEAVE FUNCTION
|
||||
;*
|
||||
LEAVE INY ;+INC_IP
|
||||
LDA (IP),Y
|
||||
LEAVE LDA IFPL
|
||||
INY ;+INC_IP
|
||||
CLC
|
||||
ADC IFPL
|
||||
ADC (IP),Y
|
||||
STA PPL
|
||||
LDA #$00
|
||||
ADC IFPH
|
||||
LDA IFPH
|
||||
ADC #$00
|
||||
STA PPH
|
||||
PLA ; RESTORE PREVIOUS FRAME
|
||||
STA IFPL
|
||||
|
||||
@@ -80,7 +80,7 @@ def catalog(path)#0
|
||||
byte firstblk
|
||||
byte entrylen, entriesblk
|
||||
byte i, type, len
|
||||
word entry, filecnt, catptr
|
||||
word entry, catptr
|
||||
|
||||
if !^path
|
||||
getpfx(path)
|
||||
@@ -91,43 +91,37 @@ def catalog(path)#0
|
||||
fin
|
||||
catptr = heapmark
|
||||
firstblk = 1
|
||||
repeat
|
||||
if cmdsys:sysread(refnum, catptr, 512) == 512
|
||||
entry = catptr + 4
|
||||
if firstblk
|
||||
entrylen = catptr->$23
|
||||
entriesblk = catptr->$24
|
||||
filecnt = catptr=>$25
|
||||
entry = entry + entrylen
|
||||
fin
|
||||
for i = firstblk to entriesblk
|
||||
if ^entry
|
||||
^entry = ^entry & $0F
|
||||
puts(entry)
|
||||
type = ' '
|
||||
when entry->$10
|
||||
is $0F // Is it a directory?
|
||||
type = '/'
|
||||
break
|
||||
is $FF // SYSTEM file
|
||||
type = '-'
|
||||
break
|
||||
is $FE // REL file
|
||||
type = '+'
|
||||
wend
|
||||
putc(type)
|
||||
for len = ^entry to 18
|
||||
putc(' ')
|
||||
next
|
||||
filecnt--
|
||||
fin
|
||||
entry = entry + entrylen
|
||||
next
|
||||
firstblk = 0
|
||||
else
|
||||
filecnt = 0
|
||||
while cmdsys:sysread(refnum, catptr, 512) == 512
|
||||
entry = catptr + 4
|
||||
if firstblk
|
||||
entrylen = catptr->$23
|
||||
entriesblk = catptr->$24 - 1
|
||||
entry = entry + entrylen
|
||||
fin
|
||||
until filecnt == 0
|
||||
for i = firstblk to entriesblk
|
||||
if ^entry
|
||||
^entry = ^entry & $0F
|
||||
puts(entry)
|
||||
type = ' '
|
||||
when entry->$10
|
||||
is $0F // Is it a directory?
|
||||
type = '/'
|
||||
break
|
||||
is $FF // SYSTEM file
|
||||
type = '-'
|
||||
break
|
||||
is $FE // REL file
|
||||
type = '+'
|
||||
wend
|
||||
putc(type)
|
||||
for len = ^entry to 18
|
||||
putc(' ')
|
||||
next
|
||||
fin
|
||||
entry = entry + entrylen
|
||||
next
|
||||
firstblk = 0
|
||||
loop
|
||||
cmdsys:sysclose(refnum)
|
||||
putln()
|
||||
end
|
||||
@@ -179,6 +173,7 @@ def shell#1
|
||||
byte prefix[64]
|
||||
byte err[]
|
||||
word cmdptr
|
||||
|
||||
//
|
||||
// Copy AUTORUN commmand line
|
||||
//
|
||||
@@ -186,6 +181,7 @@ def shell#1
|
||||
//
|
||||
// Handle commands.
|
||||
//
|
||||
getpfx(@prefix))
|
||||
repeat
|
||||
if ^cmdptr
|
||||
when toupper(parsecmd(cmdptr))
|
||||
@@ -216,9 +212,7 @@ def shell#1
|
||||
volumes
|
||||
break
|
||||
is '+'
|
||||
//cmdsys:modexec(striptrail(cmdptr))
|
||||
return striptrail(cmdptr)
|
||||
//cmdsys:syswrite(cmdsys.refcons, @textmode, 3)
|
||||
break
|
||||
otherwise
|
||||
puts("?\n")
|
||||
|
||||
@@ -155,7 +155,7 @@ def catalog(path)#0
|
||||
byte firstblk
|
||||
byte entrylen, entriesblk
|
||||
byte i, type, len
|
||||
word entry, filecnt, catptr
|
||||
word entry, catptr
|
||||
|
||||
if !^path
|
||||
getpfx(path)
|
||||
@@ -166,43 +166,37 @@ def catalog(path)#0
|
||||
fin
|
||||
catptr = heapmark
|
||||
firstblk = 1
|
||||
repeat
|
||||
if cmdsys:sysread(refnum, catptr, 512) == 512
|
||||
entry = catptr + 4
|
||||
if firstblk
|
||||
entrylen = catptr->$23
|
||||
entriesblk = catptr->$24
|
||||
filecnt = catptr=>$25
|
||||
entry = entry + entrylen
|
||||
fin
|
||||
for i = firstblk to entriesblk
|
||||
if ^entry
|
||||
^entry = ^entry & $0F
|
||||
puts(entry)
|
||||
type = ' '
|
||||
when entry->$10
|
||||
is $0F // Is it a directory?
|
||||
type = '/'
|
||||
break
|
||||
is $FF // SYSTEM file
|
||||
type = '-'
|
||||
break
|
||||
is $FE // REL file
|
||||
type = '+'
|
||||
wend
|
||||
putc(type)
|
||||
for len = ^entry to 18
|
||||
putc(' ')
|
||||
next
|
||||
filecnt--
|
||||
fin
|
||||
entry = entry + entrylen
|
||||
next
|
||||
firstblk = 0
|
||||
else
|
||||
filecnt = 0
|
||||
while cmdsys:sysread(refnum, catptr, 512) == 512
|
||||
entry = catptr + 4
|
||||
if firstblk
|
||||
entrylen = catptr->$23
|
||||
entriesblk = catptr->$24 - 1
|
||||
entry = entry + entrylen
|
||||
fin
|
||||
until filecnt == 0
|
||||
for i = firstblk to entriesblk
|
||||
if ^entry
|
||||
^entry = ^entry & $0F
|
||||
puts(entry)
|
||||
type = ' '
|
||||
when entry->$10
|
||||
is $0F // Is it a directory?
|
||||
type = '/'
|
||||
break
|
||||
is $FF // SYSTEM file
|
||||
type = '-'
|
||||
break
|
||||
is $FE // REL file
|
||||
type = '+'
|
||||
wend
|
||||
putc(type)
|
||||
for len = ^entry to 18
|
||||
putc(' ')
|
||||
next
|
||||
fin
|
||||
entry = entry + entrylen
|
||||
next
|
||||
firstblk = 0
|
||||
loop
|
||||
cmdsys:sysclose(refnum)
|
||||
putln()
|
||||
end
|
||||
@@ -254,6 +248,7 @@ def shell#1
|
||||
byte prefix[64]
|
||||
byte err[]
|
||||
word cmdptr
|
||||
|
||||
//
|
||||
// Copy AUTORUN commmand line
|
||||
//
|
||||
@@ -261,6 +256,7 @@ def shell#1
|
||||
//
|
||||
// Handle commands.
|
||||
//
|
||||
getpfx(@prefix))
|
||||
repeat
|
||||
if ^cmdptr
|
||||
when toupper(parsecmd(cmdptr))
|
||||
@@ -292,9 +288,7 @@ def shell#1
|
||||
break
|
||||
is '+'
|
||||
*jitcodeptr = jitcbuf
|
||||
//cmdsys:modexec(striptrail(cmdptr))
|
||||
return striptrail(cmdptr)
|
||||
//cmdsys:syswrite(cmdsys.refcons, @textmode, 3)
|
||||
break
|
||||
otherwise
|
||||
puts("?\n")
|
||||
|
||||
@@ -106,7 +106,6 @@ byte uisltstr[] = "ISULT"
|
||||
byte uislestr[] = "ISULE"
|
||||
byte sextstr[] = "SEXT"
|
||||
byte divmodstr[] = "DIVMOD"
|
||||
byte sysmods[] = "" // overlay sys path with exports
|
||||
word exports[] = @sysmodstr, @version
|
||||
word = @sysstr, @syscall
|
||||
word = @callstr, @call
|
||||
@@ -119,6 +118,7 @@ word = @putwstr, @prword
|
||||
word = @getcstr, @cin
|
||||
word = @getsstr, @rdstr
|
||||
word = @toupstr, @toupper
|
||||
byte sysmods[] // overlay sys path with exports
|
||||
word = @hpmarkstr, @markheap
|
||||
word = @hpallocstr,@allocheap
|
||||
word = @hpalignstr,@allocalignheap
|
||||
@@ -1003,7 +1003,7 @@ end
|
||||
//
|
||||
def lookupextern(esd, index)#1
|
||||
word sym, addr
|
||||
byte str[16]
|
||||
byte str[33]
|
||||
sym = lookupidx(esd, index)
|
||||
if sym
|
||||
addr = lookuptbl(sym, symtbl)
|
||||
@@ -1263,7 +1263,7 @@ cmdlnptr = @cmdln
|
||||
// Print PLASMA version
|
||||
//
|
||||
init_cons
|
||||
prstr("PLASMA 2.0 DP3\n")//; putb(version.1); putc('.'); putb(version.0); putln
|
||||
prstr("PLASMA 2.0\n")//; putb(version.1); putc('.'); putb(version.0); putln
|
||||
prstr("MEM:$"); prword(availheap); crout
|
||||
//
|
||||
// Exec command line parser
|
||||
|
||||
@@ -117,7 +117,6 @@ byte uisltstr[] = "ISULT"
|
||||
byte uislestr[] = "ISULE"
|
||||
byte sextstr[] = "SEXT"
|
||||
byte divmodstr[] = "DIVMOD"
|
||||
byte sysmods[] = "" // overlay sys path with exports
|
||||
word exports[] = @sysmodstr, @version
|
||||
word = @sysstr, @syscall
|
||||
word = @callstr, @call
|
||||
@@ -130,6 +129,7 @@ word = @putwstr, @prword
|
||||
word = @getcstr, @cin
|
||||
word = @getsstr, @rdstr
|
||||
word = @toupstr, @toupper
|
||||
byte sysmods[] // overlay sys path with exports
|
||||
word = @hpmarkstr, @markheap
|
||||
word = @hpallocstr,@allocheap
|
||||
word = @hpalignstr,@allocalignheap
|
||||
@@ -1014,7 +1014,7 @@ end
|
||||
//
|
||||
def lookupextern(esd, index)#1
|
||||
word sym, addr
|
||||
byte str[16]
|
||||
byte str[33]
|
||||
sym = lookupidx(esd, index)
|
||||
if sym
|
||||
addr = lookuptbl(sym, symtbl)
|
||||
@@ -1286,7 +1286,7 @@ cmdlnptr = @cmdln
|
||||
// Print PLASMA version
|
||||
//
|
||||
init_cons
|
||||
prstr("PLASMA 2.0 DP3 JITC\n")//; putb(version.1); putc('.'); putb(version.0); putln
|
||||
prstr("PLASMA 2.0 JITC\n")//; putb(version.1); putc('.'); putb(version.0); putln
|
||||
prstr("MEM:$"); prword(availheap); crout
|
||||
//
|
||||
// Exec command line parser
|
||||
|
||||
@@ -712,7 +712,7 @@ end
|
||||
asm cout(c)#0
|
||||
LDA ESTKL,X
|
||||
INX
|
||||
JMP $FFD2
|
||||
JMP $FFD2
|
||||
end
|
||||
asm cin()#1
|
||||
DEX
|
||||
@@ -839,7 +839,7 @@ end
|
||||
//
|
||||
def lookupextern(esd, index)#1
|
||||
word sym, addr
|
||||
byte str[16]
|
||||
byte str[33]
|
||||
while ^esd
|
||||
sym = esd
|
||||
esd = sym + dcitos(sym, @str)
|
||||
|
||||
@@ -509,6 +509,10 @@ void call(uword pc)
|
||||
mem_data[0x1FF] = i;
|
||||
PUSH(0x1FF);
|
||||
break;
|
||||
case 9: // LIBRARY STDLIB::PUTB
|
||||
i = UPOP;
|
||||
printf("%02X", i);
|
||||
break;
|
||||
case 10: // LIBRARY STDLIB::PUTH
|
||||
i = UPOP;
|
||||
printf("%04X", i);
|
||||
|
||||
Reference in New Issue
Block a user