if you can do better (smaller), tell me! this is the best I could do. ;------------------------------ ;19/6/2006 ;code by Christian Blondin ;]b[e]l[t]o[i]d7[@s@p@a@m@]e[m]a[i]l.c]o[m -> delete the [ @spam@ ;rsc-mirror3.netfirms.com/pic.html -> coming up. ; ;code is for PIC16 instruction set (PIC10F, 12F, 16F...) ;remove the last two lines if you don't need a valid zero flag. ;performs [f01|f00] = [f01|f00] - [f03|f02] while keeping f03|f02 intact. ;(f00 and f02 being the low-bytes, f01 and f03 the hi-bytes) ;briefly tested in MPSIM ("special cases" only) movf f02,W subwf f00,F ;f00-f02 (STATUS,C=!BORROW) movf f03,W btfss STATUS,C ;skip if borrow=0 (C=1) addlw 01 subwf f01,F ;f01-f03 STATUS,C=!BRW btfsc STATUS,Z ;skip if MSbyte<>zero movf f00,F ;else, check LSbyte for zero. ;------------------------------
|file: /Techref/microchip/math/sub/16bsubCZ.htm, 1KB, , updated: 2010/10/12 15:35, local time: 2022/5/23 04:31,
|©2022 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?|
<A HREF="http://www.sxlist.com/techref/microchip/math/sub/16bsubCZ.htm"> 16-bit substract with carry & zero</A>
|Did you find what you needed?|
Welcome to sxlist.com!
& kind contributors
just like you!
Please don't rip/copy
Copies of the site on CD
are available at minimal cost.
Welcome to www.sxlist.com!