vasm and vlink now have support for the Amstrad CPC
PulkoMandy - 10 September 2011 - 09:36:46
|
633 posts |
|---|---|
| Hello cross-dev people ! I recently switched to vasm for my cross development and I'm quite happy with it. It's highly portable Ansi-C, so it can run anywhere, it has far less bugs than Sjasmplus (in fact I didn't found any bug so far :)). I was missing some of the features from sjasmplus as well as some other, so I contacted Franck Wille and he was very helpful in getting them fixed. The changes are available as source release on vasm and vlink websites as of today. They include : * vlink AMSDOS output module (use -b amsdos option) to add an AMSDOS header to the generated files. The loading address can be defined (-T text 0x8000) as well as the entry point (-b symbol). Note the entry point is defined as a symbol (label), so you don't have to worry about moving your code around. * Banks are supported as sections, with a custom linker script. vlink will output a file for each bank and a file for central memory, if you use them. * vasm "oldstyle" syntax module (the one used for z80) was tweaked a bit too, so if you don't need sections/banks, you don't have to mess with them. Even an ORG is not needed anymore since the linker takes care of putting your code at the right place. Of course vasm still supports things like the INCBIN directive, conditional assembly, macros, and some other useful features. And Franck Wille is quite open to improvements, so if you feel something is missing, it can likely be added. The sourcecode is very clean and easy to follow (those who tried patching sjasmplus know what I'm talking about). Waiting for your reports on this, and feel free to ask in case of problem ! |
|
SyX - 11 September 2011 - 20:05:42
|
62 posts |
|---|---|
| I discovered yesterday the new features (and in the same moment, i though that you were responsible of them ;) ), they are great additions and everything is a bit more natural and clean now. Thanks Pulko! :) There were a few bugs in vasmz80 when i began to use it a few years ago :P, but Frank fixed the bugs that i reported him in a few minutes, but that is not news, he is a great dude from always (i know from the days of his PhxAss in Amiga). And Frank is always very open to suggestions. How Pulko said the sources are very easy to understand... for example, i have sent a fix to the 6502 module (my experience with this CPU is minimal :P), and all the process was very smooth, i discovered the bug, fixed the sources, tested, sent to Frank to review and the same night my bug fix appeared in the daily source snapshot with full credits ;) Pulko, i will test everything this week and tell you if i find something strange ;) PD: I read in WOS that Dominic is going to work in the VBCC z80 code generator, the banks addition is gonna be very helpful. |
|
PulkoMandy - 29 December 2011 - 23:14:06
|
633 posts |
|---|---|
| I just built some Windows binaries here : http://code.google.com/p/cpcsdk/downloads/list | |
krusty - 22 January 2012 - 21:00:47
|
327 posts |
|---|---|
| i have tested tons of cross-assemblers. almost each of my cross-dev productions have been done with a different assembler. vasm is clearly one of the less evolved and powerful BUT it is the ONE every body would have to choose. as it has already been said, code is very well maintained and owners are open to suggestions. so it's weakness could deseaper quickly whereas the bugs of the other assemblers will be always present. novelties of the week will be named macro parameters and assertions with some bugfixes. |
|
PulkoMandy - 28 July 2012 - 09:37:28
|
633 posts |
|---|---|
| I just made a new build of vasm and vlink for Windows. This is the latest nightly version. It has some bugfixes, supports named arguments in macros, assert directive, out-of-place assembling with RORG (for building code that's put in a ROM and copied to RAM for execution). The linker supports AMSDOS file format (with header), can generate a file for each memory bank, and has some extra directives like MIN, MAX, and ASSERT for link-time control of your code size. http://cpcsdk.googlecode.com/files/vtools_20120730.7z |
|
Targhan - 19 August 2012 - 00:45:09
|
238 posts |
|---|---|
| Tested it quickly (thanks Pulko for the Windows build), but I'm not satisfied right now, for these (very simple) quirks, which someone can probably help avoid: - I can't use the good old '#" hexa symbol. - How to produce a simple text file including all the symbols? SJasmPlus did that with a simple --sym option and would produce something like: label1: 0x000010 label2: 0x000015 ... Thanks. |
|
krusty - 19 August 2012 - 09:46:33
|
327 posts |
|---|---|
| I need such kind of things too. As vasm does not do that, I have written a python script which takes as input the output of a vasm build with the option -Ftest and produce a list of labels The script is here https://github.com/rgiot/pycpcdemotools/blob/master/cpcdemotools/source_checker/vasm_symbols.py Even with this problem, vasm is better to use than sjasmplus when you code a big project |
|
PulkoMandy - 26 August 2012 - 23:01:10
|
633 posts |
|---|---|
| The list of symbols is included in the listing file that you get by assembling with "-L listing.txt" option. There could be more control on the output, however (like, not showing the assembled code...) Anyway, what I do is using vlink for linking the code together. vlink has the -M option that is closer to the need (it shows both symbols and sections). To use vlink in a simple way, you need to do the following: * Assemble your source file(s) in vobj format. * Then, use vlink to link the vobj file(s) to an ASMDOS binary. This is much more powerful than a classical assembler, for example : * The vobj file is relocatable. This means youcan for example compile the source of the Starkos player once as a vobj file, and it is relocated at link time to any address. No need for a relocator anymore ! * Makes it easy to work with multiple source files that do different things, and lay them out in memory (vlink was modified to also support banks, a file named OUTPUT.C6, C7, ... will be created for each bank) * vlink manages the AMSDOS format with appropriate header. No need for hideur maikeur or similar tools anymore. the # is 'reserved' for custom-base numbers in vasm. For example, 16#42 means 0x42, 10#42 means 42, 5#42 means "42 in base 5", and so on. I'm not sure the code can be patched easily to accept #xxx as base 16 by default, I'll have a look. |
|
PulkoMandy - 28 August 2012 - 18:20:51
|
633 posts |
|---|---|
| Ok, some good news from Frank: * # will be accepted for hexadecimal numbers * NOLIST and LIST directives will be added, like in Maxam. So you can put NOLIST at the start of your code, use -L option, and get only the symbol table. You will have to wait an extra day so I can get the latest source snapshot and build a windows version. |
|
krusty - 28 August 2012 - 22:32:37
|
327 posts |
|---|---|
| A "incbin" command with the possibility to read at the nth position would be cool in order to not include amsdos headers. | |
PulkoMandy - 29 August 2012 - 18:26:43
|
633 posts |
|---|---|
| Here is the new build for windows: http://cpcsdk.googlecode.com/files/vasm_20120829.7z (for linux, compile it yourself from the sourcecode, of course) http://sun.hasenbraten.de/vasm/daily/vasm.tar.gz |
|
TotO - 30 August 2012 - 09:17:04
|
127 posts |
|---|---|
| ".7z" archive for a Windows build. Geeks are great. ;) |
|
PulkoMandy - 30 August 2012 - 20:56:13
|
633 posts |
|---|---|
| well, it's often 25% better than zip, why shouldn't I use it ? | |
TotO - 31 August 2012 - 10:33:07
|
127 posts |
|---|---|
| Because your file is intended to be downloaded by Windows users, not you? Because 25% of 600KB if not signifitative on a GB storage? Because that requires the user to download an extra software just for it? Because you make a nice .tar.gz for Linux users? :D It's just my final user point of view. In all case, you make a great job. I may suppose that programmer love to download .7z files to... ;) |
|
Beb - 31 August 2012 - 13:33:03
|
168 posts |
|---|---|
| @Toto : You have to update your mind, 7Zip is better in every way. It's powerfull, free, can crunch and decrunch many other format (including ISO) And we use it at work both on unix and/or windows. :) |
|
TotO - 31 August 2012 - 14:19:28
|
127 posts |
|---|---|
| @Beb: Understand that better is different than useful. My mind is updated, and it's why I no more use 7zip since 5+ years. ;) |
|
PulkoMandy - 31 August 2012 - 18:03:20
|
633 posts |
|---|---|
| well... I try to help windows users with vasm and vlink even if I don't use windows myself. I do the same for Reloaded. It's using up some of my spare time I could use on working on amstrad demos, games or hardware. And what do I get ? Complains on the packing format used ? How does that help ? No, I'm not switching back to zip. 7zip is free and I consider it a requirement on any windows install. If you don't like my way, well, build vasm yourself ? I could have done a tar.gz, or a tar.xz file. 7zip is the standard on windows for me. Live with it or do it your own way. And no, I'm not going to give multiple download options in different formats, because that's stupid. 25% of 600K is almost the amount you can store on a 3" disk. With the attitude of not bothering about that, we get bloated software on PC, which is bigger and slower. Because 150K here doesn't matter, 150 other there doesn't matter either. Remember the philosophy behind the Amstrad OSes writer: "a byte is a byte". And it's a way of thinking, that I apply both to my amstrad and other computer software, with different ways of course, but with the same goal. Please give me constructive criticism on the tools itself instead... |
|
CloudStrife - 31 August 2012 - 19:13:14
|
161 posts |
|---|---|
| (and you like to d/l 150ko less when your are on a GPRS network...) | |
TotO - 02 September 2012 - 22:02:40
|
127 posts |
|---|---|
| @ PulkoMandy: Feedbacks about the content? It's a joke? (I can't unpack it) Please, avoid to compare the "philosophy" behind a 25+ years old computer with Windows. It's not credible. Finally, don't waste your time by answering to "complains", it's off topic and you have better to do. Me too. @CloudStrike: I'm using a EDGE network since 3 months, and I don't want to waste my bandwidth by downloading extra programs that I don't need with standard files. I'm sure that you may understand if you get a GPRS network. |
|
PulkoMandy - 03 September 2012 - 17:46:05
|
633 posts |
|---|---|
| This conversation is moving towards 125K of text quite fast... 7zip is only 1MB big. You will get your bytes back after 8 vasm versions, or even faster if you also download and use Reloaded, or any software packaged with 7zip. As for the philosophy, well, it's mine, whatever the computer. You can disagree, that doesn't change anything about it unless you have good arguments. That's how I like to write software, and that's how I like software that I use to be written. Of course, the constraints are different on modern computers, but there are some easy ways to not waste space, and I take care. |
|
TotO - 04 September 2012 - 11:33:48
|
127 posts |
|---|---|
| When you share something, you have to think about users and not your self-centredness. It's may be why you make a "tar.gz" for Linux users like you, instead of a "7z" too... In close to 10+ years, "7z" was never came a standard. I'll definitively not install extra-programs on my computer for managing unpopular file format. It's a way to preserve space and fiability too. But no worry, you make a great work. Don't take it like an offense, but just like I said, a "user point of view". ;) |
|
rexbeng - 04 September 2012 - 13:12:26
|
132 posts |
|---|---|
| Boys, stop! :P rb |
|
CloudStrife - 04 September 2012 - 14:13:52
|
161 posts |
|---|---|
| TotO: well .tar.xz start to become common, and it's include in coreutils... (.xz it's version of 7z without archiving capacity, .tar work very well for that ;)) (and the difference between LZMA and Bzip2 it's a lot more lower than between zip and bzip2...) (and it's funny because a lot of thing on cpc scene are distribute in this fucking not open file format called .rar and no body really complains...) |
|
TotO - 04 September 2012 - 14:49:17
|
127 posts |
|---|---|
CloudStrife - 04 September 2012 - 15:22:48
|
161 posts |
|---|---|
| I speak of _XZ_ not _GZ_ | |
TotO - 04 September 2012 - 16:39:10
|
127 posts |
|---|---|
| Sure. Sorry. |
|
Grim - 04 September 2012 - 17:10:06
|
521 posts |
|---|---|
| Pony pictures wanted now. | |
PulkoMandy - 04 September 2012 - 18:03:53
|
633 posts |
|---|---|
| I did not use tar.gz. The ones on cpcsdk were added by Krusty. I let linux people use svn to get the source and try to build stuff themselves. But I take note, if I ever have to make a linux archive I'll use tar.xz. | |
Grim - 04 September 2012 - 23:10:33
|
521 posts |
|---|---|
![]() |
|
TotO - 05 September 2012 - 16:13:59
|
127 posts |
|---|---|
| Why are you using .jpeg instead of .png for 256 color pictures? (ok... sorry... I'm far away) |
|
Online: MaV
Secret England




