![]() |
![]() |
#21 |
Oldskool
Join Date: Dec 2005
Location: Norway
Age: 52
Posts: 28
|
Thanx alot Ray, I will download it right away :-)
|
![]() |
![]() |
#22 |
Zone Friend
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 424
|
Thanks Ray, checked it out on an original AMIGA.
![]() |
![]() |
![]() |
#23 | |
Registered User
Join Date: Mar 2006
Location: Germany
Posts: 899
|
Quote:
|
|
![]() |
![]() |
#24 | |
Registered User
Join Date: Aug 2004
Location: Poland
Posts: 142
|
Quote:
/PhxAss/Examples/DemoSupp.asm Very good example. |
|
![]() |
![]() |
#25 |
Registered User
Join Date: Aug 2004
Location: Poland
Posts: 142
|
Here is altered example to one posted by x_to.
Now it compiles fine under vasm. Code:
; ; Copper-Demo ; CUSTOM = $dff000 CIAA = $bfe001 COP2LC = $084 DMACON = $096 INTENA = $09a section "code123",code lea CUSTOM,a6 move.w #$4000,INTENA(a6) ;disable Interrupts move.w #$0020,DMACON(a6) ;disable Sprites move.l #copperl,COP2LC(a6) ;activate Copperlist loop: btst #6,CIAA ;loop unil mousebutton bne.s loop ;is pressed move.w #$8220,DMACON(a6) ;enable Sprites move.w #$c000,INTENA(a6) ;enable Interrupts rts nop ;ignore me section "data123",data,chip copperl: dc.w $008e,$3081 ;DIWSTRT dc.w $0090,$35c1 ;DIWSTOP dc.w $0104,$0064 ;BPLCON2 dc.w $0092,$0038 ;DDFSTRT dc.w $0094,$00d0 ;DDFSTOP dc.w $0102,$0000 ;BPLCON1 dc.w $0108,$0000 ;BPL1MOD dc.w $010a,$0000 ;BPL2MOD dc.w $0100,$1200 ;BPLCON0 dc.w $00e0,$0005 ;BPL1PTH dc.w $00e2,$0000 ;BPL1PTL dc.w $0180,$0000 ;COLOR00 ; read this http://eab.abime.net/showthread.php?t=21866 ; and have fun dc.w $a051,$fff0 dc.w $0180,$0090 dc.w $a0b1,$fff0 dc.w $0180,$0000 dc.w $ffff,$fffe ;Copperlist end |
![]() |
![]() |
#26 |
Registered User
Join Date: Sep 2006
Location: Norwich, UK
Posts: 57
|
just to jump in.. i used to HATE reading code where the author had written all the hardware addresses and bitflags by hand! There's just no need for it... it's easy to get the include files and do .include "hardware.i" at the top of your source. Especially if its example code for someone to read.
I never liked not using the relative address mode for writing to hardware regs either, especially the $DFF000 range. |
![]() |
![]() |
#27 |
Wannabe asm coder ;)
Join Date: May 2002
Location: The Netherlands
Age: 47
Posts: 459
|
how right you are... for once i'd like to see some code that actually uses the NDK... they didn't release those for nothing!
|
![]() |
![]() |
#28 | |
RasterSoft Dev
|
Quote:
In C/C++ you can do ptr++, and it will increment depending on the size of the pointer (ie an 'long *' will increment 4 bytes on a 32 bit system). In ASM, you have to increment the pointer by the size of the data, unless you use move.l (a0)+, (a1)+ Also, I wouldn't necessary worry about learning the entire instruction set, learn the load/store (move), branching (bne, jsr, etc) and compare (cmp) instructions (inc/dec are important on other chips). Then, keep an instruction set sheet handy for the test, asl, shr, etc type instructions. After using ASM for awhile, you will get used to these instructions. Learn to use a debugger. Running code through a debugger can teach you more than reading tutorials or instruction sets. MESS is a nice debugger, but is a pain to use with amiga executables. It's hard to find the address where the executable loaded. But, once found, it usually remains the same (assuming you're loading the executable before workbench starts or automatically on boot). Is there an easy way to determine where an executable will load to? |
|
![]() |
![]() |
#29 |
Registered User
Join Date: Sep 2006
Location: Norwich, UK
Posts: 57
|
I had 2 sheets of A4 paper with the 68000 instruction set, condition codes and such on it which I kept to hand. I think I got it from Aminet. Later on I downloaded an AmigaGuide file which had a full run-down of 68000 and some 020 instructions to refer to. I formatted and printed it out into an A4 binder file
![]() Debuggers - can't really recommend anything here as I was used to RossiMon, and then MonAm3. Both are rather unfriendly, especially MonAm3 which is totally keyboard shortcut driven. I don't know if it's still maintained but PowerVisor looked good too. You can't really determine where your executable will be loaded... this is entirely up to AmigaDOS' LoadSeg() function which loads your executable. You can use the SECTION directive of the assembler to guarantee your code/data/whatever will load into a particular type of ram, though. (wow... I pulled out some memories there.. I haven't written any asm on the amiga in at least 8 years!) |
![]() |
![]() |
#30 | |
Posts: n/a
|
Quote:
Jim |
|
![]() |
#31 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
it'll be on the ndk
![]() |
![]() |
![]() |
#32 |
Moderator
|
|
![]() |
![]() |
#33 |
Posts: n/a
|
Quote "I have NDK's 1.2 and 2.1.."
Sorry, of course I meant the Developer CD's (I thought you 'experts' would have known that ![]() Jim |
![]() |
#34 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
Hey Jim, I guess you needed hardware.i for sp's c2p.
![]() ![]() ![]() |
![]() |
![]() |
#35 |
Posts: n/a
|
stingray: Yep, that's what kicked it off. I was using hardware/custom.i but was having to change all the blitter equates so rather than hard code a load of equates or build a custom include file it seemed easier to get hardware.i (and I wanted to check for any 'variations' from the standard as sometimes creep in). It's sorted now thanks to your revised source but I'm still curious about hardware.i - why is it even necessary if all the equates are in the standard hardware/custom.i etc? Is it an assembler-specific issue?
|
![]() |
#36 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
Well, to be honest, I never used includes when I needed to access hardware regs, for me it's just way more comfortable to write move.w #(256<<6)|20,$58(a6) if I want to start a blit f.e.
![]() ![]() ![]() ![]() |
![]() |
![]() |
#37 |
Posts: n/a
|
Yeah, I guess, I was just looking to save some time (and perhaps trouble) in order to focus on getting a clean compile and thought there might have been some tricks and/or traps in there e.g. Devpac throws a wobbly when you try to 16-bits test an 8-bit location in the WAITBLITTER routine (btst #14, $dff002) but ASM-Pro and ASM-One don't even bat an eyelid - heh - just thought, for all that hardware.i stuff and he doesn't even use 'dmaconr' anyway
![]() Last edited by jima; 27 February 2007 at 18:25. |
![]() |
#38 | |
Posts: n/a
|
Quote:
![]() |
|
![]() |
#39 |
Posts: n/a
|
Only place i got Hardware.i was from "The hardware reference manual" that i had to type out myself...
That was 10+ years ago thou so i may be wrong lol |
![]() |
#40 |
Moderator
Join Date: Jan 2003
Location: ...
Age: 52
Posts: 1,838
|
OS/hw header files all came from C= bundled with development software and hardware.
You could also get them from CATS. SAS/C and Devpac are just two examples where the original package contains all the necessary header files. These header files were also available with some book (don't remember which one, probably RKM or HRF) and were part of some PD discs too. C= was quite happy to distribute them in any way that was possible at the time, so feel free to get them. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Rainboot 2.9 prog | Rod_cl | request.Apps | 4 | 26 February 2019 17:02 |
Viewer Prog | AlfaRomeo | request.Apps | 4 | 24 August 2008 02:38 |
Best prog to scan floppys? | Eny- | support.Apps | 10 | 04 August 2004 21:42 |
Snoopdos prog | stainy | request.Apps | 3 | 04 April 2004 00:09 |
Need prog! | Time Bandit | Retrogaming General Discussion | 6 | 20 November 2002 22:28 |
|
|