English Amiga Board Amiga Lore


Go Back   English Amiga Board > Coders > Coders. General > Coders. Tutorials

 
 
Thread Tools
Old 01 October 2010, 21:09   #41
Lonewolf10
AMOS Extensions Developer
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 38
Posts: 1,917
Quote:
Originally Posted by StingRay View Post
Just use dcb.l 10240,$80 instead of blk. (d.efine c.onstant b.lock)
Thanks. BTW, I think you mean dcb.b 10240,$80

Edit: Sorry, StringRay. I just saw I made the mistake a few messages back, doh!


Regards,
Lonewolf10

Last edited by Lonewolf10; 01 October 2010 at 21:17.
Lonewolf10 is offline  
AdSense AdSense  
Old 02 October 2010, 18:02   #42
Lonewolf10
AMOS Extensions Developer
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 38
Posts: 1,917
For anyone doing this course and is not using K-Seka, to add the appropriate files (e.g. "SCREEN" and "MOVETABLE" for program MC0502.s) you will need to use the include commands - INCDIR (INCludes DIRectory) and INCBIN (INClude BINary).

Example for the movetable in MC0502.s:

Code:
movetable:
*   blk.l  3100,0

    INCBIN "MOVETABLE"
Make sure the include commands are indented or you may get a malformed line error (Devpac, or whatever you are using, may interpret INCBIN as a label and the string that follows it causes the error message).
Also, INCDIR must be at the start of the program (to avoid confusion), whereas the INCBIN commands must be placed where you want the included file to be placed. In the above example the file "MOVETABLE" will be added at the location movetable: points to.
I have commented out (added the asterisk) before the blk.l instruction as it is not needed when including the "MOVETABLE" file.

Oh, my dutch is rusty... what does "Brevkurs" translate to? (bravo?)


Regards,
Lonewolf10
Lonewolf10 is offline  
Old 02 October 2010, 20:06   #43
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,017
Quote:
Originally Posted by Lonewolf10 View Post
I know about chip and fast memory, but public memory always confuses me.
Allocating public memory means the AmigaOS will first check for fastmem and slowmem, then chipmem.

Brevkurs is Swedish actually, it means mail/letter course.
Leffmann is offline  
Old 02 October 2010, 20:18   #44
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,654
MEMF_PUBLIC was supposed to mean memory that is always available (not paged or swapped or something similar) but it was some future plan that never happened and no one used MEMF_PUBLIC flag properly..

You always get FAST first (if available) as long as you don't request CHIP RAM. MEMF_PUBLIC does not matter.
Toni Wilen is online now  
Old 02 October 2010, 20:45   #45
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,017
But in the context of Amiga assemblers it's important to know that f.ex section something, code_p is what you have to specify to use this allocation scheme, while code_f will require fastmem or slowmem.
Leffmann is offline  
Old 02 October 2010, 20:55   #46
StingRay
move.l #$c0ff33,throat

StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 5,523
Quote:
Originally Posted by Leffmann View Post
But in the context of Amiga assemblers it's important to know that f.ex section something, code_p is what you have to specify to use this allocation scheme, while code_f will require fastmem or slowmem.
Section code,code is enough as it'll allocate fast/public mem if available, otherwise chipmem. The _P extension is not required.
StingRay is offline  
Old 02 October 2010, 21:02   #47
Lonewolf10
AMOS Extensions Developer
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 38
Posts: 1,917
Quote:
Originally Posted by Leffmann View Post
Allocating public memory means the AmigaOS will first check for fastmem and slowmem, then chipmem.
Ok.

Quote:
Originally Posted by Leffmann View Post
Brevkurs is Swedish actually, it means mail/letter course.
What's a Swedish word doing in a Danish course?!! Thanks for the translation


Another note to anyone doing the course, alot of the example programs end up giving the workbench error message (Returned errorcode X), where X is the current value of d0. To avoid this simply type...

Code:
    moveq   #0,d0
...before the RTS instruction that exits back to workbench.


