07 March 2020, 12:59 | #21 |
Registered User
Join Date: Sep 2019
Location: Essen/Germany
Age: 55
Posts: 463
|
While it's true that memory protection is useful, I don't really see this as a strong point when doing programming on Amiga. If your code crashes, you reboot and are back in business. It's not as you have to have a critical system running 24/7. And find such a crash is easier done on an emulator anyway. And doing asm in Linux is IMO not very Amiga like, so you learn actually programming Linux and not Amiga (if this is what you want).
If you want to get your hands dirty with just getting started, I would recommend to use Seka and hack directly in memory, because you can immediatly type and see the effects. Or even better, you could use Easy68k, as long as you are just exploring the CPU. I use this all the time for prototyping functions which don't need hardware or OS specific stuff. IMO this would be the best approach when you are starting with M68 asm. The code is also mostly compatible with vasm, so you can easy test some machine code and then run it on the real machine afterwards. Depends on what you intend to code. |
25 March 2020, 22:11 | #22 |
Registered User
Join Date: Feb 2020
Location: USA
Posts: 41
|
I’m still chasing suggestions from this thread and I’m stuck on testing the cross-assembler “vasm” suggestion, I’m getting a “No config file!” error message when trying assemble a “Hello World” type assembler verification file. I would think I’ve done something wrong but I don’t know what, Any suggestions?
|
26 March 2020, 07:12 | #23 |
Registered User
Join Date: Sep 2019
Location: Essen/Germany
Age: 55
Posts: 463
|
You can take a look at my library, as it is intended to ease the pain of getting started with cross development: https://github.com/skeetor/amiga-utils
You have to use MKSYS2 for it and bebbos toolchain. It contains complete fully working sample projects for vasm and gcc and is selfcontained, so no additional dependencies to hunt down. |
26 March 2020, 13:31 | #24 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
Quote:
First of all, how did you get vasm? Did you download it (where)? Did you compile it yourself (how)? On which host system are you running it? After that, a copy of your command line calling vasm and the resulting error messages might help. |
|
26 March 2020, 16:58 | #25 |
Registered User
Join Date: Feb 2020
Location: USA
Posts: 41
|
I downloaded and followed a tutorial “Setting up an Amiga Cross Compiler (Linux/Mac)” from here: https://blitterstudio.com/setting-up...ross-compiler/
[QUOTE=phx;1387629]vasm doesn't need any config file, so there must be something very wrong. First of all, how did you get vasm? Did you download it (where)? {http://sun.hasenbraten.de/vasm/release/vasm.tar.gz}Did you compile it yourself (how)? {yes, make CPU=m68k SYNTAX=mot} On which host system are you running it? {xubuntu 18.04}After that, a copy of your command line calling vasm {vc +aos68k -o hello hello.c} and the resulting error messages might help.{No config file!}[/QUOTE] |
26 March 2020, 17:02 | #26 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,409
|
Are you sure that is the correct executable?
My VASM is called vasmm68k_mot (assuming I didn't make a spelling error ) and my VBCC is called, well, vbcc. Edit: hmm, I do see a vc executable in the Aminet release, so I might be mistaken about which executable you have to call. |
26 March 2020, 17:37 | #27 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
So far so good. This should provide you with an executable called "vasmm68k_mot" in the same directory. Copy it anywhere into your bin-path.
Quote:
Make an example source in 68k assembler, like... Code:
moveq #0,d0 rts vasmm68k_mot -Fhunkexe -o tst tst.asm |
|
26 March 2020, 17:50 | #28 | |
Registered User
Join Date: Feb 2020
Location: USA
Posts: 41
|
Quote:
|
|
26 March 2020, 18:18 | #29 | |
Registered User
Join Date: Feb 2020
Location: USA
Posts: 41
|
Quote:
curbie@curbie-main:~/bin$ ls myscript.sh rgu setupvbcc.sh syncall tst.asm vasmm68k_mot curbie@curbie-main:~/bin$ vasmm68k_mot -Fhunkexe -o tst tst.asm vasm 1.8g (c) in 2002-2019 Volker Barthelmann vasm M68k/CPU32/ColdFire cpu backend 2.3f (c) 2002-2019 Frank Wille vasm motorola syntax module 3.13 (c) 2002-2019 Frank Wille vasm hunk format output module 2.11 (c) 2002-2019 Frank Wille CODE(acrx2): 4 bytes curbie@curbie-main:~/bin$ ls myscript.sh rgu setupvbcc.sh syncall tst tst.asm vasmm68k_mot curbie@curbie-main:~/bin$ ^C |
|
29 March 2020, 11:56 | #30 | |
Registered User
Join Date: Sep 2006
Location: New Sandusky
Posts: 942
|
Quote:
Amiga shells work as terminal emulator devices. The "Shell" icon you doubleclicked opens a terminal emulator to the CON: device. In general Amiga shells combine the terminal emulator with the shell, unlike unix. Other popular ones are KINGCON, etc. CON: is the default shell device in ROM and it's the most basic, sort of akin to bourne shell on unix. NEWCON: is more like korn shell with more features in AmigaOS 1.3, but it was rolled into CON: in AmigaOS 2.0 and up, KINGCON: would be more like bash. If you're more comfortable with unix-style shells you can easily get a port of bash or tcsh and run it inside an Amiga CON: style shell, keeping the terminal emulator features of whatever CON:-style device you launched it in but executing the command/scripting features of the unix-style shell. In a CON: though, just cd to the directory that you put your executable in, then type the name of the executable. Amiga CON:-style shells don't use . to represent current directory (they use "" instead) but in general CON: style always includes current directory in the command path. Outside of the shell builtin commands and scripting features, if you're familiar with unix then you'll be at home interfacing with the command line. Amiga-style arguments are different but that's just convention, as commands still just receive a list of arguments and in C you read them as argc/argv like normal. Environment variables are available like in unix, but global variables, rather than as a memory structure, are stored as files in the ENV: assignment (virtual device that works like a soft link, or a drive assignment in Windows). You can manipulate them with the setenv command. Shells also have local environment variables and these work more like in unix. Last edited by AmigaHope; 29 March 2020 at 12:10. |
|
30 March 2020, 04:22 | #31 |
Registered User
Join Date: Feb 2020
Location: USA
Posts: 41
|
Thanks, in the WinUAE tutorial I did, they explained how to setup a PC directory as a device, I've been just dropping the executable in there and running them from there with the right-mouse execute-command, seems to work.
|
01 April 2020, 19:56 | #32 | |
Registered User
Join Date: Sep 2006
Location: New Sandusky
Posts: 942
|
Quote:
As you build more complex software you'll get to know the Amiga HUNK executable format (equivalent to say, ELF in Linux). Right now your assembler is just building your hunks for you but if you want to build more complex Amiga software getting to know hunk allocations is good as it lets you organize code, CPU data, audiovisual data, etc. Any static memory resources your program needs will be allocated on load in hunks of different types (vs. dynamic allocation of further memory hunks). Last edited by AmigaHope; 01 April 2020 at 20:02. |
|
01 April 2020, 22:27 | #33 |
-
Join Date: Jul 2003
Location: Helsinki / Finland
Age: 43
Posts: 9,861
|
If it's all in one exe and it doesn't need any additional files, just drag and drop it into DF0: in the floppy drive config section and boot the amiga. WinUAE will build a RAM based bootable disk image with your exe.
|
02 April 2020, 01:23 | #34 | |
Registered User
Join Date: Feb 2020
Location: USA
Posts: 41
|
Quote:
|
|
02 April 2020, 01:33 | #35 |
Registered User
Join Date: Feb 2020
Location: USA
Posts: 41
|
Thanks for the reply Jope, was mostly concerned about debugging, but will test your DF0: to RAM based bootable disk image notion.
|
22 January 2021, 23:59 | #36 | |
Registered User
Join Date: Jan 2021
Location: South Croydon
Posts: 33
|
Quote:
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|