2015-06-03 18:30:57 +00:00
|
|
|
|
NEW
|
2018-05-04 14:55:29 +00:00
|
|
|
|
PREFIX /A2OSX.BUILD
|
|
|
|
|
AUTO 4,1
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.LIST OFF
|
|
|
|
|
.OP 65C02
|
|
|
|
|
.OR $2000
|
2018-07-20 05:43:11 +00:00
|
|
|
|
.TF SBIN/LOGIN
|
2015-06-03 18:30:57 +00:00
|
|
|
|
*--------------------------------------
|
2018-07-20 05:43:11 +00:00
|
|
|
|
.INB INC/MACROS.I
|
|
|
|
|
.INB INC/A2OSX.I
|
2015-11-22 22:30:06 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
ZPPTR1 .EQ ZPBIN
|
2015-06-03 18:30:57 +00:00
|
|
|
|
*--------------------------------------
|
2015-12-12 10:13:14 +00:00
|
|
|
|
INPUT.BufPtr.SIZE .EQ 16
|
2015-06-03 18:30:57 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
* File Header (16 Bytes)
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.START cld
|
|
|
|
|
jmp (.1,x)
|
|
|
|
|
.DA #$61 6502,Level 1 (65c02)
|
|
|
|
|
.DA #1 BIN Layout Version 1
|
|
|
|
|
.DA 0
|
2017-10-19 15:27:38 +00:00
|
|
|
|
.DA CS.END-CS.START CS
|
|
|
|
|
.DA DS.END-DS.START DS
|
2018-04-26 15:38:02 +00:00
|
|
|
|
.DA #64 SS
|
2017-10-19 15:27:38 +00:00
|
|
|
|
.DA #2 ZP SS
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Relocation Table
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.1 .DA CS.INIT
|
|
|
|
|
.DA CS.RUN
|
|
|
|
|
.DA CS.DOEVENT
|
|
|
|
|
.DA CS.QUIT
|
|
|
|
|
L.MSG.LOGIN .DA MSG.LOGIN
|
|
|
|
|
L.MSG.PASSWORD .DA MSG.PASSWORD
|
|
|
|
|
L.SHELL .DA SHELL
|
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
2017-09-15 06:37:15 +00:00
|
|
|
|
CS.INIT lda (pPs)
|
2015-06-03 18:30:57 +00:00
|
|
|
|
ora #S.PS.F.EVENT Now accept events
|
|
|
|
|
sta (pPs)
|
|
|
|
|
clc Tell TskMgr To stay in memory
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN lda #0
|
|
|
|
|
ldy #hUSERNAME
|
|
|
|
|
sta (pData),y
|
|
|
|
|
ldy #hPASSWORD
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>PUSHBI 0
|
2015-06-03 18:30:57 +00:00
|
|
|
|
>LDYA L.MSG.LOGIN
|
2018-06-21 15:12:10 +00:00
|
|
|
|
>SYSCALL printf
|
2015-11-22 22:30:06 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
2015-06-03 18:30:57 +00:00
|
|
|
|
lda #0 Echo all caracters
|
|
|
|
|
jsr INPUT.RESET
|
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
.1 >SLEEP
|
2017-08-31 06:23:29 +00:00
|
|
|
|
>SYSCALL GetChar
|
2018-04-16 15:25:39 +00:00
|
|
|
|
bcc .11
|
|
|
|
|
tax
|
|
|
|
|
beq .1 no char
|
|
|
|
|
bra .9
|
|
|
|
|
|
|
|
|
|
.11 jsr INPUT.CHARIN
|
2015-06-03 18:30:57 +00:00
|
|
|
|
jsr INPUT.LINEIN
|
|
|
|
|
bcc .1
|
|
|
|
|
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>PUSHBI 0
|
2015-06-03 18:30:57 +00:00
|
|
|
|
>LDYA L.MSG.PASSWORD
|
2018-06-21 15:12:10 +00:00
|
|
|
|
>SYSCALL printf
|
2016-11-01 17:18:04 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
2015-06-03 18:30:57 +00:00
|
|
|
|
lda #'*'
|
|
|
|
|
jsr INPUT.RESET
|
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
.2 >SLEEP
|
2017-08-31 06:23:29 +00:00
|
|
|
|
>SYSCALL GetChar
|
2018-04-16 15:25:39 +00:00
|
|
|
|
bcc .22
|
|
|
|
|
tax
|
|
|
|
|
beq .2 no char
|
|
|
|
|
bra .9
|
|
|
|
|
|
|
|
|
|
.22 jsr INPUT.CHARIN
|
2015-06-03 18:30:57 +00:00
|
|
|
|
jsr INPUT.LINEIN
|
|
|
|
|
bcc .2
|
|
|
|
|
|
2015-11-22 22:30:06 +00:00
|
|
|
|
lda #13
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL PutChar
|
2015-11-22 22:30:06 +00:00
|
|
|
|
bcs .9
|
2017-02-28 16:58:36 +00:00
|
|
|
|
lda #10
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL PutChar
|
2017-02-28 16:58:36 +00:00
|
|
|
|
bcs .9
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
2016-08-17 06:25:58 +00:00
|
|
|
|
>LDYA L.SHELL
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL ExpandStr
|
2016-11-01 17:18:04 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
2018-04-16 15:25:39 +00:00
|
|
|
|
phx
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL ExecPS
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
2018-04-16 15:25:39 +00:00
|
|
|
|
plx
|
|
|
|
|
|
2016-11-01 17:18:04 +00:00
|
|
|
|
php
|
|
|
|
|
pha
|
2018-04-16 15:25:39 +00:00
|
|
|
|
txa
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL FreeMem
|
2016-11-01 17:18:04 +00:00
|
|
|
|
pla
|
|
|
|
|
plp
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
2016-11-01 17:18:04 +00:00
|
|
|
|
.9 rts
|
2015-06-03 18:30:57 +00:00
|
|
|
|
*--------------------------------------
|
2017-01-12 17:43:45 +00:00
|
|
|
|
CS.DOEVENT
|
|
|
|
|
sec
|
2015-06-03 18:30:57 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-08-17 06:25:58 +00:00
|
|
|
|
CS.QUIT clc
|
2015-06-03 18:30:57 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* PRIVATE
|
|
|
|
|
*--------------------------------------
|
2015-12-12 10:13:14 +00:00
|
|
|
|
INPUT.RESET ldy #INPUT.PassChar
|
2015-06-03 18:30:57 +00:00
|
|
|
|
sta (pData),y
|
|
|
|
|
lda #0
|
2015-12-12 10:13:14 +00:00
|
|
|
|
ldy #INPUT.BufPtr
|
|
|
|
|
sta (pData),y
|
|
|
|
|
ldy #INPUT.Status
|
2015-06-03 18:30:57 +00:00
|
|
|
|
sta (pData),y
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-01-12 17:43:45 +00:00
|
|
|
|
INPUT.CHARIN tax save char...
|
2015-12-12 10:13:14 +00:00
|
|
|
|
ldy #INPUT.Status
|
2015-06-03 18:30:57 +00:00
|
|
|
|
lda (pData),y
|
|
|
|
|
bmi .9
|
|
|
|
|
|
2015-12-12 10:13:14 +00:00
|
|
|
|
lda #INPUT.BufPtr
|
2015-06-03 18:30:57 +00:00
|
|
|
|
clc
|
|
|
|
|
adc pData
|
2015-11-22 22:30:06 +00:00
|
|
|
|
sta ZPPTR1
|
2015-06-03 18:30:57 +00:00
|
|
|
|
lda pData+1
|
2015-12-12 10:13:14 +00:00
|
|
|
|
adc /INPUT.BufPtr
|
2015-11-22 22:30:06 +00:00
|
|
|
|
sta ZPPTR1+1
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
|
|
|
|
cpx #$20 Control Char?
|
|
|
|
|
bcc .2
|
|
|
|
|
|
2015-11-22 22:30:06 +00:00
|
|
|
|
lda (ZPPTR1)
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
2015-12-12 10:13:14 +00:00
|
|
|
|
cmp #INPUT.BufPtr.SIZE Buffer full?
|
2015-06-03 18:30:57 +00:00
|
|
|
|
beq .9
|
|
|
|
|
|
|
|
|
|
inc
|
2015-11-22 22:30:06 +00:00
|
|
|
|
sta (ZPPTR1)
|
2015-06-03 18:30:57 +00:00
|
|
|
|
tay
|
|
|
|
|
|
|
|
|
|
txa
|
2015-11-22 22:30:06 +00:00
|
|
|
|
sta (ZPPTR1),y
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
2015-12-12 10:13:14 +00:00
|
|
|
|
ldy #INPUT.PassChar
|
2015-06-03 18:30:57 +00:00
|
|
|
|
lda (pData),y
|
|
|
|
|
bne .1
|
|
|
|
|
txa
|
2018-07-18 15:30:42 +00:00
|
|
|
|
.1 >SYSCALL PutChar
|
2015-11-22 22:30:06 +00:00
|
|
|
|
rts
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
2015-12-12 10:13:14 +00:00
|
|
|
|
.2 cpx #13 CR
|
|
|
|
|
bne .3
|
|
|
|
|
ldy #INPUT.Status
|
|
|
|
|
lda (pData),y
|
2015-06-03 18:30:57 +00:00
|
|
|
|
bne .9
|
2015-12-12 10:13:14 +00:00
|
|
|
|
|
|
|
|
|
inc
|
|
|
|
|
sta (pData),y
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.3 cpx #10 LF
|
|
|
|
|
|
|
|
|
|
bne .4
|
|
|
|
|
ldy #INPUT.Status
|
|
|
|
|
lda (pData),y
|
|
|
|
|
beq .31
|
2015-06-03 18:30:57 +00:00
|
|
|
|
lda #$80
|
|
|
|
|
sta (pData),y
|
2015-12-12 10:13:14 +00:00
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.31
|
|
|
|
|
|
|
|
|
|
.4
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2015-12-12 10:13:14 +00:00
|
|
|
|
INPUT.LINEIN ldy #INPUT.Status
|
2015-06-03 18:30:57 +00:00
|
|
|
|
lda (pData),y
|
2015-12-10 18:53:30 +00:00
|
|
|
|
asl CS if a line is in the buffer
|
2015-06-03 18:30:57 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.END
|
2018-04-11 15:35:51 +00:00
|
|
|
|
MSG.LOGIN .AZ "\r\nlogin:"
|
|
|
|
|
MSG.PASSWORD .AZ "\r\npassword:"
|
|
|
|
|
SHELL .AZ "${A2OSX}SBIN/SHELL"
|
2017-03-01 15:22:00 +00:00
|
|
|
|
*--------------------------------------
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.DUMMY
|
|
|
|
|
.OR 0
|
|
|
|
|
DS.START
|
2015-12-12 10:13:14 +00:00
|
|
|
|
INPUT.BufPtr .BS INPUT.BufPtr.SIZE+1
|
|
|
|
|
INPUT.Status .BS 1
|
|
|
|
|
INPUT.PassChar .BS 1
|
2015-06-03 18:30:57 +00:00
|
|
|
|
hUSERNAME .BS 1
|
|
|
|
|
hPASSWORD .BS 1
|
|
|
|
|
DS.END
|
|
|
|
|
.ED
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
2017-03-29 15:48:15 +00:00
|
|
|
|
SAVE /A2OSX.SRC/SBIN/LOGIN.S
|
2015-06-03 18:30:57 +00:00
|
|
|
|
ASM
|