Skip to content

Dragon 12 plus 2 simple command interface on bash shell, Archlinux.

License

Notifications You must be signed in to change notification settings

jeancahu/bash-dragon-12-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bash-dragon-12-tool

Dragon 12 plus 2 simple command interface on bash shell, Archlinux.

Recommended: bash 4.4+

Depends: screen, wine, wine-mono, wine_gecko

Install:

First clone the repository directory.

git clone https://github.com/jeancahu/bash-dragon-12-tool.git ~/.dragon_12

If you desire, you can use the configure script to automatically configure the tool.

./config

Otherwise, add ~/.dragon_12 directory to PATH environment variable.

PATH=$PATH:$HOME/.dragon_12

And customize the dragon_12_vars_config.sh file to your needs.

Uninstall:

Remove script directory:

rm -ir ~/.dragon_12/

How to use:

Flag Interpretation
-h Help option.
-f <file.asm> Indicate .asm script input.
-l <file.lst> Define list file out name.
-o <file.s19> Define object file out name.
-a Use asm12 to create the object file.
-b Send the object file to board.
-g Indicate program counter initial value and run program on board, 16b HEX.
-c [STRING] Send a char/string to serial TTY. This does not permit spaces, all string is concatenated.
Control chars are:
-S Space
-R CarrieReturn
-C Send a char/string to serial TTY. This does permit spaces.
Control chars are:
-S Space
-R CarrieReturn
-E Exit loop
-s Run the object file with the simulator.
-S Open TTY serial access to communicate with board through Terminal.

First, open a terminal to communicate over RS232 with the board.

dragon_12.sh -S

To generate the object file:

dragon_12.sh -af <name.asm> -o <name.s19>

where <name.asm> is the source assembly code. To write the object file to the board:

dragon_12.sh -bo <name.s19>

To send the value of the program counter (PC) and execute the program on the board:

dragon_12.sh -g XXXX

where XXXX corresponds to the hexadecimal value in which the execution of the program begins.

All previous steps can be executed on a single program call, by typing:

dragon_12.sh -af <name.asm> -o <name.s19> -b -g XXXX

If the name of either the object file or the list file is not specified, the program will assume the same name as the source file and will proceed to change only the suffix.

If you want to run the .s19 with the simulator you have three options:

  1. If you want to open an existing object file with the simulator.

     dragon_12.sh -so <name.s19>
    
  2. If you want to assemble the .asm and run the object file generated by the assembler.

     dragon_12.sh -saf <name.asm>
    

This will run the object file named after the .asm.

  1. If you want to bring the object file a different name.

     dragon_12.sh -saf <name.asm> -o <name.s19>
    

If you just want to run the simulator, you can type:

dragon_12.sh simulator

About

Dragon 12 plus 2 simple command interface on bash shell, Archlinux.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages