$ASM

Aus MCS Wiki AVR
(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
(Created page with "= <span class="f_Header">Action</span><br/> = Start of inline assembly code block. <span style="font-family: 'Arial'; color: #000000"> </span> <span style="font-famil...")
 
(Remarks)
 
(Eine dazwischenliegende Version von einem Benutzer wird nicht angezeigt)
Zeile 17: Zeile 17:
 
= <span class="f_Header">Remarks</span><br/> =
 
= <span class="f_Header">Remarks</span><br/> =
  
Use $ASM together with $END ASM to insert a block of assembler code in your BASIC code. You can also precede each line with the&nbsp;! sign.
+
Use $ASM together with $END ASM to insert a block of assembler code in your BASIC code. You can also precede each line with the&nbsp;'''!''' sign.
  
Most ASM mnemonics can be used without the preceding&nbsp;! too.
 
  
<span style="font-family: 'Arial'; color: #000000">&nbsp;</span>
+
<span style="font-family: 'Arial'; color: #000000">&nbsp;</span>
  
See also the chapter [[Mixing_BASIC_and_Assembly|Mixing BASIC and Assembly]] and [[Assembler_mnemonics|Assembler mnemonics]]
+
See also the chapter [[Mixing_ASM_and_BASIC|Mixing BASIC and Assembly]] and [[Assembler mnemonics|Assembler mnemonics]]
  
<span style="font-family: 'Arial'; color: #000000">&nbsp;</span>
+
<span style="font-family: 'Arial'; color: #000000">&nbsp;</span>
  
<span style="font-family: 'Arial'; color: #000000">&nbsp;</span>
+
<span style="font-family: 'Arial'; color: #000000">&nbsp;</span>
  
 
= <span class="f_Header">Example</span><br/> =
 
= <span class="f_Header">Example</span><br/> =

Aktuelle Version vom 17. Januar 2017, 19:58 Uhr

Inhaltsverzeichnis

Action

Start of inline assembly code block.

 

 

Syntax

$ASM

 

 

Remarks

Use $ASM together with $END ASM to insert a block of assembler code in your BASIC code. You can also precede each line with the ! sign.


 

See also the chapter Mixing BASIC and Assembly and Assembler mnemonics

 

 

Example

Dim C As Byte
 
Loadadr C , X 'load address of variable C into register X
 
$asm
Ldi R24,1 ; load register R24 with the constant 1
St X,R24 ; store 1 into variable c
$end Asm
Print C
End

Languages   English Deutsch  
Meine Werkzeuge
Namensräume
Varianten
Aktionen
Navigation
In anderen Sprachen
Sprache