# HG changeset patch # User William Astle # Date 1670656925 25200 # Node ID f5966048a796ca5d76283a28ec96a9255ae597ed # Parent 39275fdc7c0bfb9734bc41086c4b8fa096e591d0 Modify defcmd and deffunc to allow specifying explicit entry point diff -r 39275fdc7c0b -r f5966048a796 src/lwbasic.s --- a/src/lwbasic.s Sat Dec 10 00:21:02 2022 -0700 +++ b/src/lwbasic.s Sat Dec 10 00:22:05 2022 -0700 @@ -1522,13 +1522,21 @@ __funcnum set 0x80 defcmd macro noexpand setstr __cmdtab="%(__cmdtab)\tfcs {1}\n" + ifstr ne,"{3}","" + setstr __cmdjump="%(__cmdjump)\tfdb {3}\n" + else setstr __cmdjump="%(__cmdjump)\tfdb cmd_{2}\n" + endc tok_{2} equ __cmdnum __cmdnum set __cmdnum+1 endm deffunc macro noexpand setstr __functab="%(__functab)\tfcs {1}\n" + ifstr ne,"{4}","" + setstr __funcjump="%(__funcjump)\tfcb {3}\n\tfdb {4}\n" + else setstr __funcjump="%(__funcjump)\tfcb {3}\n\tfdb func_{2}\n" + endc tok_{2} equ __funcnum __funcnum set __funcnum+1 endm