Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Changes in BASCOM AVR compared to BASCOM-8051

Status
Not open for further replies.

Navid T

Full Member level 3
Joined
Jan 21, 2005
Messages
186
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,296
Location
Iran
Activity points
1,385
shift bit bascom

hello
is any different between bascom51 instructions and bascome AVR instructions?
Thank you
 

Re: bascom

I think no.
 

Re: bascom

hello
i understand that its different only in registers and port and only some of instructions are different but they have similar instructions.
thank you
 

Re: bascom

Changes in BASCOM AVR compared to BASCOM-8051

The design goal was to make BASCOM-AVR compatible with BASCOMVer.
1.11.6.3 BASCOM-AVR Page 390 of 420
8051.
For the AVR compiler they had to remove some statements.
New statements are also added. And some statements were changed.
They need specific attention, but the changes to the syntax will be made
available to BASCOM-8051 too in the future.
Statements that were removed
STATEMENT DESCRIPTION
$LARGE Not needed anymore.
$ROMSTART Code always starts at address 0 for the AVR. Added again in 1.11.6.2
$LCDHEX Use LCD Hex(var) instead.
$NOINIT Not needed anymore. Added in 1.11.6.2
$NOSP Not needed anymore
$NOBREAK Can't be used anymore because there is no object code that can be used for it.

$OBJ Removed.
BREAK Can't be used anymore because there is no object code that can be used for it.

PRIORITY AVR does no allow setting priority of interrupts
PRINTHEX You can use Print Hex(var) now
LCDHEX You can use Lcd Hex(var) now
Statements that were added
STATEMENT DESCRIPTION
FUNCTION You can define your own user FUNCTIONS.
LOCAL You can have LOCAL variables in SUB routines or FUNCTIONS.

^ New math statement. Var = 2 ^ 3 will return 2*2*2
SHIFT Because ROTATE was changed, I added the SHIFT statement.
SHIFT works just like ROTATE, but when shifted left, the LS BIT is
cleared and the carry doesn't go to the LS BIT.
LTRIM LTRIM, trims the leftmost spaces of a string.
RTRIM RTRIM, trims the rightmost spaces of a string.
TRIM TRIM, trims both the leftmost and rightmost spaces of a string.
Ver. 1.11.6.3 BASCOM-AVR Page 391 of 420
Statements that behave differently
STATEMENT DESCRIPTION
ROTATE Rotate now behaves like the ASM rotate, this means that the carry will go to the most significant bit of a variable or the least significant bit of a variable.

CONST String were added to the CONST statement. I also changed it to be compatible with QB.

DECLARE BYVAL has been added since real subprograms are now supported.
DIM You can now specify the location in memory of the variable.
Dim v as byte AT 100, will use memory location 100.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top