A2osX/BIN/WHO.S.txt
2019-04-15 06:40:13 +01:00

113 lines
2.2 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

NEW
AUTO 3,1
.LIST OFF
.OP 65C02
.OR $2000
.TF BIN/WHO
*--------------------------------------
.INB INC/MACROS.I
.INB INC/MLI.I
.INB INC/A2OSX.I
.INB INC/KERNEL.I
*--------------------------------------
.DUMMY
.OR ZPBIN
ZS.START
USRID .BS 1
ZPPWPtr .BS 2
ZS.END
.ED
*--------------------------------------
* File Header (16 Bytes)
*--------------------------------------
CS.START cld
jmp (.1,x)
.DA #$61 6502,Level 1 (65c02)
.DA #1 BIN Layout Version 1
.DA 0
.DA CS.END-CS.START Code Size (without Constants)
.DA DS.END-DS.START Data SegmentSize
.DA #64 Stack Size
.DA #ZS.END-ZS.START Zero Page Size
.DA 0
*--------------------------------------
* Relocation Table
*--------------------------------------
.1 .DA CS.INIT
.DA CS.RUN
.DA CS.EVENT
.DA CS.QUIT
L.MSG0 .DA MSG0
L.MSG1 .DA MSG1
.DA 0
*--------------------------------------
CS.INIT clc
rts
*--------------------------------------
CS.RUN >LDYA L.MSG0
>SYSCALL puts
ldx #1
stx USRID
>DEBUG
.1 lda USR.Table.hPW-1,x
beq .7
lda USR.Table.hFile-1,x
tax
lda OF.Table.hPath-1,x
>SYSCALL GetMemPtr
>PUSHYA
ldx USRID
lda USR.Table.hPW-1,x
>SYSCALL GetMemPtr
>STYA ZPPWPtr
lda ZPPWPtr
clc
adc #19
tay
lda ZPPWPtr+1
adc #0
>PUSHYA
>PUSHB USRID
>PUSHBI 5
>LDYA L.MSG1
>SYSCALL printf
.7 inc USRID
ldx USRID
cpx #K.USR.MAX+1
bne .1
.8 lda #0 tell TSKMGR that all done ok, but
sec we do not want to stay in memory
.9 rts
*--------------------------------------
CS.EVENT sec
rts
*--------------------------------------
CS.QUIT clc
rts
*--------------------------------------
CS.END
MSG0 .AZ "Usr Name Dev"
MSG1 .AZ "%3d %16s %16s\r\n"
*--------------------------------------
.DUMMY
.OR 0
DS.START
DS.END
.ED
*--------------------------------------
MAN
SAVE USR/SRC/BIN/WHO.S
ASM