19 June 2018, 15:26 | #1 |
Registered User
Join Date: May 2017
Location: Belgium
Age: 50
Posts: 334
|
Assembling Photon's tutorials using vasm
I'm trying to assemble tutorial22 by Photon. I'm doing this on win10, using the lastest vasm (1.8c). The code file in the attached archive is almost identical to the one written by Photon himself.
If I assemble this on the Amiga (well, AmigaForever) using AsmOne 1.48, everything works as expected. I get an executable file of 17600 bytes. If I use vasm 1.8c to assemble this (make file included in attached archive), I get a file that is much bigger, ie 72223 bytes. One of the reasons for this seems to be that the BSS section is included in the executable. But even worse: my executable file is not executable! Even after I do a "protect mytut22.exe RWED", it still says my file is not executable. So I have 2 questions: 1. how do I make the file executable? 2. how do I minimise the executable's size? TIA! |
19 June 2018, 15:28 | #2 | |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,959
|
Quote:
Last edited by Don_Adan; 19 June 2018 at 15:36. |
|
19 June 2018, 16:05 | #3 | |
Registered User
Join Date: May 2017
Location: Belgium
Age: 50
Posts: 334
|
Quote:
FYI, here's the output from vasm: Code:
F:\Amiga\dev\asmskool\mytut22>make -f mytut22.make vasmm68k_mot.exe -o mytut22.exe mytut22.S vasm 1.8c (c) in 2002-2018 Volker Barthelmann vasm M68k/CPU32/ColdFire cpu backend 2.3b (c) 2002-2017 Frank Wille vasm motorola syntax module 3.11c (c) 2002-2018 Frank Wille vasm test output module 1.0 (c) 2002 Volker Barthelmann TutDemo(acrx2): 881 bytes TutData(adrw1): 16504 bytes TutBSS(aurw1): 33792 bytes dir mytut22* Volume in drive F is DataSSD Volume Serial Number is C6A4-7A59 Directory of F:\Amiga\dev\asmskool\mytut22 19/06/2018 15:16 72 223 mytut22.exe 19/06/2018 14:41 157 mytut22.make 19/06/2018 14:44 8 276 mytut22.S 3 File(s) 80 656 bytes 0 Dir(s) 827 977 826 304 bytes free |
|
19 June 2018, 16:10 | #4 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
The 72223 byte file in the archive is a listing, not an executable. Try looking at it with a text viewer.
|
19 June 2018, 16:11 | #5 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
It's not a listing, it's an object file. Specify
-Fhunkexe -kick1hunksto produce a KS 1.2 compatible executable. |
19 June 2018, 16:16 | #6 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
This file contains text. AmigaOS object files are not text.
|
19 June 2018, 16:20 | #7 | |
Registered User
Join Date: May 2017
Location: Belgium
Age: 50
Posts: 334
|
Quote:
I still have a lot to learn, obviously, but I'm getting there, step by little step.. |
|
19 June 2018, 16:39 | #8 | |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Quote:
Vasm supports many types of output formats, not just AmigaDOS object files. To produce a listing you use the -L option, and what you have there is the output from the default Test module, which seems to contain everything needed to produce an executable, but since it's text I guess it's not wrong to call it a listing. Last edited by Leffmann; 19 June 2018 at 16:45. |
|
20 June 2018, 13:02 | #9 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
Just look at the last line. The default output format is "test", not AmigaOS hunk-format executable.
|
20 June 2018, 13:08 | #10 |
Registered User
Join Date: May 2017
Location: Belgium
Age: 50
Posts: 334
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
VASM wrong assembling? | deadwood | Coders. Asm / Hardware | 32 | 01 January 2015 23:25 |
Assembling Gravity Force 2 source code | absence | Coders. General | 5 | 13 May 2012 11:44 |
Photon's A1700 | Photon | Hardware mods | 43 | 25 December 2011 15:30 |
[REQ:ASM] Assembling and running | jman | Coders. Tutorials | 9 | 07 May 2011 18:39 |
Devpac and assembling for absolute addresses | h0ffman | Coders. General | 10 | 21 March 2011 19:12 |
|
|