| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,43 @@ |
| 1 |
+; Author: Pawel Jablonski |
|
| 2 |
+; E-mail: pj@xirx.net |
|
| 3 |
+; WWW: xirx.net |
|
| 4 |
+; GIT: git.xirx.net |
|
| 5 |
+; |
|
| 6 |
+; License: You can use this code however you like |
|
| 7 |
+; but leave information about the original author. |
|
| 8 |
+; Code is free for non-commercial and commercial use. |
|
| 9 |
+ |
|
| 10 |
+map ../../../bin/rom/rom.map |
|
| 11 |
+ |
|
| 12 |
+; Start message |
|
| 13 |
+const messageArgs "Typed arguments:" |
|
| 14 |
+ |
|
| 15 |
+; First label is the entry point |
|
| 16 |
+.entry: |
|
| 17 |
+ call .main |
|
| 18 |
+ ret |
|
| 19 |
+ |
|
| 20 |
+; Arguments |
|
| 21 |
+; X - Arguments address low |
|
| 22 |
+; Y - Arguments address high |
|
| 23 |
+; No return |
|
| 24 |
+.main: |
|
| 25 |
+ push A |
|
| 26 |
+ push X |
|
| 27 |
+ push Y |
|
| 28 |
+ ; Load address to start message |
|
| 29 |
+ mov low(*messageArgs), X |
|
| 30 |
+ mov high(*messageArgs), Y |
|
| 31 |
+ ; Print start message |
|
| 32 |
+ call .xStringPrint |
|
| 33 |
+ pop Y |
|
| 34 |
+ pop X |
|
| 35 |
+ call .xStringNewLine |
|
| 36 |
+ call .xStringNewLine |
|
| 37 |
+ mov '"', A |
|
| 38 |
+ call .xStringPrintChar |
|
| 39 |
+ ; Print arguments |
|
| 40 |
+ call .xStringPrint |
|
| 41 |
+ call .xStringPrintChar |
|
| 42 |
+ pop A |
|
| 43 |
+ ret |