English Amiga Board


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

 
 
Thread Tools
Old 02 October 2020, 10:51   #1
jonesypeter
Registered User
 
Join Date: Mar 2017
Location: West Sussex
Posts: 34
Devpac beginner troubles

Hi,

I have done a small amount of assembler on the ZX Spectrum, but as I had an Amiga 1200 back in the day, I thought I would start learning the basics.

I'm using WinUAE with A1200 emulation (40.68 Kickstart) and Workbench 3.1. I'm using Devpac Lite that came with Amiga Shopper magazine and the version is 3.12. Its the same as normal Devpac but is restricted to 200 lines, and won't create an executable file.

I'm following a beginners guide in Amiga Shopper issue 43, page 54.

The code is as follows:

Code:
move #2, d0
move #2, d1
add d0,d1
rts
When I assemble the code I get 'Error: Line malformed at line 1 in file Untitled.s


The '#' is highlighted as being in error.

Can anyone guide me along the right path.

Very many thanks
jonesypeter is offline  
Old 02 October 2020, 11:33   #2
WayneK
Registered User
 
Join Date: May 2004
Location: Somewhere secret
Age: 50
Posts: 366
I don't know devpac specifically, but could it be because you haven't given the size directive to move/add? eg:

move.w #2,d0
move.w #2,d1
add.w d0,d1
rts

There are 3 possiblities for the size, .b (byte, 8 bits), .w (word, 16 bits) or .l (long, 32 bits)...
WayneK is offline  
Old 02 October 2020, 11:38   #3
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,242
Quote:
Originally Posted by jonesypeter View Post
The '#' is highlighted as being in error.
The leftmost column is reserved for labels. Instructions should go into the second column. That is, put a space or a tab-stop upfront the instruction.
Thomas Richter is offline  
Old 02 October 2020, 11:47   #4
jonesypeter
Registered User
 
Join Date: Mar 2017
Location: West Sussex
Posts: 34
Quote:
Originally Posted by Thomas Richter View Post
The leftmost column is reserved for labels. Instructions should go into the second column. That is, put a space or a tab-stop upfront the instruction.
Thomas, you are a genius. Thank you!
jonesypeter is offline  
Old 02 October 2020, 13:12   #5
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
To get you started you can always check out my AmigaGameDev site which will probably help you along. Episode 1 shows you how to get a cross dev platform working on Windows so you may want to skip that and go to Episode #2.

You can ask questions on my Discord too if you get stuck where I often hang about.

Geezer
mcgeezer 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
Devpac & Devpac 2 manuals? RetrogamerRhys Coders. Asm / Hardware 3 03 February 2020 16:47
Devpac II or Devpac 3 assembler with manual. RetrogamerRhys MarketPlace 2 01 February 2020 18:33
Beginner need help. thexfilez New to Emulation or Amiga scene 7 23 August 2009 10:35
Not even a beginner yet.... coustasse New to Emulation or Amiga scene 18 13 December 2007 15:01
Help! Beginner Chris743 New to Emulation or Amiga scene 1 28 June 2002 20:40

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 22:18.

Top

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