1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
list p=16c84
;; The purpose of this program is to test gpsim's ability to simulate looping instructions.
;; It's also used to get a rough bench mark on performance. (set a break point after the loop,
;; run the program, check the number of cycles...
cblock 0x20
temp1
temp2
temp3
adr_cnt
data_cnt
w_temp
status_temp
endc
status equ 3
rp0 equ 5
intcon equ 0x0b
gie equ 7
eeie equ 6
eecon1 equ 0x08
rd equ 0
wr equ 1
wren equ 2
eeif equ 4
eecon2 equ 0x09
eedata equ 0x08
eeadr equ 0x09
org 0
goto start
org 4
start
clrf temp1
clrf temp2
movlw 5
movwf temp3
begin
decfsz temp1,f
goto begin
decfsz temp2,f
goto begin
decfsz temp3,f
goto begin
goto start
end
|