📄 gw.ns
字号:
; LONNCC32 - Echelon (R) Neuron (R) C Compiler
; Copyright (c) 1989 - 2001 Echelon Corp
; All Rights Reserved.
; Assembly code from LONNCC32 Version 4.00.88
; Code generated from 'GW.NC' on Fri Dec 28 21:24:27 2007
SUBHEAD Generated from the input file: E:\LonWorks评估项目\software\gwfiles\gw\gw.nc
RADIX HEX
SEG EECODE_SPCL_1
ORG 0F000
NBMTS EQU 000
NFBS EQU 001
NNVS EQU 008
NALIAS EQU 00C
PROTECT EQU 00
RUNUNCNFGED EQU 00
NEURONID
RES 8
DIRECTORY EXPORT
DATA.B PTR TEVT-3*NNVS
PROTECTBIT EXPORT
DATA.B PROTECT+RUNUNCNFGED+NNVS,PTR SIDATA
PROGID EXPORT
DATA.B 09F,0FF,0FF,046,000,004,004,000
MODETABLE EXPORT
DATA.B 053
DATA.B 0F0,006
DATA.B 024,09B
BUFCOUNTS EXPORT
DATA.B 033,034,033
EENEARBYTES EXPORT
DATA.B 000
DATA.B 000,000
DATA.B 000,000,000
DATA.B 004 | _tx_by_addr
TX_CTRL EQU *-1
EXPORT TX_CTRL
SEG EECODE_SPCL_2
ORG
RODS2
DATA.B PROTECT+00+NALIAS,000
BRF _larva_entry
SEG EECODE_SPCL_3
ORG
LOCATION
RES 8
COMM
RES 10
MSG
RES 1
DOMAIN EXPORT
RES 01E
ADDR
RES 04B
TNVCNFG
RES 3*NNVS
TNVALIASES
RES 4*NALIAS
CONFIGCHECKSUM
RES 1
PAGE
; Boilerplate file for compiler-generated assembly output
; Copyright (c) 1990 - 2001 Echelon Corporation.
; All Rights Reserved.
; Date last modified: 08/13/01
; List of imported symbols - Library functions
IMPORT delay,random,reverse,scaled_delay
; List of imported symbols - Misc builtin function support
IMPORT _bcd2bin,_bin2bcd,_fblock_director,_sleep
; List of imported symbols - Compiler helper functions
IMPORT _abs8,_abs16,_add16,_add_8_16f,_adds_8_16,_and16,_alloc
IMPORT _bitf_sign_ext,_dealloc,_dec16,_div8,_div8s,_div16,_div16s
IMPORT _drop_n,_drop_n_preserve_1,_drop_n_preserve_2,_drop_n_return_1
IMPORT _drop_n_return_2,_eeprom_write,_eeprom_write_long
IMPORT _eeprom_far_write,_eeprom_far_write_long,_equal8,_equal16
IMPORT _gequ8,_gequ8s,_gequ16,_gequ16s,_get_sp,_inc16,_ldP0_fetchl
IMPORT _less8,_less8s,_less16,_less16s,_log8,_log16,_lognot8,_lognot16
IMPORT _l_shift8,_l_shift8s,_l_shift16,_l_shift16s,_l_shift8_3
IMPORT _l_shift8_4,_l_shift8_5,_l_shift8_6,_l_shift8_7,_lshift8_add16
IMPORT _lshift16_add16,_lshift8by1_add16,_lshift8by2_add16
IMPORT _max8,_max8s,_max16,_max16s,_min8,_min8s,_min16,_min16s
IMPORT _memcpy,_memcpy8,_memcpy16,_memset,_memset8,_memset16
IMPORT _minus16s,_mod8,_mod8s,_mod16,_mod16s,_mul8,_mul16,_mul_8_16
IMPORT _muls_8_16,_mul8l,_mul8ls,_not16,_or16
IMPORT _pop,_pop1,_popd,_popd1,_push,_push1,_pushd,_pushd1
IMPORT _r_shift8,_r_shift8s,_r_shift16,_r_shift16s
IMPORT _r_shift8_3,_r_shift8_4,_r_shift8_5,_r_shift8_6,_r_shift8_7
IMPORT _register_call,_sign_extend16,_sub16,_xor16
PAGE
; List of imported symbols - I/O functions
IMPORT _bit_input,_bit_output_lo1,_bit_output_lo2,_bit_output_hi
IMPORT _bitshift_input,_bitshift_output,_byte_input,_byte_output
IMPORT _dualslope_input,_dualslope_start,_edgelog_input
IMPORT _frequency_output,_i2c_read,_i2c_write,_ir_input
IMPORT _leveldetect_input,_magcard_input,_magt1_input,_magt2_input
IMPORT _muxbus_read,_muxbus_reread,_muxbus_write,_muxbus_rewrite
IMPORT _neurowire_master,_neurowire_slave,_neurowire_inv_master
IMPORT _neurowire_inv_slave,_nibble_input,_nibble_output
IMPORT _oneshot_output,_parallel_input,_parallel_input_ready
IMPORT _parallel_output,_parallel_output_ready,_parallel_output_request
IMPORT _period_input,_pulsecount_output,_pulsewidth_output
IMPORT _quadrature_input,_serial_input,_serial_output,_totalize_input
IMPORT _touch_bit,_touch_byte,_touch_first,_touch_next,_touch_read
IMPORT _touch_reset,_touch_write,_triac_level_output
IMPORT _triac_pulse_output,_wiegand_input
; List of imported symbols - I/O control functions
IMPORT io_edgelog_preload
IMPORT _init_baud,_init_timer_counter1,_init_timer_counter2
IMPORT _io_abort_clear,_io_change_init
IMPORT _io_direction_lo,_io_direction_hi,_io_input_value
IMPORT _io_set_clock,_io_set_clock_x2,_select_input_fn
; List of imported symbols - Messaging support
IMPORT _bound_mt,_msg_alloc,_msg_alloc_priority,_msg_cancel,_msg_free
IMPORT _msg_receive,_msg_send,_msg_auth_get,_msg_code_get
IMPORT _msg_duplicate_get,_msg_rcvtx_get
IMPORT _msg_data_blockget,_msg_data_get,_msg_len_get,_msg_service_get
IMPORT _msg_auth_set,_msg_code_set,_msg_data_blockset,_msg_data_set
IMPORT _msg_priority_set,_msg_service_set,_msg_tag_set,msg_tag_index
IMPORT _resp_alloc,_resp_cancel,_resp_free,_resp_receive,_resp_send
IMPORT _resp_code_set,_resp_data_blockset,_resp_data_set
; List of imported symbols - Network Variable support
IMPORT _bound_nv,_nv_array_poll,_nv_array_index
IMPORT _nv_array_update_request,nv_in_addr,nv_in_index,_nv_poll
IMPORT _nv_poll_all,_nv_update,_nv_update_int,_nv_update_int_offset
IMPORT _nv_update_long,_nv_update_long_offset
IMPORT _nv_update_request,_nv_update_request_all
PAGE
; List of imported symbols - Timer support
IMPORT _timer_get,_timer_off
IMPORT _timer_mset,_timer_mset_repeat,_timer_sset,_timer_sset_repeat
; List of imported symbols - Event support
IMPORT _io_changes,_io_changes_to,_io_changes_by,_io_update_occurs
IMPORT _flush_completes,_msg_arrives,_msg_code_arrives,_msg_completes
IMPORT _msg_fails,_msg_succeeds,_nv_array_update_completes
IMPORT _nv_array_update_fails,_nv_array_update_occurs
IMPORT _nv_array_update_succeeds,_nv_update_completes,_nv_update_fails
IMPORT _nv_update_succeeds,_nv_update_occurs,_offline,_online
IMPORT _resp_arrives,_timer_expires,_timer_expires_any,_wink
; List of imported symbols - Special symbols support
IMPORT _arb_presf,_idem_dup,_new_binding_constraints,_query_stats
IMPORT _tx_by_addr
; List of imported symbols - Debug kernel entries
IMPORT _larva_entry,_larva_entry_exec,_larva_entry_notify
IMPORT _larva_entry_min,_larva_reset
; End of boilerplate file
PAGE
IMPORT %cp_template_file
IMPORT %cp_modifiable_value_file
IMPORT %cp_readonly_value_file
IMPORT %cp_template_file_len_fake
IMPORT %cp_modifiable_value_file_len_fake
IMPORT %cp_readonly_value_file_len_fake
IMPORT %fblock_index_map
IMPORT set_nv_length
IMPORT get_nv_length
IMPORT get_nv_type
IMPORT %s32_zero
IMPORT %s32_one
IMPORT %s32_minus_one
IMPORT %s32_to_ascii
IMPORT %s32_from_ascii
IMPORT %s32_to_slong
IMPORT %s32_to_ulong
IMPORT %s32_from_slong
IMPORT %s32_from_ulong
IMPORT %s32_add
IMPORT %s32_sub
IMPORT %s32_mul
IMPORT %s32_div
IMPORT %s32_max
IMPORT %s32_min
IMPORT %s32_rem
IMPORT %s32_abs
IMPORT %s32_neg
IMPORT %s32_sign
IMPORT %s32_inc
IMPORT %s32_dec
IMPORT %s32_mul2
IMPORT %s32_div2
IMPORT %s32_rand
IMPORT %s32_eq
IMPORT %s32_ne
IMPORT %s32_gt
IMPORT %s32_lt
IMPORT %s32_ge
IMPORT %s32_le
IMPORT %s32_is_zero
IMPORT %s32_cmp
IMPORT %fl_error
IMPORT %fl_zero
IMPORT %fl_half
IMPORT %fl_one
IMPORT %fl_minus_one
IMPORT %fl_ten
IMPORT %fl_to_ascii
IMPORT %fl_to_ascii_fmt
IMPORT %fl_from_ascii
IMPORT %fl_to_slong
IMPORT %fl_to_ulong
IMPORT %fl_from_slong
IMPORT %fl_from_ulong
IMPORT %fl_to_s32
IMPORT %fl_from_s32
IMPORT %fl_add
IMPORT %fl_sub
IMPORT %fl_mul
IMPORT %fl_div
IMPORT %fl_max
IMPORT %fl_min
IMPORT %fl_abs
IMPORT %fl_neg
IMPORT %fl_trunc
IMPORT %fl_floor
IMPORT %fl_ceil
IMPORT %fl_round
IMPORT %fl_sqrt
IMPORT %fl_mul2
IMPORT %fl_div2
IMPORT %fl_sign
IMPORT %fl_eq
IMPORT %fl_ne
IMPORT %fl_gt
IMPORT %fl_lt
IMPORT %fl_ge
IMPORT %fl_le
IMPORT %fl_cmp
IMPORT %fl_rand
IMPORT activate_service_led
IMPORT application_restart
IMPORT error_log
IMPORT flush
IMPORT flush_cancel
IMPORT flush_wait
IMPORT go_offline
IMPORT go_unconfigured
IMPORT node_reset
IMPORT offline_confirm
IMPORT post_events
IMPORT refresh_memory
IMPORT service_pin_msg_send
IMPORT service_pin_state
IMPORT set_eeprom_lock
IMPORT timers_off
IMPORT watchdog_update
IMPORT watchdog_update_old
IMPORT %PersistentFblockStatus
IMPORT %fblockData
IMPORT %deviceState
IMPORT %NodeObjectDirector
SEG RAMNEAR
ORG
%nviRequest APEXP
RES 3
SEG RAMNEAR
ORG
%nviTemp APEXP
RES 4
SEG RAMNEAR
ORG
%nviLevel APEXP
RES 6
SEG RAMNEAR
ORG
%nviPumpSts APEXP
RES 2
SEG RAMNEAR
ORG
%nviHeatSts APEXP
RES 2
SEG RAMNEAR
ORG
%nvoStatus APEXP
RES 6
SEG RAMNEAR
ORG
%nvoPumpCtl APEXP
RES 2
SEG RAMNEAR
ORG
%nvoHeatCtl APEXP
RES 2
IMPORT %NodeObjectReportMask
SEG CODE
ORG
WHEN1 EXPORT ; When task
ALLOC #4
NOP
PUSHS #0
PUSH #NFBS
PUSH [1][@NEAR(%nviRequest)]
PUSH [1][@NEAR(%nviRequest)+1]
CALL _gequ16
SBRNZ *+4
BRF WHEN1+1D
PUSHS #5
CALL _nv_update_request
PUSH [1][@NEAR(%nvoStatus)+2]
AND #7F
OR #80
POP [1][@NEAR(%nvoStatus)+2]
BRF WHEN1+153
ALLOC #2
PUSH [1][@NEAR(%nviRequest)]
PUSH [1][@NEAR(%nviRequest)+1]
DROP NEXT
POP [DSP][-2]
PUSH [1][@NEAR(%nviRequest)+2]
POP [DSP][-3]
PUSH [DSP][-1]
POP %deviceState
PUSHD #%fblockData
PUSH [DSP][-3]
PUSHS #6
CALL _mul8l
CALL _add16
POP [DSP][-5]
POP [DSP][-5]
PUSH [DSP][-4]
PUSH [DSP][-4]
POPD [2]
PUSH [2][2]
AND #0BF
POP [2][2]
PUSHS #1
DROP NEXT
PUSH [DSP][-2]
XOR #5
SBRZ *+4
BRF WHEN1+5A
PUSHS #5
PUSH [DSP][-2]
CALLF _fblock_director
PUSHS #0
PUSH [DSP][-2]
PUSHS #5
CALL _nv_update_long
PUSHS #5
CALL _nv_update_request
PUSHS #0
DROP NEXT
BRF WHEN1+140
PUSH [DSP][-2]
SBRNZ *+4
BRF WHEN1+0BA
PUSH [DSP][-2]
XOR #1
SBRNZ *+4
BRF WHEN1+0BA
PUSH [DSP][-2]
XOR #6
SBRNZ *+4
BRF WHEN1+0BA
PUSH [DSP][-2]
XOR #7
SBRNZ *+4
BRF WHEN1+0BA
PUSH [DSP][-2]
XOR #8
SBRNZ *+4
BRF WHEN1+0BA
PUSH [DSP][-2]
XOR #9
SBRNZ *+4
BRF WHEN1+0BA
PUSH [DSP][-2]
XOR #3
SBRNZ *+4
BRF WHEN1+0BA
PUSH [DSP][-2]
XOR #4
SBRNZ *+4
BRF WHEN1+0BA
PUSH [DSP][-2]
XOR #0A
SBRNZ *+4
BRF WHEN1+0BA
PUSH [DSP][-2]
XOR #0B
SBRNZ *+4
BRF WHEN1+0BA
PUSH [DSP][-2]
XOR #0C
SBRNZ *+4
BRF WHEN1+0BA
PUSH [DSP][-2]
XOR #0D
SBRNZ *+4
BRF WHEN1+0BA
PUSH [DSP][-2]
XOR #0E
SBRNZ *+4
BRF WHEN1+0BA
PUSH [DSP][-2]
XOR #0F
SBRZ *+4
BRF WHEN1+112
PUSH [DSP][-1]
SBRZ *+4
BRF WHEN1+10A
PUSH [DSP][-2]
XOR #1
SBRZ *+4
BRF WHEN1+0D9
PUSHS #0
PUSH [DSP][-2]
PUSHS #5
CALL _nv_update_long
PUSHS #5
CALL _nv_update_request
PUSH [1][@NEAR(%nvoStatus)+2]
AND #0DF
OR #20
POP [1][@NEAR(%nvoStatus)+2]
BRF WHEN1+0EE
PUSH [DSP][-2]
XOR #7
SBRZ *+4
BRF WHEN1+0EE
PUSHS #0
PUSH [DSP][-2]
PUSHS #5
CALL _nv_update_long
PUSHS #5
CALL _nv_update_request
PUSH [1][@NEAR(%nvoStatus)+2]
AND #0DF
POP [1][@NEAR(%nvoStatus)+2]
PUSHS #0
POP [DSP][-1]
PUSH #NFBS
PUSH [DSP][-1]
CALL _less8
SBRNZ *+4
BRF WHEN1+104
PUSH [DSP][-2]
PUSH [DSP][-1]
CALLF _fblock_director
PUSH NEXT
INC
POP [DSP][-1]
BRF WHEN1+0F0
CALLF %updateNode_Status
BRF WHEN1+10F
PUSH [DSP][-2]
PUSH [DSP][-2]
CALLF _fblock_director
BRF WHEN1+140
PUSH [DSP][-2]
XOR #2
SBRZ *+4
BRF WHEN1+135
PUSH [DSP][-1]
SBRZ *+4
BRF WHEN1+12D
CALLF %updateNode_Status
PUSH [DSP][-4]
PUSH [DSP][-4]
POPD [2]
PUSH [2][2]
AND #0BF
POP [2][2]
BRF WHEN1+132
PUSH [DSP][-2]
PUSH [DSP][-2]
CALLF _fblock_director
BRF WHEN1+140
PUSH [DSP][-4]
PUSH [DSP][-4]
POPD [2]
PUSH [2][2]
AND #0BF
OR #40
POP [2][2]
PUSH TOS
SBRNZ *+4
BRF WHEN1+151
PUSHS #6
PUSH [DSP][-5]
PUSH [DSP][-5]
PUSHS #5
PUSHS #0
CALL _nv_update
PUSHS #0
PUSH [DSP][-2]
PUSHS #5
CALL _nv_update_long
DROP TOS
DROP TOS
DEALLOC #4
NOP
SEG CODE
ORG
%NodeObjectDirector APEXP ; Function body
ALLOC #2
NOP
PUSHD #%fblockData
PUSH [DSP][-3]
PUSHS #6
CALL _mul8l
CALL _add16
POP [DSP][-1]
POP [DSP][-1]
PUSH NEXT
PUSH NEXT
POPD [2]
PUSH [2][2]
AND #7F
POP [2][2]
PUSH NEXT
PUSH NEXT
POPD [2]
PUSH [2][2]
AND #0BF
POP [2][2]
PUSH [DSP][-2]
XOR #30
SBRZ *+4
BRF %NodeObjectDirector+29
BRF %NodeObjectDirector+0CA
PUSH [DSP][-2]
XOR #20
SBRZ *+4
BRF %NodeObjectDirector+33
BRF %NodeObjectDirector+0CA
PUSH [DSP][-2]
XOR #21
SBRZ *+4
BRF %NodeObjectDirector+3D
BRF %NodeObjectDirector+0CA
PUSH [DSP][-2]
XOR #2
SBRZ *+4
BRF %NodeObjectDirector+47
BRF %NodeObjectDirector+0CA
PUSH [DSP][-2]
SBRZ *+4
BRF %NodeObjectDirector+5D
PUSH [DSP][-1]
CALLF %clearFblockStatus
PUSHS #0
PUSH [DSP][-2]
CALLF %setFblockDisable
PUSHS #0
PUSH [DSP][-2]
CALLF %setFblockOverride
BRF %NodeObjectDirector+0CA
PUSH [DSP][-2]
XOR #1
SBRZ *+4
BRF %NodeObjectDirector+6C
PUSHS #1
PUSH [DSP][-2]
CALLF %setFblockDisable
BRF %NodeObjectDirector+0CA
PUSH [DSP][-2]
XOR #7
SBRZ *+4
BRF %NodeObjectDirector+7B
PUSHS #0
PUSH [DSP][-2]
CALLF %setFblockDisable
BRF %NodeObjectDirector+0CA
PUSH [DSP][-2]
XOR #22
SBRZ *+4
BRF %NodeObjectDirector+8F
PUSHS #0
PUSH [DSP][-2]
CALLF %setFblockDisable
PUSHS #0
PUSH [DSP][-2]
CALLF %setLockedOutBit
BRF %NodeObjectDirector+0CA
PUSH [DSP][-2]
XOR #6
SBRZ *+4
BRF %NodeObjectDirector+99
BRF %NodeObjectDirector+0CA
PUSH [DSP][-2]
XOR #8
SBRZ *+4
BRF %NodeObjectDirector+0A3
BRF %NodeObjectDirector+0CA
PUSH [DSP][-2]
XOR #5
SBRZ *+4
BRF %NodeObjectDirector+0B5
PUSHS #6
PUSHD #%NodeObjectReportMask
PUSHS #5
PUSHS #0
CALL _nv_update
BRF %NodeObjectDirector+0CA
PUSH [DSP][-2]
XOR #32
SBRZ *+4
BRF %NodeObjectDirector+0BF
BRF %NodeObjectDirector+0CA
PUSH NEXT
PUSH NEXT
POPD [2]
PUSH [2][2]
AND #0BF
OR #40
POP [2][2]
DEALLOC #4
NOP
SEG CODE
ORG
%NodeObjectReportMask APEXP
DATA.B 0,0,20,8,10,0
SEG EENEAR
ORG ONCHIPMEM
%PersistentFblockStatus APEXP
DATA.B 0
SEG RAMFAR
ORG
%fblockData APEXP
RES 6
SEG RAMFAR
ORG
%deviceState APEXP
RES 4
SEG CODE
ORG
%executeOnEachFblock APEXP ; Function body
ALLOC #1
NOP
PUSHS #0
DROP NEXT
PUSH #NFBS
PUSH NEXT
CALL _less8
SBRNZ *+4
BRF %executeOnEachFblock+1A
PUSH NEXT
PUSH NEXT
CALLF _fblock_director
CALL watchdog_update
PUSH TOS
INC
DROP NEXT
BRF %executeOnEachFblock+4
DEALLOC #2
NOP
SEG CODE
ORG
%updateDeviceState APEXP ; Function body
ALLOC #1
NOP
PUSH NEXT
PUSHD #%fblock_index_map
POPD [0]
PUSH [0][TOS]
DROP TOS
DROP NEXT
PUSH TOS
POP %deviceState
PUSH [DSP][-2]
PUSH NEXT
SUB TOS,NEXT
POP %deviceState+3
PUSH [DSP][-1]
POP %deviceState+2
PUSH NEXT
POP %deviceState+1
DEALLOC #4
NOP
SEG CODE
ORG
%clearFblockStatus APEXP ; Function body
ALLOC #6
NOP
PUSHS #6
PUSHD #%fblockData
PUSH [DSP][-8]
PUSHS #6
CALL _mul8l
CALL _add16
PUSH #0F7
CALL _get_sp
CALL _memcpy
PUSHS #6
PUSHS #0
PUSHD #%fblockData
PUSHS #7
CALL _push1
PUSHS #6
CALL _mul8l
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -