45-year-old unmarried. no girlfriend. let alone children. classic case of failure to launch. very underweight physical build. I don't even own touchpad phone but can read schematic diagrams and write low level machine code. i'm interested about gardening, bushcraft, scrap metals & survivalist subjects: black swan event, SHTF, and boogaloo party ;my youtube channel: https://www.youtube.com/user/wejos ;this blog serving as archive both cyber & rl pursuits in life.
Showing posts with label code. Show all posts
Showing posts with label code. Show all posts
Friday, August 5, 2022
Saturday, February 6, 2021
old project
Just posting this here for record purposes.
This code will break down a decimal value to individual digits by getting its base, e.g. 125 (decimal value) to 1, 2, and 5.
This code will break down a decimal value to individual digits by getting its base, e.g. 125 (decimal value) to 1, 2, and 5.
valin equ 0x1C hundreds equ 0x1D hpasses equ 0x1E tpasses equ 0x1F tens equ 0x0C ones equ 0x20 start movlw 0x1F ;example value coming from lm35 to movwf valin ;adc0804 and finally to 16f84 movf valin,w movwf hundreds mainhundreds movlw 0x64 subwf hundreds btfsc STATUS, C goto counthundred movlw 0x64 addwf hundreds starttens movf hundreds,w movwf tens tenspoint movlw 0x0A subwf tens btfsc STATUS, C goto counttens movlw 0x0A addwf tens movf tens,w movwf ones return counthundred movlw 0x01 addwf hpasses goto mainhundreds counttens movlw 0x01 addwf tpasses goto tenspoint
end
Subscribe to:
Posts (Atom)