Jump to content
IGNORED

How do I use DASM on Linux?


Recommended Posts

4 minutes ago, Karl G said:

It should be the same. Could you pot what you tried, and any messages from the attempt? 

No, I couldn't, because to be fair I don't even know where to start, I have no idea how to poke the assembler with the terminal. I did pull it off on windows some time ago, but I now that I think about it, I'm not sure what I did back then either. 

dasm kernel.asm -lkernel.txt -f3 -v5 -okernel.bin

This command, found in the assembly tutorials by Mr. random terrain, surely doesn't do anything when I casually type it in the terminal, even when I'm in the same folder as the assembler. "dasm is not a command". I think it worked when I was using the CMD on windows, but I'm not even sure it is what I tried, it was some time ago. 

 

So basically, I have no Idea what I'm doing. Can you start me from scratch or point me to a tutorial? Google didn't help me much.

Link to comment
Share on other sites

For security reasons, Linux' search path for programs does not include current directory. If you want to run dasm in the current directory you need to precede it with ./

The . is an alias for the current directory, likewise .. is an alias for the parent of the current directory.

./dasm kernel.asm -lkernel.txt -f3 -v5 -okernel.bin

 

You can add the path for dasm to your profile so you don't have to put a copy of dasm in each project's directory.  I cover that in this topic in the Harmony/Melody Club.  The steps may look a little different depending upon which Linux distribution you are using - I'm using Kubuntu 18.04

 

 

 

There are other options as well, such as putting dasm into a directory that's already in the path.

  • Like 2
Link to comment
Share on other sites

48 minutes ago, SpiceWare said:

For security reasons, Linux' search path for programs does not include current directory. If you want to run dasm in the current directory you need to precede it with ./

The . is an alias for the current directory, likewise .. is an alias for the parent of the current directory.


./dasm kernel.asm -lkernel.txt -f3 -v5 -okernel.bin

 

You can add the path for dasm to your profile so you don't have to type put a copy of dasm in each project's directory.  I cover that in this topic in the Harmony/Melody Club.  The steps may look a little different depending upon which Linux distribution you are using - I'm using Kubuntu 18.04

 

 

 

There are other options as well, such as putting dasm into a directory that's already in the path.

HURRAY! IT WORKS!

I mean, it didn't work, but like, I poked it!

"Fatal assembly error: source is not resolvable." 

I'm sure it's easy from here onward. Thanks a lot!

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
On 9/20/2020 at 3:55 PM, Marcos Moutta said:

HURRAY! IT WORKS!

I mean, it didn't work, but like, I poked it!

"Fatal assembly error: source is not resolvable." 

I'm sure it's easy from here onward. Thanks a lot!

 

Hi mate,  let you here some help.

 

/path/thru/folders/to/executable/of/dasm /path/thru/folders/to/my/source/file/kernel.asm -lkernel.txt -f3 -v5 -okernel.bin

if dasm and your source code are in the same folder yo can use ./

 

./dasm kernel.asm -lkernel.txt -f3 -v5 -okernel.bin

 

you must have vcs.h and macro.h files in the same folder where your source code it's.

 

try some easy example inside your kernel.asm, if you do everything like it's posted here should work fine.

 

cheers.

 

PD: bear in mind, in linux you are allowed just to work inside your user folder if you are not the root user:

 

/home/YOUR_USER_NAME_FOLDER

Edited by zilog_z80a
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...