Total members 11892 |It is currently Sat Jul 27, 2024 6:39 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





Control Directives usage PIC assembly
Code:
if <expr> ; directives for conditional assembly
else
endif
Example.
if version == 100
movlw D’10’
movwf io1,A
else
movlw D’26’
movwf io2,A
endif
end ; indicates the end of the program



#include “<include_file>” (or #include <include_file>)
#include “lcd_util.asm” ; include the lcd_util.asm file from current directory
#include <p18F8680.inc> ; include the file p18F8680.inc from the installation
; directory of mplab.
radix <default_radix>
  • sets the default radix for data expression
  • the default radix values are: hex, dec, or oct
radix dec ; set default radix to decimal

[<label>] code [<ROM address>]
  • Declares the beginning of a section of program code.
  • If no label is specified, the section is named “.code”.
  • The starting address of the section is either included in the directive or
    assigned at link time if not specified in the directive.
Code:
reset code 0x00
goto start
#define <name> [<string>] ; defines a text substitution string
#define loop_cnt 30
#define sum3(x,y,z) (x + y + z)
#define seed 103
#undefine <label> ; deletes a substitution string



Code:
#include “<include_file>” (or #include <include_file>)
#include “lcd_util.asm” ; include the lcd_util.asm file from current directory
#include <p18F8680.inc> ; include the file p18F8680.inc from the installation
; directory of mplab.

radix <default_radix>
  • sets the default radix for data expression
  • the default radix values are: hex, dec, or oct
radix dec ; set default radix to decimal



_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : Control Directives usage PIC assembly
 Object File Directives Usage PIC Assembly     -  
 TEMPERATURE AND HEAT CONTROL Assembly     -  
 Motor DC Speed Control by switching ON and OFF Assembly     -  
 Infra Read Sensor to Control DC motor Assembly     -  
 macro usage PIC assembly     -  
 assembler directives types     -  
 PIC Assembly For Loop Example     -  
 multiply two numbers in PIC assembly     -  
 playfair cipher assembly code     -  
 MULTIPLEXING Seven SEGMENT DECODER Assembly     -  



cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com