English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 08 July 2013, 09:56   #1
bodhi
Registered User
 
bodhi's Avatar
 
Join Date: Nov 2012
Location: GB
Posts: 32
Latest Win32 VASM Build?

Hi,

Does anyone have or know where I can get a Win32/mot build of the latest VASM 1.6a+? I have a feeling that my version is quite old and I would like to use STRUCTURE definitions, which I think is only available in recent versions (?)

(yes, I attempted my own compile, and failed)
bodhi is offline  
Old 08 July 2013, 12:08   #2
Apollo
Registered User
 
Apollo's Avatar
 
Join Date: Sep 2008
Location: Germany
Age: 49
Posts: 137
I could send you my compiled version. Its
Code:
vasm 1.6b (c) in 2002-2013 Volker Barthelmann
vasm M68k/CPU32/ColdFire cpu backend 1.3e (c) 2002-2013 Frank Wille
vasm motorola syntax module 3.4a (c) 2002-2013 Frank Wille
So, if you want drop me a letter with your email-address.
Apollo is offline  
Old 08 July 2013, 13:50   #3
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
If you or anyone else wish to build the tools on Windows, you can use the Visual C++ command line tools:
Code:
vasm:
md obj_win32
nmake /f makefile.win32 CPU=m68k SYNTAX=mot

vlink:
nmake /f makefile.win32

vbcc:
nmake /f makefile.win32 TARGET=m68k
You can use my attached makefile for vbcc, and when building for cross-compiling you need to specify signed and unsigned __int64 for the 64-bit integer data types. It will auto-detect all other types correctly.
Attached Files
File Type: zip Makefile.zip (2.3 KB, 320 views)
Leffmann is offline  
Old 08 July 2013, 16:43   #4
bodhi
Registered User
 
bodhi's Avatar
 
Join Date: Nov 2012
Location: GB
Posts: 32
Leffmann: Great. Your makefile builds VBCC nicely. And (after a reboot) VASM and VLINK are also compiling. I was messing around with PATH VAR, so that might be why those two were not compiling for me earlier.

One question: The VBCC website doesn't appear to have a direct link to the VBCC sources. The sources I'm using are from this link: http://www.ibaug.de/vbcc/vbcc.tar.gz which I found on some other guy's site. Does anyone know if this is the actual latest source archive for VBCC?

Apollo: thanks also for the offer of help, much appreciated!
bodhi is offline  
Old 08 July 2013, 19:17   #5
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
That "other guy" is actually the main developer of vbcc

I've attached my source archive, it's the one you linked to, but I think I may have applied a patch or two from Frank Wille. Make sure you do a diff on the sources to see what's changed.

I've heard there's an update for vbcc on the way as well, so you may want to check the other guy's website for when that arrives.

Last edited by Leffmann; 02 September 2017 at 11:13.
Leffmann is offline  
Old 15 July 2013, 22:58   #6
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Quote:
Originally Posted by Leffmann View Post
I've heard there's an update for vbcc on the way as well, so you may want to check the other guy's website for when that arrives.
Volker updates the source on his website only rarely. When anybody has a real problem and needs an update to the latest source, then just drop me an email.

For the upcoming 0.9c release there have been some severe modifications in the core and I'm not really convinced that everything is already stable enough again. So at this moment the current source can not really be recommend (Leffmann's archive is ok though - it is old).

Besides numerous bug fixes the new release will improve ColdFire and Atari support.
phx is offline  
Old 26 July 2014, 09:14   #7
dalton
tulou
 
dalton's Avatar
 
Join Date: Jun 2006
Location: Gothenburg / Sweden
Posts: 88
When I try to build v1.7 for win32 using visual c++ 2010 command prompt I get the following error in the link stage:

m68k_mot_expr.o : error LNK2019: unresolved external symbol _strtold referenced
in function _primary_expr

Any ideas?
dalton is offline  
Old 26 July 2014, 12:50   #8
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Sorry, I didn't test that as I have no Windows system available.

Visual C++ never implemented C99 correctly (not even after 15 years?), so I guess that support for "long double" and strtold() is missing?

Vbcc has the same problem, as it only implements a part of C99. You may want to modify tfloat.h, which looks like this:
Code:
/* tfloat.h Floating point type and string conversion function. */
/* (c) 2014 Frank Wille */

#ifdef __VBCC__
typedef double tfloat;
#define strtotfloat(n,e) strtod(n,e)
#else
typedef long double tfloat;
#define strtotfloat(n,e) strtold(n,e)
#endif
For a test you can use the same defines as for vbcc. A final fix might look like this:
Code:
/* tfloat.h Floating point type and string conversion function. */
/* (c) 2014 Frank Wille */

#ifdef __VBCC__
typedef double tfloat;
#define strtotfloat(n,e) strtod(n,e)
#elif defined(__WIN32) && defined(_MSC_VER)
typedef double tfloat;
 #define strtotfloat(n,e) strtod(n,e)
 #else
