English Amiga Board


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

 
 
Thread Tools
Old 30 January 2020, 19:33   #1
rcman
Long time Amiga Owner

rcman's Avatar
 
Join Date: Jun 2017
Location: Uxbridge Canada
Age: 52
Posts: 167
Why doesn't DevPac recognize vectors: BLK.L 6

I am sure this have been posted before. While trying to do a compile it says that

vectors: BLK.L 6

Instruction is not recognized.

This as well

sprite2: ;Address must be 64-bit aligned
BLK.B (SPRITE_DY+2)*16,0


Thanks
RC
rcman is offline  
Old 30 January 2020, 20:13   #2
Galahad/FLT
Going nowhere

Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 46
Posts: 7,515
change blk.l to dc.l

change blk.b to dc.b
Galahad/FLT is offline  
Old 30 January 2020, 20:22   #3
rcman
Long time Amiga Owner

rcman's Avatar
 
Join Date: Jun 2017
Location: Uxbridge Canada
Age: 52
Posts: 167
Quote:
Originally Posted by Galahad/FLT View Post
change blk.l to dc.l

change blk.b to dc.b
Thank you so much!

RC
rcman is offline  
Old 30 January 2020, 20:40   #4
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,697
errr I think you mean DS.L, and DS.B. DC.L and DC.B just declare one value, not the number in argument.
jotd is online now  
Old 30 January 2020, 20:58   #5
ross
Per aspera ad astra

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 49
Posts: 2,472
I think Phill meant dcb.l (or .b)
ross is offline  
Old 30 January 2020, 20:59   #6
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 47
Posts: 3,701
BLK is really neither DC (single constant) nor DS (define storage). It is a constant block (equivalent to DS if the constant value is 0).
For Devpac you can use DCB directive instead. Assemblers such as Phxass accept both directives.

But it's probably not what is meant in the provided code example, where DS would work just fine.
meynaf is offline  
Old 30 January 2020, 21:01   #7
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,697
using dc.b or dc.l would assemble, but would fail with strange errors because the data size will be too small. The joys of assembly...
jotd is online now  
Old 30 January 2020, 21:09   #8
rcman
Long time Amiga Owner

rcman's Avatar
 
Join Date: Jun 2017
Location: Uxbridge Canada
Age: 52
Posts: 167
Okay I fixed the one problem but I cannot use ds.b here it gives me an Illedgal Operand and if I use dc.b it gives me Out of Range 8 Bit


sprite2: ;Address must be 64-bit aligned
dc.b (SPRITE_DY+2)*16,0
sprite3: ;Address must be 64-bit aligned
dc.b (SPRITE_DY+2)*16,0
sprite4: ;Address must be 64-bit aligned
dc.b (SPRITE_DY+2)*16,0
sprite5: ;Address must be 64-bit aligned
dc.b (SPRITE_DY+2)*16,0
sprite6: ;Address must be 64-bit aligned
dc.b (SPRITE_DY+2)*16,0
sprite7: ;Address must be 64-bit aligned
dc.b (SPRITE_DY+2)*16,0
spriteVoid: ;Address must be 64-bit aligned
dc.b 16,0
palette:
DC.W $0000, $0000

RC
rcman is offline  
Old 30 January 2020, 21:16   #9
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,697
dc.b is INCORRECT. Fortunately it doesn't work because the size is higher than 255 and the assembler detects an overflow (dc.b is made to declare constants: for instance if I want to define a table with 1,2,3,4 I just do dc.b 1,2,3,4). You can't reserve 200 bytes with dc.b, unless you copy and paste 0 200 times.

Use dcb.b as noted in other posts.
jotd is online now  
Old 30 January 2020, 21:17   #10
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,602
See above. Either write
        dcb.b   (SPRITE_DY+2)*16,0

or
        ds.b    (SPRITE_DY+2)*16

"DS.B <n>" is effectively the same as "DCB.B <n>,0".

And make sure not to start the "DCB/DS" directive at the first column, otherwise it is regarded as a label.

Last edited by phx; 30 January 2020 at 21:18. Reason: EDIT: jotd has won! ;)
phx is offline  
Old 30 January 2020, 22:04   #11
Galahad/FLT
Going nowhere

Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 46
Posts: 7,515
Quote:
Originally Posted by ross View Post
I think Phill meant dcb.l (or .b)
He did, but he's a dick!
Galahad/FLT is offline  
Old 30 January 2020, 22:32   #12
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,697
a typo that could have cost millions of $ in debugging shame on you Phil
jotd is online now  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
A600 doesn't recognize CF-cards A500Fan support.Hardware 17 01 March 2020 21:34
Doesn't Blitz2 recognize IDCMP_IDCMPUPDATE event? peceha Coders. Blitz Basic 4 18 April 2019 14:36
Winuae doesn't recognize Doubleclick with Win7 user support.WinUAE 10 20 May 2018 22:40
iGame doesn't recognize two games... Xenon support.Apps 3 30 September 2009 18:54
GVP 040 Combo doesn't recognize SIMMs astuermer support.Hardware 9 28 May 2005 18:38

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 00:59.


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