+jedimatt42 Posted January 18, 2020 Share Posted January 18, 2020 21 minutes ago, retroclouds said: I have been thinking of using xdt99 as backend assembler in my TiVi editor. Could do some cool stuff, like assemble, halt on error and jump to the corresponding source code line. I prefer to integrate TIPI like a set of devices, not an co-processor. But, as I said.. 'Technically'... Thankfully nobody has the interest and imagination and skill in the necessary combination to have abused it in that way yet. -M@ 2 Quote Link to comment Share on other sites More sharing options...
InfiniteTape Posted January 18, 2020 Share Posted January 18, 2020 On 1/17/2020 at 6:28 AM, ralphb said: But xdt99 and core Python is less than 5 MB combined, so creating a 1 GB image just to have xdt99 seems a little wasteful. I get your point, however, and I'll think about easing installation. Wrapping up xdt99 into a packaging tool should be pretty straightforward. On Debian variants like Raspbian, you'd go for the .deb format and use apt to install it. On Mac, you could use Homebrew. In both cases, you'd provide a dependency spec to pull in the version of Python needed if it isn't already present. But as Matt mentioned, installing that package onto a TIPI would likely break things in a way that would make it tough to troubleshoot. Quote Link to comment Share on other sites More sharing options...
+9640News Posted January 18, 2020 Share Posted January 18, 2020 1 hour ago, InfiniteTape said: But as Matt mentioned, installing that package onto a TIPI would likely break things in a way that would make it tough to troubleshoot. Separate SD cards it will be for me. Beery Quote Link to comment Share on other sites More sharing options...
InfiniteTape Posted January 18, 2020 Share Posted January 18, 2020 3 hours ago, InfiniteTape said: Wrapping up xdt99 into a packaging tool should be pretty straightforward. On Debian variants like Raspbian, you'd go for the .deb format and use apt to install it. On Mac, you could use Homebrew. In both cases, you'd provide a dependency spec to pull in the version of Python needed if it isn't already present. I poked around at this and determined that pip is a probably better way to distribute, since it's just Python script. Here's the setup.py script I used as a proof of concept: import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name='xdt99', version='2.0.1', scripts=['xas99.py','xbas99.py','xda99.py','xdg99.py','xdm99.py','xga99.py','xhm99.py','xvm99.py'] , author="Ralph Benzinger", author_email="r@0x01.de", description="TI 99 Cross-Development Tools", long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/endlos99/xdt99", packages=setuptools.find_packages(), classifiers=[ "Programming Language :: Python :: 2.7", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Operating System :: OS Independent", ], ) 1 Quote Link to comment Share on other sites More sharing options...
ralphb Posted January 30, 2020 Author Share Posted January 30, 2020 I'm in the process of adding the 9995 instructions MPYS, DIVS, LST, and LWP to xas99. Reading the 9995 datasheet, however, I'm at a loss what the second arguments for MPYS and DIVS are -- if there are any. The description might be interpreted that the destination is always R0 (and R1). Is that correct? (That would be an unusually restrictive design, but I guess they ran out of short opcodes.) Once I updated the documentation, I can release xas99, xga99, and xbas99. ? Quote Link to comment Share on other sites More sharing options...
+mizapf Posted January 30, 2020 Share Posted January 30, 2020 Yes. The instruction format for both is op-10, Ts-2, S-4. MPYS: (R0,R1) = R0 * S DIVS: R0 = (R0,R1)/S, R1 = (R0,R1)%S. Quote Link to comment Share on other sites More sharing options...
ralphb Posted February 8, 2020 Author Share Posted February 8, 2020 On 1/10/2020 at 11:51 PM, matthew180 said: 1. The Pixel instruction is called PIX (not PIC) and is a re-purposing of the XOP instruction (you probably know that). Oh, but then my description of "PIX <gas>, <gad>" is not correct either. Instead of <gad>, should it be <wa> or <imm>? Also, it has just occurred to me that we finally found a use for DXOP (which is supported by xas99)! ? Quote Link to comment Share on other sites More sharing options...
Asmusr Posted February 14, 2020 Share Posted February 14, 2020 I'm getting this warning each time I run the assembler because I use Magellan to generate my graphics, and that produces a label for every pattern or color. Would it be possible add a flag to suppress the warning? Warning: Unreferenced constants: COL1 COL10 COL100 COL101 COL102 COL103 COL104 COL105 COL106 COL107 COL108 COL109 COL11 COL110 COL111 COL112 COL113 COL114 COL115 COL116 COL117 COL118 COL119 COL12 COL120 COL121 COL122 COL123 COL124 COL125 COL126 COL127 COL128 COL129 COL13 COL130 COL131 COL132 COL133 COL134 COL135 COL136 COL137 COL138 COL139 COL14 COL140 COL141 COL142 COL143 COL144 COL145 COL146 COL147 COL148 COL149 CO L15 COL150 COL151 COL152 COL153 COL154 COL155 COL156 COL157 COL158 COL159 COL16 COL160 COL161 COL162 COL163 COL164 COL165 COL166 COL167 COL168 COL169 COL17 COL170 COL18 COL19 COL2 COL20 COL21 COL22 COL23 COL24 COL25 COL26 COL27 COL28 COL29 COL3 COL30 COL31 COL32 COL33 COL34 COL35 COL36 COL37 COL38 COL39 COL4 COL40 COL41 COL42 COL43 COL44 COL45 COL46 COL47 COL48 COL49 COL5 COL50 COL51 COL52 COL53 COL54 COL55 COL56 COL 57 COL58 COL59 COL6 COL60 COL61 COL62 COL63 COL64 COL65 COL66 COL67 COL68 COL69 COL7 COL70 COL71 COL72 COL73 COL74 COL75 COL76 COL77 COL78 COL79 COL8 COL80 COL81 COL82 COL83 COL84 COL85 COL86 COL87 COL88 COL89 COL9 COL90 COL91 COL92 COL93 COL94 COL95 COL96 COL97 COL98 COL99 FCOL129 FCOL130 FCOL131 FCOL132 FCOL133 FCOL134 FCOL135 FCOL136 FCOL137 FCOL138 FCOL139 FCOL140 FCOL141 FCOL142 FCOL143 FCOL144 FCOL145 FCOL146 F COL147 FCOL148 FCOL149 FCOL150 FCOL151 FCOL152 FCOL153 FCOL154 FCOL155 FCOL156 FCOL157 FCOL158 FCOL159 FCOL160 FCOL161 FCOL162 FCOL163 FCOL164 FCOL165 FCOL166 FCOL167 FCOL168 FCOL169 FCOL170 FCOL171 FCOL172 FCO L173 FCOL174 FCOL175 FCOL176 FCOL177 FCOL178 FCOL179 FCOL180 FCOL181 FCOL182 FCOL183 FCOL184 FCOL185 FCOL186 FCOL187 FCOL188 FCOL189 FCOL190 FCOL191 FCOL192 FCOL193 FCOL194 FCOL195 FCOL196 FCOL197 FCOL198 FCOL1 99 FCOL200 FCOL201 FCOL202 FCOL203 FCOL204 FCOL205 FCOL206 FCOL207 FCOL208 FCOL209 FCOL210 FCOL211 FCOL212 FCOL213 FCOL214 FCOL215 FCOL216 FCOL217 FCOL218 FCOL219 FCOL220 FCOL221 FCOL222 FCOL223 FCOL224 FCOL225 FCOL226 FCOL227 FCOL228 FCOL229 FCOL230 FCOL231 FCOL232 FCOL233 FCOL234 FCOL235 FCOL236 FCOL237 FCOL238 FCOL239 FCOL240 FCOL241 FCOL242 FCOL243 FCOL244 FCOL245 FCOL246 FPAT129 FPAT130 FPAT131 FPAT132 FPAT133 F PAT134 FPAT135 FPAT136 FPAT137 FPAT138 FPAT139 FPAT140 FPAT141 FPAT142 FPAT143 FPAT144 FPAT145 FPAT146 FPAT147 FPAT148 FPAT149 FPAT150 FPAT151 FPAT152 FPAT153 FPAT154 FPAT155 FPAT156 FPAT157 FPAT158 FPAT159 FPA T160 FPAT161 FPAT162 FPAT163 FPAT164 FPAT165 FPAT166 FPAT167 FPAT168 FPAT169 FPAT170 FPAT171 FPAT172 FPAT173 FPAT174 FPAT175 FPAT176 FPAT177 FPAT178 FPAT179 FPAT180 FPAT181 FPAT182 FPAT183 FPAT184 FPAT185 FPAT1 86 FPAT187 FPAT188 FPAT189 FPAT190 FPAT191 FPAT192 FPAT193 FPAT194 FPAT195 FPAT196 FPAT197 FPAT198 FPAT199 FPAT200 FPAT201 FPAT202 FPAT203 FPAT204 FPAT205 FPAT206 FPAT207 FPAT208 FPAT209 FPAT210 FPAT211 FPAT212 FPAT213 FPAT214 FPAT215 FPAT216 FPAT217 FPAT218 FPAT219 FPAT220 FPAT221 FPAT222 FPAT223 FPAT224 FPAT225 FPAT226 FPAT227 FPAT228 FPAT229 FPAT230 FPAT231 FPAT232 FPAT233 FPAT234 FPAT235 FPAT236 FPAT237 FPAT238 F PAT239 FPAT240 FPAT241 FPAT242 FPAT243 FPAT244 FPAT245 FPAT246 MC0 MCOUNT MS0 PAT1 PAT10 PAT100 PAT101 PAT102 PAT103 PAT104 PAT105 PAT106 PAT107 PAT108 PAT109 PAT11 PAT110 PAT111 PAT112 PAT113 PAT114 PAT115 PAT 116 PAT117 PAT118 PAT119 PAT12 PAT120 PAT121 PAT122 PAT123 PAT124 PAT125 PAT126 PAT127 PAT128 PAT129 PAT13 PAT130 PAT131 PAT132 PAT133 PAT134 PAT135 PAT136 PAT137 PAT138 PAT139 PAT14 PAT140 PAT141 PAT142 PAT143 PAT144 PAT145 PAT146 PAT147 PAT148 PAT149 PAT15 PAT150 PAT151 PAT152 PAT153 PAT154 PAT155 PAT156 PAT157 PAT158 PAT159 PAT16 PAT160 PAT161 PAT162 PAT163 PAT164 PAT165 PAT166 PAT167 PAT168 PAT169 PAT17 PAT170 PA T18 PAT19 PAT2 PAT20 PAT21 PAT22 PAT23 PAT24 PAT25 PAT26 PAT27 PAT28 PAT29 PAT3 PAT30 PAT31 PAT32 PAT33 PAT34 PAT35 PAT36 PAT37 PAT38 PAT39 PAT4 PAT40 PAT41 PAT42 PAT43 PAT44 PAT45 PAT46 PAT47 PAT48 PAT49 PAT5 PAT50 PAT51 PAT52 PAT53 PAT54 PAT55 PAT56 PAT57 PAT58 PAT59 PAT6 PAT60 PAT61 PAT62 PAT63 PAT64 PAT65 PAT66 PAT67 PAT68 PAT69 PAT7 PAT70 PAT71 PAT72 PAT73 PAT74 PAT75 PAT76 PAT77 PAT78 PAT79 PAT8 PAT80 PAT81 PAT 82 PAT83 PAT84 PAT85 PAT86 PAT87 PAT88 PAT89 PAT9 PAT90 PAT91 PAT92 PAT93 PAT94 PAT95 PAT96 PAT97 PAT98 PAT99 SPR1 SPR10 SPR11 SPR2 SPR3 SPR4 SPR5 SPR6 SPR7 SPR8 SPR9 1 Quote Link to comment Share on other sites More sharing options...
ralphb Posted February 15, 2020 Author Share Posted February 15, 2020 From the top of my head, try adding -w. In the new version, this will be -q for quiet. 1 Quote Link to comment Share on other sites More sharing options...
ralphb Posted February 15, 2020 Author Share Posted February 15, 2020 The problem with -w/-q is that it disables all warnings. Would it help if I limit the output for unused constants to, say, 10 symbols and then "(more)"? Quote Link to comment Share on other sites More sharing options...
Asmusr Posted February 15, 2020 Share Posted February 15, 2020 6 minutes ago, ralphb said: The problem with -w/-q is that it disables all warnings. Would it help if I limit the output for unused constants to, say, 10 symbols and then "(more)"? Yes that would work for me. The problem with the long warning is that I wouldn't notice any other warnings. ? Quote Link to comment Share on other sites More sharing options...
ralphb Posted March 29, 2020 Author Share Posted March 29, 2020 I've released a new version of xdt99, ported to Python 3. Please uninstall Python 2 before installing Python 3. You require version 3.6 or higher. Major new features are the linker and support for TMS9995 for xas99, label-based programs for xbas99, and syntax selection for xdg99. Please see the release notes for some incompatible changes. I also revised and extended the Tutorial and the Windows Guide. I recommend both guides to all beginners and intermediate users as well as all developers who have shied away from the command line so far. As usual, please post errors or requests here, or over at the project's bug tracker (requires GitHub user). Happy developing! ? 5 4 Quote Link to comment Share on other sites More sharing options...
Asmusr Posted April 3, 2020 Share Posted April 3, 2020 I have a request. In the IntelliJ IDEA plugin, if you type, for instance mov @ and ask for suggestions (ctrl-space), nothing comes up, but once you add a comma after the @ (and move the cursor back before the comma) the suggestions work fine. Is there any easy fix for that? I try to do this (and fail) every time I work with my source code, so it would be a real time saver if this could be fixed. P.S. One of these days I should make a video that shows how easy it is to use IntelliJ IDEA for editing assembly source compared to, e.g., Notepad++ that don't have any of the features for suggesting, renaming etc. 2 Quote Link to comment Share on other sites More sharing options...
ralphb Posted April 4, 2020 Author Share Posted April 4, 2020 To be honest, both plugins need some work. I noticed that the Emacs mode has problems resolving symbols, possibly because I never added colon labels to it. The IntelliJ plugin needs to updated for the latest version as well, and also to include recent changes. Which IDEA version are you using? Oh, and a video would be awesome! I hate making videos. ? Quote Link to comment Share on other sites More sharing options...
Asmusr Posted April 4, 2020 Share Posted April 4, 2020 (edited) 4 hours ago, ralphb said: Which IDEA version are you using? The very latest, 2020.1 early access. But your plugin has worked fine for many years, so it doesn't seems like they change that API often. Edited April 4, 2020 by Asmusr Quote Link to comment Share on other sites More sharing options...
+adamantyr Posted April 4, 2020 Share Posted April 4, 2020 Finally, Python 3! Unfortunately my first attempt to compile one of my modules failed with an unhelpful error message. raise AsmError(f'Invalid symbol name {name}') SyntaxError: invalid syntax I'm using Python 3.6.5. Quote Link to comment Share on other sites More sharing options...
ralphb Posted April 5, 2020 Author Share Posted April 5, 2020 (edited) If this is a stack trace, could you please post the entire stack? And if it's regular error, could also post the erroneous line, please? Edit: Even better, could you perhaps PM me the file with the error? Edited April 5, 2020 by ralphb Update Quote Link to comment Share on other sites More sharing options...
Gip-Gip Posted April 18, 2020 Share Posted April 18, 2020 I've had trouble assembling one of my projects, xas99 lists every line with an opcode as a syntax error I'm feeding it this in the commandline(I removed the .py extension and linked it in /usr/bin): xas99 -b -s vepseu.a99 -o vepseu.bin The code works with WinASM99 but not with xas99, any clue what it could be? Quote Link to comment Share on other sites More sharing options...
PeteE Posted April 19, 2020 Share Posted April 19, 2020 6 hours ago, Gip-Gip said: I've had trouble assembling one of my projects, xas99 lists every line with an opcode as a syntax error I'm feeding it this in the commandline(I removed the .py extension and linked it in /usr/bin): xas99 -b -s vepseu.a99 -o vepseu.bin The code works with WinASM99 but not with xas99, any clue what it could be? Are you using the R0,R1,... syntax instead of just numbers for registers? Try adding the -R option (aka --register-symbols) 1 Quote Link to comment Share on other sites More sharing options...
Gip-Gip Posted April 19, 2020 Share Posted April 19, 2020 13 hours ago, PeteE said: Are you using the R0,R1,... syntax instead of just numbers for registers? Try adding the -R option (aka --register-symbols) I actually define my own registers, it's kinda weird but I use specific registers for specific things and I think it improves code readability. that and it also flags BYTE operands attached is the error log and assembly files vepseu.a99 errors.txt Quote Link to comment Share on other sites More sharing options...
ralphb Posted April 19, 2020 Author Share Posted April 19, 2020 (edited) Ah, the cause of the error is the use of the strict option -s, but using relaxed notation with spaces between operands and expressions: MOVB A5, @VCOMM * 22 cycles Strict mode implies the syntax of the Editor/Assembler, which this is not. Unfortunately, you also cannot drop the strict option, as your comments (1) are introduced by * instead of ; and (2) are awfully close to the instructions. xas99 expects at least two spaces between the end of operands and the start of the comment field (EDIT: or the use of ; instead). As a fix, I would try to search & replace all *'s by ;'s, and then assembly without strict mode. Of course you have to take care of not replacing actual multiplications, e.g., by replacing those manually by # first, and then undo that. Edited April 19, 2020 by ralphb 2 Quote Link to comment Share on other sites More sharing options...
ralphb Posted April 20, 2020 Author Share Posted April 20, 2020 14 hours ago, ralphb said: As a fix, I would try to search & replace all *'s by ;'s, and then assembly without strict mode. Of course you have to take care of not replacing actual multiplications, e.g., by replacing those manually by # first, and then undo that. Last night an even simpler fix occurred to me: You could simply replace ",<space>" by "," to obtain strict code you can assemble with '-s'. No precautions necessary! 2 Quote Link to comment Share on other sites More sharing options...
mr_gw454 Posted April 27, 2020 Share Posted April 27, 2020 Hi ralphb, I see that python3 is now required for your tools. For many Linux users, python version 2 is the system default and is usually required to stay that way because of underlying system requirements (at least on my Linux Mint 19.3 workstation). In order to use your tools, it looks like I need to specifically call them using 'python3 <full path to script> otherwise it will default to using python2 and fail. For example: ron@d7577:~/source/xdt99$ ./xas99.py File "./xas99.py", line 839 raise AsmError(f'Invalid symbol name {name}') ^ SyntaxError: invalid syntax ron@d7577:~/source/xdt99$ python3 /usr/local/bin/xas99.py usage: xas99.py [-h] [-b | -i | -c | -t [<format>] | --embed-xb] [-l <file> [<file> ...] | -ll <file> [<file> ...]] [-5] [-18] [-s] [-n <name>] [-R] [-C] [-L <file>] [-S] [-E <file>] [-q] [-a <addr>] [-I <paths>] [-D <sym=val> [<sym=val> ...]] [-o <file>] [<source> [<source> ...]] xas99.py: error: One of <source> or -l/-ll is required. I guess I could also edit each of your scripts to add #!/usr/bin/python3, but is there a better/preferred way to force your scripts to use python3? Thank you for any help you can provide! Quote Link to comment Share on other sites More sharing options...
+mizapf Posted April 27, 2020 Share Posted April 27, 2020 I can confirm that openSUSE Tumbleweed uses a symlink /usr/bin/python -> python2.7. Quote Link to comment Share on other sites More sharing options...
ralphb Posted April 27, 2020 Author Share Posted April 27, 2020 That really depends on your distribution. On Debian-based distributions, you can choose which Python version to start by running update-alternatives --config python For other distributions, you could edit the first line of each program (recommended), as you suggested, or create an alias python=python3 (which will not work for xhm99/xvm99). And you can still use the old version of xdt99 by selecting "python2" in the branch selector on GitHub, or downloading an old release. Please note that Python 2 has been out of maintenance since the beginning of this year. Ubuntu 20.04 doesn't even ship Python 2 any more. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.