Thank you all,
I now understand that for HC08 the accumulator is 8 bit width and each address is 16 bit width.
I encounter another problem. please take a look at my code below
DATA_RISE: equ $00000107
DATA_OVFL: equ $00000113 ;RAMStart+19
DATA_CNTL: equ $00000118 ;RAMStart+24
; data sample control
org DATA_CNTL
sp_num_now: rmb 1 ; quantity of captured samples in BYTE
sp_num_req: rmb 1 ; quantity of needed sampels in BYTE, 6 samples equal 12 bytes.
ov_num_req: rmb 1 ; overflow data number requirement
temp1: rmb 1 ; temperary data station
Init_data: ; subroutine to initiate variables
mov #12,sp_num_req
mov #0,sp_num_now
mov #0,temp1
.........
when simulating with CW, there was a warning of " A13003: Value is truncated to one byte" and this warring was located at at line of
"mov #12,sp_num_req "
I checked the the instruction of RMB in HC08ASMRM.pdf. But didnot find a solution. Please help check this problem.
Thanks!
zen