English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 14 May 2024, 15:24   #1
Defender
Registered User
 
Join Date: Apr 2022
Location: London
Posts: 14
Amiga Coders Club Source Codes

Hi,

As a newbie, I found Amiga Coders Club series is the Amiga hardware assembly tutorial I was looking for. However, whenever I try to run the example source codes either on VSCode (PC) or AsmPro (WinUAE), I'm receiving lots of different error messages, especially for the include files. (And yes, I corrected the folders) Has anyone ran those codes successfully please? Should I use another assembler for compatibility? It would be really good to able to run those examples.

Thanks in advance for your help.
Defender is offline  
Old 14 May 2024, 19:31   #2
filou
Registered User
 
Join Date: May 2023
Location: France
Posts: 6
Hi,

I've found this:
https://archive.org/details/amiganut...scansalltested.

Very interesting.

Could you post a source code so we can test ?

What are the error messages ?
filou is offline  
Old 14 May 2024, 21:27   #3
Rock'n Roll
German Translator
 
Rock'n Roll's Avatar
 
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 49
Posts: 189
this procedure works not for all but for the first some listings:

in ACC/Source5/Tutorials (Copper example 1) copper_eg1.s stands:
;opt o+,ow-,c- ; devpac, so I comment out this line because I use asmone

include source5:include/hardware.i
include source5:include/libs.i

I put asmone in the folder ACC/Source5
then in WinUAE: Hardware/CD & Harddrives --> Add directory or archive
Device name: DH1
Volume label: source5
Path: ../ACC/source5

Then start the emulation and then asmone and read and assemble the file: it works!

but this works not for the later files like 'eg_11.s' with this:
incdir 'Source5:include/'
include 'startup.i'
include 'macros.i'
include 'subroutines.i'

because in startup.i stands:
incdir "sys:include/"
include "exec/exec_lib.i"
include "exec/exec.i"
include "libraries/dos_lib.i"
include "libraries/dos.i"
include "libraries/dosextens.i

and asmone breaks up with errormessages here.

Maybe with devpac it is possible, but I have no experience with this.
Rock'n Roll is offline  
Old 14 May 2024, 22:04   #4
Defender
Registered User
 
Join Date: Apr 2022
Location: London
Posts: 14
Quote:
Originally Posted by filou View Post
Hi,

I've found this:
https://archive.org/details/amiganut...scansalltested.

Very interesting.

Could you post a source code so we can test ?

What are the error messages ?
Thanks, I tried to run the first sprite example in ACM3:
https://imgur.com/a/Z9GpPHL

Both VSCode and Asm-Pro v1.18 goes crazy about includes:
VSCode:
https://imgur.com/a/NrHRKDA

Asm-Pro:
https://imgur.com/a/GP8P0aQ
Defender is offline  
Old 14 May 2024, 22:07   #5
Defender
Registered User
 
Join Date: Apr 2022
Location: London
Posts: 14
Quote:
Originally Posted by Rock'n Roll View Post
and asmone breaks up with errormessages here.

Maybe with devpac it is possible, but I have no experience with this.
Thanks, it seems the issue is with the include files for other sources too. When I remove the includes and put the definitions used in the source into the source code itself, it works fine for most of them.
Defender is offline  
Old 15 May 2024, 08:14   #6
filou
Registered User
 
Join Date: May 2023
Location: France
Posts: 6
Hi, With the vscode extension there's a problem with the character "."

For example, you should replace in hardware.i:

CIAAE.LSB EQU $BFE801
CIAAE.MID EQU $BFE901
CIAAE.MSB EQU $BFEA01
by
CIAAE_LSB EQU $BFE801
CIAAE_MID EQU $BFE901
CIAAE_MSB EQU $BFEA01

or use the built in hardware/cia.i and hardware/custom.i



The vscode extension is also case sensitive.
filou is offline  
Old 15 May 2024, 10:16   #7
Defender
Registered User
 
Join Date: Apr 2022
Location: London
Posts: 14
Quote:
Originally Posted by filou View Post
Hi, With the vscode extension there's a problem with the character "."

For example, you should replace in hardware.i:

CIAAE.LSB EQU $BFE801
CIAAE.MID EQU $BFE901
CIAAE.MSB EQU $BFEA01
by
CIAAE_LSB EQU $BFE801
CIAAE_MID EQU $BFE901
CIAAE_MSB EQU $BFEA01

or use the built in hardware/cia.i and hardware/custom.i



The vscode extension is also case sensitive.
Very important knowledge, thank you!
Defender is offline  
Old 15 May 2024, 10:39   #8
Defender
Registered User
 
Join Date: Apr 2022
Location: London
Posts: 14
And I didn't know there was built-in include files in VSCode extension! Trying hard to find them now
Defender is offline  
Old 15 May 2024, 10:48   #9
Defender
Registered User
 
Join Date: Apr 2022
Location: London
Posts: 14
Any idea about this please?

https://imgur.com/a/MGYMtwY
Defender is offline  
Old 15 May 2024, 12:14   #10
filou
Registered User
 
