Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

ASM start character !

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
altron

Bascom Member



Joined: 10 Mar 2008
Posts: 10

australia.gif
PostPosted: Thu Jan 18, 2018 9:10 am    Post subject: ASM start character ! Reply with quote

Hi all

I have just upgrade from version 2.0.79 to 2.0.8.1.

I am getting errors compiling any previously used code with ASM in it.

After a bit of reading I see that in version 2.0.8.0 there was a change to the way ASM is written in any bascom file.

The trouble for me is that some of the files I use like LCD driver code (such as ili9341) that has a lot of lines of ASM.

Do I need to go through all these files and put a ! at the start of each ASM line?

Any way I can get around this?

Thanks.

Altron.

(BASCOM-AVR version : 2.0.8.1 )
Back to top
View user's profile
laborratte

Bascom Expert



Joined: 27 Jul 2005
Posts: 299
Location: Berlin

germany.gif
PostPosted: Thu Jan 18, 2018 1:48 pm    Post subject: Reply with quote

You can enclose blocks of assembler code in the
Code:
$asm
...
$end asm
directives. See help.
Back to top
View user's profile
altron

Bascom Member



Joined: 10 Mar 2008
Posts: 10

australia.gif
PostPosted: Fri Jan 19, 2018 1:45 am    Post subject: Reply with quote

I have gone through and put ! in front of all lines in the .inc file.

It has a compile error on lines that already started with a !. There is now two ! at the start of some lines.

The line reads now reads !!OUT LCD_CTRL_PORT, R16 and gives errors.

Error : 215 Line : 652 Unknown ASM mnemonic [!OUT LCD_CTRL_PORT, R16] , in File : Ili9341_inc for A4275NG ASM FIXED.inc

Should there be only one ! and never double up.

What does the original ! do in ASM?

Thanks
Back to top
View user's profile
EDC

Bascom Expert



Joined: 26 Mar 2014
Posts: 971

poland.gif
PostPosted: Fri Jan 19, 2018 3:01 am    Post subject: Reply with quote

In ASM ! does not mean nothing. Exclamation mark in Bascom code means ASM instructions..for compier(you want to use ASM and you know what you`re doing)
Asm instructions you can read in the Atmel notes Very Happy Some of the procesors have them >130 some of them have them less like Attiny (for example they dont have hardware multiplying(I was read this somewhere, I can be wrong))

In the another way *Basic in the libraries means basic language...

My advice is: If you want to run code that works on the previous version you should click on the every error code and fix it then CTRL + S
This will adapt library to the new compiler.

Do you use Code Explorer?
Back to top
View user's profile Visit poster's website
altron

Bascom Member



Joined: 10 Mar 2008
Posts: 10

australia.gif
PostPosted: Fri Jan 19, 2018 6:55 am    Post subject: Reply with quote

Thanks

Looking at the HELP in the older versions it recommends to have a ! at the start but it wasn't required to compile.

I guess thats why there is some ASM with ! at the start and some without.

I tried converting all double !! to single ! and it compiles and works.

I dont use code explorer. Should I be?
Back to top
View user's profile
altron

Bascom Member



Joined: 10 Mar 2008
Posts: 10

australia.gif
PostPosted: Fri Jan 19, 2018 7:34 am    Post subject: Reply with quote

I lied, I do use code explorer.

Doesn't seem to work on .INC files.

Good for .BAS.
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5921
Location: Holland

blank.gif
PostPosted: Fri Jan 19, 2018 1:07 pm    Post subject: Reply with quote

Code explorer works on INC files but only in project mode.
_________________
Mark
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum