English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. General (https://eab.abime.net/forumdisplay.php?f=37)
-   -   Noob Question but anyway. (https://eab.abime.net/showthread.php?t=40008)

trackah123 07 October 2008 17:32

Noob Question but anyway.
 
I found a Tool called Multibootv1.0 by SPY from SENSOR for the Amiga which allows you to select up to 9 (non-wb) executable files like for example Red Sector Demomaker files and Multi-boot will make a bootblock and trackloader (NDOS disks) for you :D it appends the files. Because i don't know how to code. And it works pretty good

Anyway i feel so lame somehow.

If i want to learn some coding for beginners, hopefully to write my own trackroutines or NDOS disks out of red sector demomaker files. Where should i start? are there any good tutorials for this on the internet or certain books to learn coding?

On my dutch amigawebsite i talked to someone about this he knows alot about assemblers etc "Vektor of Zite Productions".
He showed me his bootblock and some coding stuff but for me its pure abacadabra.

http://www.amigascene.nl/modules/new...#forumpost2750

anyway whats just the best starting point if i want to learn coding on a Amiga? ASM-One from TFA or something else?

Leffmann 07 October 2008 19:46

There's no definite book or document on the internet for the beginner coder AFAIK, but maybe these can help:

ASM-One
http://www.theflamearrows.info/documents/ftp.html

Various programmer references for the 680x0 series
http://www.freescale.com/webapp/sps/...H3YTLC61654622

The amiga hardware reference manual. A brief addendum for the AGA hardware can be found in the ASM-one package.
http://pub.elowar.com/AmigaDev/Hardware_Manual.html

Some various Amiga programming information
http://www.mways.co.uk/amiga/howtocode/

Loads of intro source codes to study
http://cyberpingui.free.fr/rsources.htm

The EAB and the Amiga Demoscene Archive has a coding forum with knowledgeable people
http://ada.untergrund.net/

trackah123 07 October 2008 21:25

Thanks. I took a look at some stuff.
It's too complicated for me. I think because ASM is a second generation language.

1 website says i need to learn the machine language first (How the Amiga Hardware really works).

The other website says "Start with BASIC Language in order to understand ASM a bit more".

I wonder how all the Amiga coders started to learn? they must have started somewhere?

Photon 07 October 2008 23:38

Going from scratch to asm is a big step. Math skills and learning a simple language first is recommended. Try Hisoft-Basic, it compiles I think. But if you already have some logic, math and procedural thinking, I recommend some Asm tutorials. Working my ass off right now, but in a while I will have some on coppershade.org.

Leffmann 08 October 2008 02:05

What is it that you feel is too complicated? Computers and how they work and how you program them, or assembler/machine code and the Amiga hardware in specific?

trackah123 08 October 2008 05:28

Well its like , i know how to use the Amiga in a normal way like everyone else does, and i know how to make a bootable workbench disk (Startup-sequence etc). but thats about it.

The thing i found too complicated is just looking at some ASM examples. It's pure abacadabra all these words and numbers :shocked it made me almost dizzy lol.

for example i cannot find an explanation of the "dc.l" command, or what "move" does. like really simple stuff.
Also does ASM work like "<Command> <Values> <Parameters>" or is it really complicated in a way that maths and formulas are involved?

because at school i really sucked with math and physics lol.

coze 08 October 2008 06:08

If I were you I would start with a modern language like C or Java. It won't be much use amiga-wise, but you would get hang of important concepts like variables, types, flow control, etc. Also it might be of use to you in the future for basic tasks. Then you can head into assembly and have an easier time.

StingRay 08 October 2008 10:53

Quote:

Originally Posted by trackah123 (Post 466080)
The thing i found too complicated is just looking at some ASM examples. It's pure abacadabra all these words and numbers :shocked it made me almost dizzy lol.

I wouldn't recommend looking at too many examples when you start learning to code as you can't know if these examples are good or not. There are many quite horrible sources around. :) Also, it might confuse you more than it helps as I doubt it helps to look at demo sources at the beginning. My advise would be: start very simple (remember: you need to learn to walk before you can run), give yourself easy tasks like: "I want to see some text on screen" f.e., make sure you always have some visual output as otherwise learning ASM will be incredibly boring. :)

Quote:

for example i cannot find an explanation of the "dc.l" command, or what "move" does. like really simple stuff.
dc.l just D.eC.lares a variable of type .l (longword). And I think you should be able to figure out what move does yourself, if not I'm not sure if you really should try to learn coding. :)

Quote:

Also does ASM work like "<Command> <Values> <Parameters>" or is it really complicated in a way that maths and formulas are involved?
ASM per se has nothing to do with math or formulas. You have a defined set of opcodes and use them. What you use them for is a whole different story though. :)

pkillo 08 October 2008 11:20

I was teaching a lab for my university's introduction to programming course tonight and I came to the conclusion that Java is an awful first language. There are too many tokens in the program when the programmer is beginning; a quarter of the kids in the course can't tell a variable from a method from a class, because there's too much going on.

BASIC (with line numbers of course! i'm only half kidding) is much more straightforward for the introduction of the user to the fundamental concepts of programming. I've seen Amiga BASIC books listed on ebay for a couple of dollars and I didn't see too many bidders, pick one up and start there.

If you really don't want to jump into assembler, learn C or BASIC instead of C++ or Java - you will learn the concepts you need to learn asm later when you tackle pointers in C so it's a better choice if you're in a hurry, but BASIC will get you there, too.

cosmicfrog 08 October 2008 11:31

check out E man if i remember it lets you mix assemble within its code and started out ob the amiga

musashi5150 08 October 2008 11:38

Quote:

Originally Posted by StingRay (Post 466125)
make sure you always have some visual output as otherwise learning ASM will be incredibly boring

I learned to love watching hex move around in MonAm ;)

Leffmann 08 October 2008 14:29

Quote:

Originally Posted by trackah123 (Post 466080)
The thing i found too complicated is just looking at some ASM examples. It's pure abacadabra all these words and numbers :shocked it made me almost dizzy lol.

for example i cannot find an explanation of the "dc.l" command, or what "move" does. like really simple stuff.
Also does ASM work like "<Command> <Values> <Parameters>" or is it really complicated in a way that maths and formulas are involved?

Everything is difficult until you've learned it :) don't get deterred by the cryptic looking words, they are just abbreviations and you will memorize every one of them eventually. One of the links I gave you contains information on the 680x0 processors and instruction references.

In high level languages you will face a lot of confusion when you have to deal with complicated syntaxes, constructs and programming paradigms. Machine code is in in a way inherently free from this, and since each instruction performs a single, basic operation, it also makes it easy to learn, believe it or not.

Since you've looked at some source codes you can see that the <command> <value> format pretty much applies, yes. You have no curly braces or indentations and so assembler (the written text form of machine code) has a very "fixed" look.

Some instructions take no values, and some require several values in order to perform the operation. The common thing is that they each and one perform a very simple operation such as moving a byte in memory, comparing two values, jump to a different part of memory to resume program instruction there etc. Instructions are executed in order, and constructing a program is a matter of writing a sequence of instructions to perform all the operations needed to get the desired result.

F.ex to calculate the sum of a hundred numbers stored in the memory you would need to know where in memory the numbers are and write a sequence of instructions that reads one value, adds it to the sum and then proceeds to the next value and repeats itself until all numbers have been added. In these processors there are no instructions to magically add a hundred numbers, draw lines and circles on the screen or ask the user to enter his name, to do these things you would have devise a method and writing all the instructions needed for doing so.

Really sorry for the tedious post :) I'm trying to explain this kind of programming to him in a simple way, maybe I'm not very pedagogic.

If all of this still doesn't fit in your image of computer programming then maybe it's just not for you. If you're still curious about something then just ask, maybe we can give you some specific and practical examples that will clear things up.

BippyM 26 October 2008 12:01

The hardest part of ASM programming is understanding the underlying hardware and how to manipulate it properly

Thorham 29 October 2008 09:52

Quote:

Originally Posted by trackah123 (Post 465985)
I wonder how all the Amiga coders started to learn? they must have started somewhere?

I started in basic on the old eight bit computers when I was a kid. I moved to assembler when I got my first computer (c64) and started in basic on the A500 when I was a teen. Quickly dumped basic for assembler when I got fed up with it's low speed.
Quote:

Originally Posted by Photon (Post 466049)
Going from scratch to asm is a big step. Math skills and learning a simple language first is recommended.