Join Date: May 2023
Location: France
Posts: 6
I think that the label \done should be renamed .done
Also "Be kind to the os" should be commented with ;
All the comments should appear in green : request bits , clear bits etc....
filou is offline  
Old 15 May 2024, 12:19   #11
Defender
Registered User
 
Join Date: Apr 2022
Location: London
Posts: 14
Seems like that backslash character has a special meaning so it can be re-used, probably in devpac:
https://imgur.com/a/QpNWkhG
Defender is offline  
Old 15 May 2024, 12:22   #12
filou
Registered User
 
Join Date: May 2023
Location: France
Posts: 6
Maybe there are invisible characters between beq,s and \done.
Try to delete what's in between and replace by a regular space.
filou is offline  
Old 15 May 2024, 12:51   #13
Defender
Registered User
 
Join Date: Apr 2022
Location: London
Posts: 14
Quote:
Originally Posted by filou View Post
Maybe there are invisible characters between beq,s and \done.
Try to delete what's in between and replace by a regular space.
Checked, it's just spaces:
https://imgur.com/a/6SyOLti
Defender is offline  
Old 15 May 2024, 13:52   #14
filou
Registered User
 
Join Date: May 2023
Location: France
Posts: 6
In previous post it said that _done is redefined.
a label is unique unless its name starts with "." , it then can be repeatedly used locally (till a rts or rte instruction)

You should rename _done to .done to avoid conflict.

Or differentiate each label done1, done2 for each subroutine ( rts (return from subroutine) instruction)

labels will be converted into instruction addresses by the assembler.
filou is offline  
Old 15 May 2024, 14:39   #15
a/b
Registered User
 
Join Date: Jun 2016
Location: europe
Posts: 1,044
For asm-one&co:
- end of line comments may have to start with a semicolon, depending on your assembler prefs: (un)check the "; Comment" option
- local labels must start with a period, e.g. .local_lab
- local lables within other blocks are referenced with a backslash, e.g. Global3\.local_lab
That's why backslashes and periods have a special meaning when it comes to labels and symbols.
a/b is offline  
Old 15 May 2024, 15:57   #16
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,512
Quote:
Originally Posted by a/b View Post
- local labels must start with a period, e.g. .local_lab
- local lables within other blocks are referenced with a backslash, e.g. Global3\.local_lab
That's why backslashes and periods have a special meaning when it comes to labels and symbols.
Backslashes are also used in macros to specify macro arguments (
\1
,
\2
, etc. or special macro replacements like
\@
(inserts a unique id)).
Periods are also used to define the size (
.b
,
.w
,
.l
) as in
move.l ExecBase.w,a6
or
(label.l,a0)
. Therefore you shouldn't use it within symbol names.

If you are refering to the VSCode extension based on vasm, then you can enable periods/dots within symbol names by the command line options:
-ldots
or
-devpac
(yes, Devpac seems to allow it).
phx is offline  
Old 16 May 2024, 12:53   #17
Defender
Registered User
 
Join Date: Apr 2022
Location: London
Posts: 14
Quote:
Originally Posted by phx View Post
If you are refering to the VSCode extension based on vasm, then you can enable periods/dots within symbol names by the command line options:
-ldots
or
-devpac
(yes, Devpac seems to allow it).
Oh that's great! It seems there are more to learn about that extension! Thanks
Defender is offline  
Old 16 May 2024, 13:55   #18
Defender
Registered User
 
Join Date: Apr 2022
Location: London
Posts: 14
Am I doing it right?

\Programs\Microsoft VS Code>Code.exe -devpac
Defender is offline  
Old 16 May 2024, 17:52   #19
filou
Registered User
 
Join Date: May 2023
Location: France
Posts: 6
On VsCode on the left tab "EXPLORER" you must edit the file task.json and add the arg -devpac to vasm. (expand .vscode folder)

"tasks": [
{
"type": "amigaassembly",
"vasm": {
"enabled": true,
"command": "${config:amiga-assembly.binDir}/vasmm68k_mot",
"args": [
"-m68000",
"-Fhunk",
"-devpac",
"-linedebug"
]
},
filou is offline  
Old 16 May 2024, 22:03   #20
Defender
Registered User
 
Join Date: Apr 2022
Location: London
Posts: 14
Quote:
Originally Posted by filou View Post
On VsCode on the left tab "EXPLORER" you must edit the file task.json and add the arg -devpac to vasm. (expand .vscode folder)
Ah, thanks!
Defender is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Which Amiga game source codes should be released? mc68060 Retrogaming General Discussion 78 08 July 2023 09:43
new Amiga voxel game with source codes :) kwahu Coders. C/C++ 3 07 March 2020 17:34
Amiga Coders Club (ACC) disks Codetapper request.Apps 24 01 June 2017 11:28
Amiga Coders Club (ACC) Daillew request.Other 5 24 July 2007 09:22
Source codes etc for intro's etc other amiga stuff -=SPY=- Amiga scene 1 22 May 2006 10:16

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 23:12.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.09371 seconds with 15 queries