Regards,
Lonewolf10
Lonewolf10 is offline  
Old 02 October 2010, 21:57   #48
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,017
Quote:
Originally Posted by Lonewolf10 View Post
What's a Swedish word doing in a Danish course?!! Thanks for the translation
No idea why, or why you thought it was Dutch for that matter The Danish word for it is "brevkursus". Probably just a typo.

Quote:
Originally Posted by Lonewolf10 View Post
Another note to anyone doing the course, alot of the example programs end up giving the workbench error message (Returned errorcode X), where X is the current value of d0. To avoid this simply type...
Code:
moveq   #0,d0
If you ever try the boring part of Amiga programming, utilities and command line tools, then the Amiga also accepts return values of 5 to indicate a warning, 10 for an error and 20 for a critical error or failure, to aid in debugging.
Leffmann is offline  
Old 03 October 2010, 00:56   #49
Lonewolf10
AMOS Extensions Developer
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 38
Posts: 1,917
Quote:
Originally Posted by Leffmann View Post
No idea why, or why you thought it was Dutch for that matter The Danish word for it is "brevkursus". Probably just a typo.
I have realised why... it's used because they needed an 8 letter word to help demonstrate sprite movement (one letter per sprite).


Quote:
Originally Posted by Leffmann View Post
If you ever try the boring part of Amiga programming, utilities and command line tools, then the Amiga also accepts return values of 5 to indicate a warning, 10 for an error and 20 for a critical error or failure, to aid in debugging.

Well it seems that workbench accepts any value (0 to 65535) returned in d0. Of course, it's best to stick with normal error values for debugging purposes


Regards,
Lonewolf10
Lonewolf10 is offline  
Old 08 October 2010, 12:27   #50
AlfaRomeo
A1200 040 SAM440EP 667
AlfaRomeo's Avatar
 
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 774
When I was typing an asm tutorial a required memory space for a copper list has to be calculated by subtracting the start copperlist label by the end copper list label:

Code:
CLstart:
            ...
            copper list
            ...
CLend:
but devpac 3.18 says that
Code:
CLsize = CLstart - CLend
itīs an instruction not recognized

I do not found anything about this in devpacīs manual
Does anyone know how do I can bypass this in devpac?
AlfaRomeo is offline  
Old 08 October 2010, 12:50   #51
StingRay
move.l #$c0ff33,throat

StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 5,523
Quote:
Originally Posted by AlfaRomeo View Post
but devpac 3.18 says that
Code:
CLsize = CLstart - CLend
itīs an instruction not recognized

I do not found anything about this in devpacīs manual
Does anyone know how do I can bypass this in devpac?
Where did you place that very line? Before or after the label CLend? Also, remove the spaces in your calculation, i.e.:
CLsize = CLend-CLstart.

If nothing helps, try to change it to CLsize = *-CLstart and place it right after the CLend label.
StingRay is offline  
Old 08 October 2010, 14:18   #52
AlfaRomeo
A1200 040 SAM440EP 667
AlfaRomeo's Avatar
 
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 774
@StingRay
Thanks for the help.

Quote:
Originally Posted by StingRay View Post
Where did you place that very line? Before or after the label CLend?
This line is placed after CLend label.

I did already tried your tips but none seems to work

I will think on other options on how to calculate the memory size of copperlist
AlfaRomeo is offline  
Old 08 October 2010, 14:30   #53
StingRay
move.l #$c0ff33,throat

StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 5,523
Quote:
Originally Posted by AlfaRomeo View Post
@StingRay
Thanks for the help.
You're welcome.

Quote:
Originally Posted by AlfaRomeo View Post
This line is placed after CLend label.

I did already tried your tips but none seems to work

I will think on other options on how to calculate the memory size of copperlist
What's the exact error message you get from Devpac? Also, did you correct the order (CLend-CLstart instead of your wrong CLstart-CLend)?
StingRay is offline  
Old 08 October 2010, 14:50   #54
AlfaRomeo
A1200 040 SAM440EP 667
AlfaRomeo's Avatar
 
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 774
Youīre right StingRay..