typedef long double tfloat;
#define strtotfloat(n,e) strtold(n,e)
#endif
But I'm not sure how to correctly identify VC++. Maybe somebody tells me.
phx is offline  
Old 26 July 2014, 12:57   #9
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
strtold() (and lot of other still missing C99 features) were added to MSVC 2013.

long double is alias of double in MSVC. Probably some historic reason as usual..
Toni Wilen is online now  
Old 26 July 2014, 13:02   #10
clenched
Registered User
 
Join Date: Sep 2008
Location: Gainesville U.S.A.
Posts: 771
MinGW always compiles this first time every time without errors or warnings. Typical of phx code, just type the commands and sit back and roll a cigarette.
clenched is offline  
Old 26 July 2014, 13:30   #11
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Quote:
Originally Posted by Toni Wilen View Post
strtold() (and lot of other still missing C99 features) were added to MSVC 2013.
Ah, that's interesting (so it's only 14 years)!

Any idea how I check for a version before MSVC 2013? Which value has _MSC_VER with MSVC 2013?
phx is offline  
Old 26 July 2014, 13:54   #12
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
_MSC_VER is 1800
Toni Wilen is online now  
Old 26 July 2014, 15:24   #13
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Thanks. Next nightly snapshot (pre 1.7a) will have that fixed.
phx is offline  
Old 26 July 2014, 15:36   #14
dalton
tulou
 
dalton's Avatar
 
Join Date: Jun 2006
Location: Gothenburg / Sweden
Posts: 88
It works when I use the define for VBCC, thanks! I should probably install version 2013 though.

I got another missing symbol when compiling with CPU=z80

z80_oldstyle_cpu.o : error LNK2019: unresolved external symbol _snprintf referen
ced in function _eval_instruction

Probably also a function left out of VC++ 2010.
dalton is offline  
Old 26 July 2014, 16:22   #15
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
That's ridiculous. According to the following bug report such an important function is even missing in 2013. Only 2014 implements it correctly.
https://connect.microsoft.com/Visual...al-studio-2013
Maybe you should consider using a real C compiler.

A workaround could be to use the MS-specific _snprintf() instead of snprintf(), i.e. try adding a preceding underscore.

Any suggestions for a clean workaround are welcome.
phx is offline  
Old 26 July 2014, 17:47   #16
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
I used to build things for Windows in Cygwin, and lift out the executable and the required DLLs from Cygwin and dropping them all in the directory I kept all other command line tools. It worked fine for all those times VC++ refused to cooperate.

A small bug report:

I just built 1.7 and noticed that it can't always parse asterisk comments correctly. It fails when you have an instruction with one or more operands, followed by a comment at the end of the line. In all other cases it works fine.

I use semicolon for comments myself, but asterisk comments are everywhere in f.ex. the NDK 3.9, so it could be a problem.
Leffmann is offline  
Old 26 July 2014, 18:45   #17
Lonewolf10
AMOS Extensions Developer
 
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
Quote:
Originally Posted by phx View Post
That's ridiculous.
Yup, but it is a Microsoft product. I started using VBA last year and stopped this year, because of the bugs in VBA kept annoying me.

Recent errors in XP revealed to me (and I'm sure some of you know this already) that it was made using Visual C++. It's not surprising that Microsoft products have so many bugs when the software they use to make new software is already buggy.

Regarding the issues on the thread, I'm no C programmer (of any variety right now) so I'll leave it to the experts
Lonewolf10 is offline  
Old 26 July 2014, 19:09   #18
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
It is not a bug. MSVC is (or has been) officially C89 C-compiler for some reason, probably they think everyone should just use C++ or something.. At least until recently.
Toni Wilen is online now  
Old 26 July 2014, 22:14   #19
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Quote:
Originally Posted by Leffmann View Post
A small bug report:

I just built 1.7 and noticed that it can't always parse asterisk comments correctly. It fails when you have an instruction with one or more operands, followed by a comment at the end of the line. In all other cases it works fine.
You're probably running the Motorola syntax module with -spaces option to allow blanks in the operands? Otherwise I couldn't see any problem.

When you want operands with blanks, then comments introduced by an asterisk are not supported. There is no way to differentiate it from a multiplication operator. For example:
Code:
        clr.l   4 * 2
Is the address 4 or 8?
phx is offline  
Old 27 July 2014, 15:03   #20
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
Yeah you're right. I always use -spaces so I'll just fix the include files instead. Thanks.
Leffmann is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
vasm and word alignment Den Coders. Asm / Hardware 9 07 February 2014 11:25
Help linking VASM object code clenched Coders. Asm / Hardware 2 24 May 2013 22:32
vasm fsincos dalton Coders. Asm / Hardware 4 03 September 2012 10:35
vasm 1.5 RFC phx Coders. General 30 11 December 2010 02:08
Win32 Game Ports? BobRedthorp Retrogaming General Discussion 11 03 August 2003 13:56

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:58.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.25764 seconds with 16 queries