Mercurial > public > hwos_code
diff src/varargs.inc @ 604:ca4556fb60b9
bump to 2.99beta, work on 3.00 stable
author | heinrichsweikamp |
---|---|
date | Thu, 22 Nov 2018 19:47:26 +0100 |
parents | 11d4fc797f74 |
children | c40025d8e750 |
line wrap: on
line diff
--- a/src/varargs.inc Thu Oct 11 21:06:29 2018 +0200 +++ b/src/varargs.inc Thu Nov 22 19:47:26 2018 +0100 @@ -10,54 +10,54 @@ ; 2011-05-27 : [jDG] Creation. ; -VARARGS_BEGIN macro - movff TOSL, TBLPTRL - movff TOSH, TBLPTRH - movff TOSU, TBLPTRU - endm +VARARGS_BEGIN macro + movff TOSL, TBLPTRL + movff TOSH, TBLPTRH + movff TOSU, TBLPTRU + endm -VARARGS_GET8 macro register - tblrd*+ - movff TABLAT, register - endm +VARARGS_GET8 macro register + tblrd*+ + movff TABLAT, register + endm -VARARGS_GET16 macro register - tblrd*+ - movff TABLAT, register+0 - tblrd*+ - movff TABLAT, register+1 - endm +VARARGS_GET16 macro register + tblrd*+ + movff TABLAT, register+0 + tblrd*+ + movff TABLAT, register+1 + endm -VARARGS_GET24 macro register - tblrd*+ - movff TABLAT, register+0 - tblrd*+ - movff TABLAT, register+1 - tblrd*+ - movff TABLAT, register+2 - endm +VARARGS_GET24 macro register + tblrd*+ + movff TABLAT, register+0 + tblrd*+ + movff TABLAT, register+1 + tblrd*+ + movff TABLAT, register+2 + endm -VARARGS_ALIGN macro - local no_tblptr_align +VARARGS_ALIGN macro + local no_tblptr_align - btfss TBLPTRL,0 - bra no_tblptr_align - incf TBLPTRL - movlw 0 - addwfc TBLPTRH - addwfc TBLPTRU + btfss TBLPTRL,0 + bra no_tblptr_align + incf TBLPTRL + movlw 0 + addwfc TBLPTRH + addwfc TBLPTRU no_tblptr_align: - endm + endm VARARGS_END macro - ; Compute string length (modulo 256): - movf TOSL,W - subwf TBLPTRL,W - - ; Then 24bit add to return address - addwf TOSL,F - movlw 0 ; Clear WREG, but keep carry - addwfc TOSH,F - addwfc TOSU,F - endm + ; compute string length (modulo 256): + movf TOSL,W + subwf TBLPTRL,W + ; then 24 bit add to return address + addwf TOSL,F + movlw 0 ; clear WREG, but keep carry + addwfc TOSH,F + addwfc TOSU,F + endm +