Programkd elemzse List file lst Hex file HEX
- Slides: 21
Programkód elemzése List file (. lst) Hex file (. HEX)
Hardver RB 0, RB 1, RB 2, RB 3 – ON RB 4, RB 5, RB 6, RB 7 – OFF
. asm file errorlevel -205 PROCESSOR 16 f 84 #include "p 16 f 84. inc" __CONFIG _XT_OSC & _PWRTE_ON & _WDT_OFF & _CP_OFF errorlevel -203 errorlevel -302 Main bsf clrf bcf STATUS, RP 0 TRISA TRISB STATUS, RP 0 movlw b'00001111‘ movwf PORTB org goto 0 x 00 Main Loop goto org goto 0 x 04 Main end Loop
. lst file
. hex file
Instrukciók
Instrukciók
Instrukciók
Instrukciók
Dobókocka https: //people. vts. su. ac. rs/~pmiki/_DALJINSKA_NASTAVA_ASEMBLERI/11. 05/PIC_Dice. mp 4
Dobókocka PROCESSOR 16 f 84 #include "p 16 f 84. inc" __CONFIG _XT_OSC & _WDT_OFF & _PWRTE_ON & _CP_OFF cblock 0 x 0 c Pointer d 1 d 2 d 3 endc Loop clrf btfsc goto call goto org goto Table addwf retlw retlw 0 x 00 Main 0 x 04 Main bsf clrf bsf bcf movlw movwf STATUS, RP 0 TRISB TRISA, 1 STATUS, RP 0 b'11111110‘ PORTB Pointer PORTA, 1 Loop Delay 10 ms PORTA, 1 Loop Shuffle Loop PCL 0 x 10 0 x 82 0 x 92 0 x. AA 0 x. BA 0 x. EE Shuffle movf call movwf call btfss goto return incf movf sublw btfss goto clrf goto Pointer, 0 Table PORTB Delay 20 ms PORTA, 1 $+5 Delay 10 ms PORTA, 1 $+2 Pointer, 1 Pointer, W 6 STATUS, Z Shuffle Pointer Shuffle Delay 10 ms … Delay 20 ms … end
Dobókocka Delay 10 ms movlw d'6‘ movwf d 3 movlw d'11‘ movwf d 2 movlw d'255‘ movwf d 1 decfsz d 1 goto $-1 decfsz d 2 goto $-5 decfsz d 3 goto $-9 return Delay 20 ms movlw d'5‘ movwf d 3 movlw d'27‘ movwf d 2 movlw d'255‘ movwf d 1 decfsz d 1 goto $-1 decfsz d 2 goto $-5 decfsz d 3 goto $-9 return end
Dobókocka Shuffle movf call movwf call btfss goto return incf movf sublw btfss goto clrf goto Pointer, 0 Table PORTB Delay 20 ms PORTA, 1 $+5 Delay 10 ms PORTA, 1 $+2 Pointer, 1 Pointer, W 6 STATUS, Z Shuffle Pointer Shuffle Table addwf retlw retlw PCL 0 x 10 0 x 82 0 x 92 0 x. AA 0 x. BA 0 x. EE Delay 10 ms return Delay 20 ms return end
Számjegyek kiválasztása d’ 234’ = b’ 11101010’ Százasok=2 (var_100) Tízesek=3 (var_10) Egyesek=4 (var_1)
Számjegyek kiválasztása (getnums. asm) Main PROCESSOR 16 f 84 bank 1 #include "p 16 f 84. inc" __CONFIG _XT_OSC & _WDT_OFF clrf movlw & movwf _PWRTE_ON & _CP_OFF bank 0 #include "bank. inc" clrf #include "digit. inc" cblock 0 x 0 c movlw var_100 movwf var_10 var_1 digit rez temp Loop endc goto org 0 x 00 end goto main org goto 0 x 04 main TRISB b'00000001‘ TRISA PORTB d'234' rez Loop
Számjegyek kiválasztása makró (digit. inc) digit macro rez local Loop 100 Loop 10 clrf var_100 var_1 movf movwf rez, W temp movlw Loop 100 incf subwf btfsc goto decf addwf d'100‘ var_100, f temp, f STATUS, C Loop 100 var_100, f temp, f movlw Loop 10 incf subwf btfsc goto decf addwf d'10' var_10, f temp, f STATUS, C Loop 10 var_10, f temp, f movf temp, W movwf var_1 endm
Véletlen szám generálása
Véletlen szám generálása PROCESSOR 16 f 84 ciklus #include "p 16 f 84. inc" incf __CONFIG _XT_OSC & _WDT_OFF btfsc & _PWRTE_ON & _CP_OFF cblock rnd endc 0 x 0 c org goto Main bsf clrf movlw movwf bcf clrf 0 x 00 Main 0 x 04 Main STATUS, RP 0 TRISB b'00000001‘ TRISA STATUS, RP 0 PORTA PORTB rnd goto clrc rrf rrf rnd PORTA, 0 ciklus rnd rnd movlw b'00001111‘ andwf rnd, W call Data. Table movwf PORTB goto ciklus Data. Table addwf retlw retlw retlw retlw return end PCL b'00111111' b'00000110' b'01011011' b'01001111' b'0110' b'00101101' b'00111101' b'00000111' b'01111111' b'01101111' b'0111' b'01111100' b'00111001' b'01011110' b'01111001' b'01110001' ; 0 ; 1 ; 2 ; 3 ; 4 ; 5 ; 6 ; 7 ; 8 ; 9 ; A ; b ; C ; d ; E ; F
Véletlen szám generálása ciklus incf btfsc goto clrc rrf rrf rnd PORTA, 0 ciklus rnd rnd movlw b'00001111‘ andwf rnd, W call Data. Table movwf PORTB goto ciklus Data. Table addwf retlw retlw retlw retlw return end PCL b'00111111' b'00000110' b'01011011' b'01001111' b'0110' b'00101101' b'00111101' b'00000111' b'01111111' b'01101111' b'0111' b'01111100' b'00111001' b'01011110' b'01111001' b'01110001' ; 0 ; 1 ; 2 ; 3 ; 4 ; 5 ; 6 ; 7 ; 8 ; 9 ; A ; b ; C ; d ; E ; F
- Total float= * 1 point lst-est lst-eft est-lft eft-lst
- Est eft lst lft
- Dysleksivenlig skole
- Lst camera
- Polipo lst granulare
- Lmu lst
- Float activity
- Ar-lst
- File-file yang dibuat oleh user pada jenis file di linux
- Physical image vs logical image
- Fungsi dari create file pada operasi-operasi file (cont.)
- Remote file access in distributed file system
- An html file is a text file containing small markup tags.
- In a file-oriented information system, a transaction file
- Tri quad pent hex hept
- Ambihelical hex nut
- Hex to bcd conversion in 8085
- Find hex from image
- Find hex from image
- Bitabl
- 1’s complement representation ของ 100011011
- Hex code ascii