English Amiga Board


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

 
 
Thread Tools
Old 16 February 2024, 11:11   #1
Edders
Registered User
 
Edders's Avatar
 
Join Date: Oct 2018
Location: Worcester, UK
Posts: 33
Multi line statments

Hello all!

I'm having a long list of IDCMP tags that are ORed together as follows:
Code:
DC.L    WA_IDCMP,IDCMP_CLOSEWINDOW|IDCMP_MENUPICK|IDCMP_RAWKEY|IDCMP_REFRESHWINDOW|BUTTONIDCMP|CYCLEIDCMP
But I'd like to split this DC.L statement into multiple lines like for example:
Code:
DC.L    WA_IDCMP,IDCMP_CLOSEWINDOW|IDCMP_MENUPICK| /
                IDCMP_RAWKEY|IDCMP_REFRESHWINDOW|BUTTONIDCMP|CYCLEIDCMP
But that confuses DevPac as well as Asm-Pro. Is there something like this possible in 68k assembler?
Edders is offline  
Old 16 February 2024, 11:44   #2
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,335
That may well depend on the used asm, but if there is no support for multi-line i'd do something like that :
Code:
idcmp set IDCMP_CLOSEWINDOW|IDCMP_MENUPICK|IDCMP_RAWKEY
idcmp set idcmp|IDCMP_REFRESHWINDOW|BUTTONIDCMP|CYCLEIDCMP
 dc.l WA_IDCMP,idcmp
meynaf is offline  
Old 15 March 2024, 19:27   #3
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,629
In AsmOne/Two/Pro, lines longer than 80 characters are supported. So even if the whole line doesn't fit on the screen, it should still assemble correctly. You can temporarily write the statement as multiline, then press backspace on the extra lines.

These Assemblers also support symbol: SET value. If the symbol is uniquely named, you can also use EQU or =, and in many Assemblers you can declare a local symbol with the prefix ".".

Meynaf's example could be shortened to two lines.

If you use some symbols a lot, consider abbreviating them in an include. (This also saves on typing.)
Photon is offline  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi-Monitor Multi-RTG cards issue? Tumo007 support.WinUAE 2 30 December 2021 22:11
Blitting BOBs line by line aros-sg Coders. Asm / Hardware 5 22 December 2021 09:36
Heureka / Klett Red Line / Orange Line English education TTSAddict request.Apps 4 17 September 2017 14:15
Understanding the (in)famous copper's lost cycle (PAL all line, NTSC short line). ross Coders. Asm / Hardware 10 13 March 2017 17:50
Keep Active control panel "Line Mode" and "Interlaced Line Mode" Zilog request.UAE Wishlist 4 02 August 2014 23:08

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:18.

Top

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