It is currently Tue Sep 17, 2019 1:41 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu Jan 17, 2019 1:31 am 
Offline
User avatar

Joined: Fri Mar 16, 2018 1:52 pm
Posts: 97
Location: Finland
According to asm6's readme, the command (run from a .bat file?) the command should be formatted as:

Code:
asm6 [-options] sourcefile [outputfile] [listfile]


The command I'm using:

Code:
asm6 main.asm main.bin main.lst


This however only outputs the list file. I didn't see a -option that lets you keep the window open to see if there were any problems either, so i can't know what is wrong.

This is a very unfortunate problem with a lot of assemblers that they don't have a very comprehensible manual for beginners if they have one at all.


Top
 Profile  
 
PostPosted: Thu Jan 17, 2019 1:40 am 
Offline
User avatar

Joined: Sun Dec 12, 2010 10:27 pm
Posts: 352
Location: Hong Kong
Hmmm. Instead of clicking directly the batch file from a GUI of the O/S, just launch a command/console window, move to the appropriate folder and run the batch file there?


Top
 Profile  
 
PostPosted: Thu Jan 17, 2019 6:00 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 21591
Location: NE Indiana, USA (NTSC)
I'm guessing that assembler authors doubt that it's the job of every assembler author to teach every beginner the basics of using every operating system's command prompt. A tutorial for (say) Linux might not apply perfectly to Windows.

Practical options:

  1. Put pause on its own line at the end of the batch file.
  2. Find a tutorial for Command Prompt or PowerShell elsewhere. (Try DuckDuckGo or some other general web search engine.) Then run the batch file from within an already open prompt, as Gilbert mentioned.
  3. Run the batch file from within a text editor or integrated development environment (IDE) that can launch external programs, collect their output and error output, and display it in a window. One example is the "External Tools" plug-in for Gedit. Another is NppExec for Notepad++.

_________________
Pin Eight | Twitter | GitHub | Patreon


Top
 Profile  
 
PostPosted: Thu Jan 17, 2019 8:33 am 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 11412
Location: Rio de Janeiro - Brazil
SusiKette wrote:
Code:
asm6 main.asm main.bin main.lst


This however only outputs the list file.

You probably have to request the creation of the list file using the appropriate option for this to work as intended:

Code:
asm6 -l main.asm main.bin main.lst


Quote:
I didn't see a -option that lets you keep the window open to see if there were any problems either, so i can't know what is wrong.

Keeping the window open is not a job for the assembler. Windows will invariably close the command line window after all commands in a .bat file have been executed. To keep the window open, put a "pause" command at the end of your .bat file.

Quote:
This is a very unfortunate problem with a lot of assemblers that they don't have a very comprehensible manual for beginners if they have one at all.

What you want is a tutorial, not a comprehensible manual, and that's generally beyond the scope of what the creator of a program is expected to deliver.

How to use command line applications is its own topic, and it's generally assumed that people involved with programming have a notion of how that works, but if you don't, you can research that topic separately.


Top
 Profile  
 
PostPosted: Thu Jan 17, 2019 11:11 am 
Offline

Joined: Tue May 28, 2013 5:49 am
Posts: 1187
Location: Hokkaido, Japan
ASM6 at least has a proper manual which can't be said about NESASM for example. When I started out I didn't understand half of it though so I learned from looking at other people's projects.

I also recommend to use NppExec if you use Notepad++ in Windows.
Just make a new NppExec script "Run build.bat" (or whatever you like):
Code:
NPP_SAVE
cd "$(CURRENT_DIRECTORY)"
cmd /c build.bat
This script saves the project and runs the batch file "build.bat" (or change to whatever you call it) at a hit on F6. Super quick assembling and works for everything you use a batch file to assemble or compile for.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group