Yep, there's no easy way :evilgrin
Quote:

Originally Posted by Photon (Post 466049)
Try Hisoft-Basic, it compiles I think.

Also take a look at Amos or Amos pro.
Quote:

Originally Posted by trackah123 (Post 466080)
for example i cannot find an explanation of the dc.l" command, or what "move" does. like really simple stuff.

You're right, those are simple things :) Explenation of dc.l should be in your assembler's manual under something like directives, while move is an assembler instruction and should be looked up in a 68000 assembler book.

Here's a simple program with an explenation of what it does:
Code:

start
        move.l        #123,d0                ;Put 123 in register d0.
        move.l        #456,d1                ;Put 456 in register d1.
        add.l        d0,d1          ;Add register d0's value to that of d1.
                                ;D1 will countain 579.
        move.l        d1,result        ;Store result in memory location named 'result'.
        rts                        ;return to system (rts=return subroutine).
result
        dc.l        0                ;Make 4 byte storage space at location 'result'.

The move.l, add.l and rts instructions are the actual assembler instructions, while dc.l is an assembler directive. Any good 68000 book will show you exactly how these work.

Quick note on the .l thing: This refers to the size of the operation. .l means the operation is carried out on 4 bytes. A .w would be 2 bytes and a .b would be 1 byte.
Quote:

Originally Posted by trackah123 (Post 466080)
Also does ASM work like "<Command> <Values> <Parameters>" or is it really complicated in a way that maths and formulas are involved?

because at school i really sucked with math and physics lol.

Don't worry about math formulas, you won't need them :)
Quote:

Originally Posted by coze (Post 466081)
If I were you I would start with a modern language like C or Java. It won't be much use amiga-wise, but you would get hang of important concepts like variables, types, flow control, etc. Also it might be of use to you in the future for basic tasks. Then you can head into assembly and have an easier time.

While I wouldn't call C very modern (sorry :o), it might be a starting point. Also C will be of use on the Amiga; most of amiga os is written in C (I think), and a lot of serious software is also written in C. Still, might not be the best beginner language.

Retro1234 29 October 2008 10:42

Quote:

Originally Posted by trackah123 (Post 466080)
for example i cannot find an explanation of the "dc.l" command, or what "move" does. like really simple stuff.

Quote:

Originally Posted by Thorham
You're right, those are simple things Explenation of dc.l should be in your assembler's manual under something like directives, while move is an assembler instruction and should be looked up in a 68000 assembler book..

Can anyone recomend a book?

Thorham 29 October 2008 11:34

Quote:

Originally Posted by Boo Boo (Post 472148)
Can anyone recomend a book?

This is the book I used to learn 68000: Assembly Language Programming for the 68000. Note that this is an Amazon link. However, you might want to consider searching for this some where else; just look at those prices: Ridiculous prices :shocked I guess the book is still copyrighted. Also, it's not Amiga specific. Still worth getting somehow if you're serious about learning 68000 assembler.

Retro1234 30 October 2008 09:21

Thanks ive ordered the book once it gets here I decide how serious I am;)

MrFluffy 30 October 2008 14:39

Going back to the op, theres a system routine that loads sectors in at a definate memory location as a trackloader, most of the early multi demo megademo's just intercepted the trackloader and chained each demo in on the system routine. It was a case of capturing the pointer, and handing your own parameters over to the system routine that took over telling it where on the disk etc the data was, and where to put it in memory.
I dont have any examples to hand, but downloading any of the earlier megademo's and disecting the bootblock etc will quickly reveal the technique.

Might just be a bit in the future for you if your still wondering what move.l is about though...

I tried to write a hardware trackloader using the chipset directly once. It went horribly wrong and born of it was a program called the "fast disk destroyer" which could erase a floppy in abour 6 seconds so the most dedicated of disk recovery progs couldnt recover it. I still don't know what I did wrong properly :D

I learned assembly on the zx81, all those typing in of funny char's after discovering the ansi char for each mnemonic... After that the 64 was easier, but the amiga was just so easy in comparison... all those lovely longwords and stuff... For the first few months I had no compiler, I used to just edit the address space with the instructions and set it as the jump point for the memory monitor. Didnt know better, it was how we'd done stuff on the zx81...


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

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.04753 seconds with 11 queries