As Iīm at work and had tried your tips very quickly, I do it in the wrong way..

When I corrected CLend - CLstart by CLstart-CLend and without spaces all worked ok.
thanks very much.
AlfaRomeo is offline  
Old 30 November 2010, 15:46   #55
Popstar
Deluxe Painter
Popstar's Avatar
 
Join Date: Mar 2008
Location: Copenhagen / Denmark
Age: 42
Posts: 61
Quote:
Originally Posted by Herpes View Post
I dared to make a translation of the 12 chapters of the Danish Amiga course.

...

Regards, HPS
Hi, Laust Palbo Nielsen here.

Just wanted to see where all the traffic on my page was coming from and I stumbled upon your post.

If you don't mind, I would like to put your english version up on my site as well.

Cheers
Laust
Popstar is offline  
Old 05 December 2010, 17:07   #56
Herpes
... aka Amix73

Herpes's Avatar
 
Join Date: Jan 2009
Location: Austria
Posts: 76
Quote:
Originally Posted by Popstar View Post
Hi, Laust Palbo Nielsen here.
Just wanted to see where all the traffic on my page was coming from and I stumbled upon your post.

If you don't mind, I would like to put your english version up on my site as well.

Cheers
Laust
Hi Laust!
You are very welcome to put it on your page - since it's your stuff anyway
Cheers!
Herpes is offline  
Old 06 December 2010, 10:46   #57
Popstar
Deluxe Painter
Popstar's Avatar
 
Join Date: Mar 2008
Location: Copenhagen / Denmark
Age: 42
Posts: 61
I salute you, and the translations are now on my page:
http://palbo.dk/dataskolen/maskinsprog

BTW: I hope your leg healed up nicely.
Popstar is offline  
Old 06 December 2010, 18:31   #58
Lonewolf10
AMOS Extensions Developer
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 38
Posts: 1,917
A big thank you to both of you (Herpes and Popstar), this tutorial helped clear up a few things I didn't understand and has now led to me starting my own demo (hoped to be finished around March 2011).


Regards,
Lonewolf10
Lonewolf10 is offline  
Old 06 December 2010, 21:08   #59
jman
Registered User
 
Join Date: Nov 2010
Location: Italy
Posts: 301
Quote:
Originally Posted by Lonewolf10 View Post
A big thank you to both of you (Herpes and Popstar)...
I'd like to thank Herpes and Popstar too.
Now that the tutorial has been translated I could finally give a glance to the summary and it looks a really useful tool for my ASM training.

Many people will probably be grateful for this effort because there are not so many resources of this kind around.

Good work!

p.s. I'm also curious about the graphic vector document; I could post at some point a reformatted rough google-translation of that document and see if the magic happens again ;-) There seems to be some interesting math in there...

Antonio
jman is offline  
Old 31 May 2014, 08:54   #60
Markowitch
 
Posts: n/a
Great work you guys! I just discovered all twelve old letters from the danish mail course back in 1989. They were originally printed on red paper, back in the days, a little hack that ensured that photocopies would come out totally black!

Ok, so I got a hit of nostalgia, and since I never completed this stuff back then, (I guess I was to busy gaming) I thought that now, would be a good time to do it!! Anyways, thanks for keeping it alive!
 
AdSense AdSense  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Beginning Amiga Assembly Programming Hewitson Coders. Tutorials 32 09 October 2012 18:25
Wanted: Amiga Assembly Books Hewitson Coders. General 30 25 July 2010 10:56
New danish online Amiga & Commodore shop Retroplay News 6 25 October 2008 08:55
Amiga Assembly sources - Please help! D4Ni3L3 Amiga scene 21 16 July 2008 08:13
Amiga won at Assembly 2006 Frog Amiga scene 47 04 February 2007 19:59

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 10:01.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.29352 seconds with 13 queries