Mercurial > hg > Members > kono > nitros9-code
annotate lib/alib/fputc.as @ 3054:22ddd48b4ec2
level1 krn: Fix scheduler bug that only affected 6309
The original 6809 binary was correct, but it was disassembled
and interpreted wrongly, so that reassembly went wrong on 6309.
author | Tormod Volden <debian.tormod@gmail.com> |
---|---|
date | Sun, 25 Jan 2015 22:36:02 +0100 |
parents | 03f26e88b809 |
children |
rev | line source |
---|---|
2783
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
1 *************************************** |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
2 |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
3 * Subroutine to print one character. |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
4 |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
5 * OTHER MODULES NEEDED: none |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
6 |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
7 * ENTRY: A=path |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
8 * B=char to print |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
9 |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
10 * EXIT: CC carry set if error (from I$WritLn) |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
11 * B error code if any |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
12 |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
13 nam Output Single Char. |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
14 ttl Assembler Library Module |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
15 |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
16 |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
17 section .text |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
18 |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
19 FPUTC: |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
20 pshs b,x,y |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
21 ldy #1 number of char to print |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
22 tfr s,x point x at char to print |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
23 os9 I$WritLn |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
24 leas 1,s don't care about char anymore (B now = error) |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
25 puls x,y,pc |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
26 |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
27 endsect |
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
28 |