Skip to main content
Knowledgebase
Home
Renesas India - Knowledgebase

How to set a value to the OFS1 using the M3T-NC30WA?

Latest Updated:02/27/2012

Question:

Please tell me how to set a value to the option function select register (OFS1) using the M3T-NC30WA.

Answer:

There are two methods for setting the option function select register using the C compiler package M3T-NC30WA:

  1. Using assembler directive command .PROTECT
  2. By assembly programming

A. Using the assembler directive command called extended function directive command .PROTECT.

Example: Setting 0FEh in the option function select register

.org 0FFFFCh

RESET:

.lword start

.PROTECT 0FEh

B. By assembly programming

The following two examples show how to write a value to the option function select register in the program.

Example: Setting 0FEh in the option function select register

  1. Example of using address control directive command .LWORD and logical ORs
    .org 0FFFFCh
    
    RESET:
    
    .lword start | 0FE000000h
    
  2. Example of using address control directive command .ADDR
    .org 0FFFFCh
    
    RESET:
    
    .addr start
    
    .byte 0FEh
    
Suitable Products
M16C/62A
M16C/62N
M16C/62P
M16C/63
M16C/64A
M16C/64C
M16C/65
M16C/65C
M16C/6C
M16C/6N4, M16C/6N5
M16C/6NK, M16C/6NL, M16C/6NM, M16C/6NN
M16C/5L, M16C/56
M16C/5LD, M16C/56D
M16C/5M, M16C/57
M16C/30P
M16C/29
M16C/28
M16C/26A