Warning

You're browsing the old v2.x documentation. This version is no longer maintained. Click here to go the v3.x documentation.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
extensions_tutorial [2019/12/12 11:36] – [Referencing XC=BASIC symbols in assembly language] neilsextensions_tutorial [2019/12/12 20:14] (current) – [Referencing XC=BASIC symbols in assembly language] neils
Line 75: Line 75:
       lda {self}.port       lda {self}.port
       ; Port #2 becomes 0, Port #1 remains 1       ; Port #2 becomes 0, Port #1 remains 1
-      ora #%00000001+      and     #%00000001
       tax       tax
       ; This is how to refer to a global constant       ; This is how to refer to a global constant
-      lda _JOY_PORT2, x +      lda.wx  _JOY_PORT2 
-      ora #%00001000 +      eor     #%11111111 
-      eor #%00001000+      and     #%00010000 
 +      lsr
       lsr       lsr
       lsr       lsr
       lsr       lsr
       ; A now holds the return value of our function       ; A now holds the return value of our function
-      ; Write it to the variable "result!"+      ; Write it to the variable 'result!'
       sta {self}.result       sta {self}.result
     "     "
     return result!     return result!
   endfun   endfun
 +
 +===== Publishing your extension =====
 +
 +When you're done with your extension, please follow these steps:
 +
 +  - Test all functions and commands carefully. Write a detailed test program
 +  - Name your extension ''xcb-ext-<extension_name>.bas''
 +  - Write a detailed documentation to let users know how to use the extension
 +  - Create a GitHub repo with this name: ''xcb-ext-<extension_name>'', upload your files and notify me in email (feketecsaba [at] gmail) about the new extension and I'll add it to the ''extensions/'' folder as a submodule
 +