07 May 2019, 06:47 | #1 |
Moon 1969 = amiga 1985
Join Date: Apr 2007
Location: belgium
Age: 48
Posts: 3,913
|
help learning asm, needed ??
Could someone give a little test to do in asm, i mean a little code to make this or that, something easy with some explanations.
I mean really easy, for exemple how to write a tiny txt on screen. Or something else, something which could help a totaly noob to understand ASM. I know there is books, i have books about ASM but it's not enough for me. It could help me and others to begin to understand how works ASM. If someone is ok to give it a try ??? ps: There is so much users who would like to product new stuffs for the amiga but need a little help to start. Please help |
07 May 2019, 07:34 | #2 | ||
Registered User
Join Date: Feb 2010
Location: Espoo / Finland
Posts: 820
|
Quote:
Quote:
|
||
07 May 2019, 07:43 | #3 |
Registered User
Join Date: Feb 2008
Location: RNO
Posts: 1,007
|
Here's another article that came in my mind: https://www.reaktor.com/blog/crash-c...y-programming/
|
07 May 2019, 10:52 | #4 |
Registered User
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 41
Posts: 3,773
|
Writing text on the screen is not so simple on the Amiga! Maybe try writing some simple copperlists, opening/closing libraries, etc.
|
07 May 2019, 11:45 | #5 | ||
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,436
|
Quote:
Quote:
Once you do that, look at your current level of knowledge of programming. If you're an absolute beginner, assembly is not a great place to start and you might want to get some experience in other languages (particularly, try to do some C at one point) first to get to understand the basics. When beginning, there are (IMHO!) two routes: focus on the 68000 first, focus on the Amiga hardware first. Choose one based on your level of knowledge and the 'why' you want to do this. The former means mostly mucking about under the OS trying out how to build algorithms in assembly, what works and what doesn't and getting to know how the processor addressing modes all work. The latter means poking around in the custom chip set and lots of reading/trying stuff based on the HRM and learning 68000 coding as and when you need it for accessing the hardware. Both have their pro's and con's. Both take quite a bit of time. Good luck |
||
07 May 2019, 22:14 | #6 |
Zone Friend
Join Date: Mar 2004
Location: Middle Earth
Age: 40
Posts: 2,127
|
turrican3: There are some tutorials on flashtro.com website which sets up the screen and writes text. The tutorials hit the hardware directly.
On Aminet.net in /dev/asm there is a Amiga assembler tutorial by a belgian called cool-g (In English tho.) http://aminet.net/dev/asm/AsmCourseSrc1.lha and http://aminet.net/dev/asm/Asm_course.lha Hope they help. |
07 May 2019, 22:57 | #7 |
Registered User
Join Date: Jun 2018
Location: Victoria, Canada
Age: 56
Posts: 134
|
Way, way back when I started assembly, a book I found good as a starting point to try to understand the basics of assembly on the 68000 series is Assembly Language Programming for the 68000 by Thomas Skinner. It includes examples for the Amiga.
|
08 May 2019, 15:55 | #8 |
Registered User
Join Date: May 2018
Location: Chester, UK
Posts: 15
|
If you're wanting to get text onto the screen just as a means of helping you learn assembler, then it's easy to get text back out to the console from which you launched your program - you can do that in a handful of lines of code.
If you want to set-up a screen of your own choosing (resolution, palette etc) and *draw* text to it, that's a different matter. I think you need to decide what you specifically want to do to begin with, break it down as much as possible and then review what individual things you're going to need to learn in order to do it. I'm partway through this process myself, I've got ANSI text in a console and simple bleeps out of Paula, my next steps are to take over the screen and draw some bitmap data. The advice above about concentrating on either the 68k or the hardware is quite good I think - I thought I could treat it all as one but quickly realised that I wasn't really understanding the examples (mind you, I'm getting old so it's taking longer than it might have done a decade ago). So I accepted there was no 'quick route', and started learning more about the basic 68k stuff, as opposed to the Amiga hardware. And now I have a very rudimentary grasp of basic 68k stuff, the hardware examples are making a bit more sense. Just my experience with it, anyway. |
08 May 2019, 16:49 | #9 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,488
|
Do you want to write something on the Amiga screen?
Excellent, why not use asm code that call BCPL environment? Take this message as a joke, but in effect the TRIPOS/BCPL legacy framework is still here and works flawlessy... Code:
; BCPL initial environment ; a1 - base of the current BCPL stack frame ; a2 - pointer to the BCPL Global Vector ; a3 - return address of the caller ; a4 - entry address ; a5 - pointer to a "caller" service routine ; a6 - pointer to a "returner" service routine lea (stxt,pc),a0 moveq #32,d0 ;amount of global area move.l a0,d1 ;&buf moveq #etxt-stxt,d2 ;length movea.l ($AC,a2),a4 ;entry [$AC=writeoutput(d1,d2)] jsr (a5) ;"caller" service routine moveq #0,d0 ;DOS return code rts stxt dc.b "Hello, world :)",$0a etxt |
08 May 2019, 17:20 | #10 | |
Registered User
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 720
|
Quote:
|
|
08 May 2019, 18:04 | #11 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,488
|
Quote:
Probably in some VERY old document (or a KS resource) you can find what's the minimum usable for every internal call. I've simply used a conservative value. service init in KS1.3 is: Code:
; a1 - base of the current BCPL stack frame MOVEM.L A1/A3-A4,(-$C,A1,D0.L) Certainly therefore a low limit under which not to go. Then the frame is advanced: ADDA.L D0,A1 and after a 'standard' push of registers on stack: MOVEM.L D1-D4,(A1) Further on: Code:
MOVEQ #$20,D0 MOVEA.L ($108,A2),A4 JSR (A5) I simply noticed this and used (anyway you can find this value in old BCPL programs before writeoutput usage). A long time ago I checked out what the various calls were doing (the documentation is poor and in theory the direct use of the framework is deprecated, but maintained for compatibility in every KS). You may wonder why I had done such a thing .. well, there was a reason, but this is another story Last edited by ross; 08 May 2019 at 18:51. Reason: added some comments |
|
08 May 2019, 18:59 | #12 | |
Registered User
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 720
|
Quote:
|
|
08 May 2019, 19:27 | #13 |
Amigan
Join Date: Feb 2012
Location: London
Posts: 1,316
|
Mine was 68008 assembly for the Sinclair QL. I didn't have a QL but my library had this book. That and a hardware guide (not the official one) and a copy of Devpac was all I needed.
|
08 May 2019, 21:00 | #14 |
Registered User
Join Date: Dec 2014
Location: France
Posts: 104
|
|
09 May 2019, 03:20 | #15 |
Registered User
Join Date: Nov 2017
Location: Amiga Kingdom
Posts: 368
|
turrican3, the "shortcut" you are looking for is a longways from being finished (currently in development, but well worth the wait I would argue). That only leaves you with the slow and laborious method at the moment.
1. Asm One 1.02 Manual (OR) Dev Pac V3.00 Manual 2. Amiga Machine Language by Stefan Dittrich (OR) Amiga Machine Language Programming Guide by Daniel Wolf & Leavitt Douglas 3. Amiga Hardware Reference Manual (OR) = Take your pick, doesn't really matter at this point. What was said in the first reply is spot-on. |
09 May 2019, 15:05 | #16 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,537
|
Quote:
Today I cannot recommend it, because of really bad code and assemblers (K-SEKA!) used in it. My first programs looked like in the book and stopped working after my A1000 got Fast-RAM. |
|
09 May 2019, 15:32 | #17 | |
Ex nihilo nihil
Join Date: Oct 2017
Location: CH
Posts: 4,995
|
Quote:
Which book would you recommend to OP then ? |
|
09 May 2019, 17:22 | #18 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,537
|
All books are obsolete. Photon's Youtube tutorials are quite good, or maybe some other recent tutorial on the net, which was mentioned here. But don't start with the mistakes from 30 years ago. I doubt the OP wants to spend a few decades to learn it, like we did...
|
10 May 2019, 00:04 | #19 |
Moon 1969 = amiga 1985
Join Date: Apr 2007
Location: belgium
Age: 48
Posts: 3,913
|
What i would like to do with asm ?? Simple :
Help jotd to make some cd32 slaves to make cd32 cdda games. Making some demos, a game if possible. I don't want to code on pc, the only computer i want to code is the amiga. ASM is a dream, this is the magical coding on the amiga. I would like to give back something to the amiga community, and coding something is the best way to do it. (i have no money. ;-) I will have a look to all the books and stuffs you showed me. If you have anything more to help me, you are welcome. |
10 May 2019, 17:50 | #20 |
Registered User
Join Date: Sep 2014
Location: Poland
Posts: 175
|
I've read dozens of asm books but I learned nothing, until I've read this -> http://chaozer.ikod.se/asmtut.shtml. But this is only step 1, you need step 2, so I would recommend one of the suggestions above, especially look for something which teach you asm+os coding. Good luck!
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Tool to convert asm to gnu asm (gas) | Asman | Coders. Asm / Hardware | 13 | 30 December 2020 11:57 |
Learning C | nobody | Coders. C/C++ | 28 | 15 June 2016 08:07 |
I need help with my intro... I´m learning... | Skillion76 | Coders. General | 10 | 27 September 2014 17:36 |
Wanting to start learning to code amiga in asm | fishyfish | Coders. Asm / Hardware | 5 | 03 March 2012 06:11 |
Help needed!!Random octal numbers generator(asm) | sheryn88 | Coders. General | 6 | 01 August 2010 07:19 |
|
|