mirror of
https://github.com/byteworksinc/ORCALib.git
synced 2025-01-30 11:30:54 +00:00
573bc6efa9
Tabs have been expanded to spaces in several files that use mainly spaces for indentation. The files ctype.asm, stdio.asm, and string.asm consistently use tabs for indentation. The tabs in these files have been left alone, except that a few tabs between sentences in comments were changed to spaces. One space-indented line in stdio.asm was changed to use a tab.
159 lines
3.1 KiB
NASM
159 lines
3.1 KiB
NASM
keep obj/orca
|
|
mcopy orca.macros
|
|
case on
|
|
|
|
****************************************************************
|
|
*
|
|
* ORCA - ORCA/C specific libraries
|
|
*
|
|
* This code implements the tables and subroutines needed to
|
|
* support the ORCA/C library ORCA.
|
|
*
|
|
* March 1989
|
|
* Mike Westerfield
|
|
*
|
|
* Copyright 1989
|
|
* Byte Works, Inc.
|
|
*
|
|
****************************************************************
|
|
*
|
|
ORCA start dummy segment
|
|
end
|
|
|
|
****************************************************************
|
|
*
|
|
* char *commandline(void)
|
|
*
|
|
* Inputs:
|
|
* ~CommandLine - address of the command line
|
|
*
|
|
****************************************************************
|
|
*
|
|
commandline start
|
|
|
|
ldx #0
|
|
lda ~COMMANDLINE
|
|
ora ~COMMANDLINE+2
|
|
beq lb1
|
|
|
|
lda ~COMMANDLINE
|
|
ldx ~COMMANDLINE+2
|
|
clc
|
|
adc #8
|
|
bcc lb1
|
|
inx
|
|
lb1 rtl
|
|
end
|
|
|
|
****************************************************************
|
|
*
|
|
* void enddesk(void)
|
|
*
|
|
****************************************************************
|
|
*
|
|
enddesk start
|
|
|
|
jmp ~ENDDESK
|
|
end
|
|
|
|
****************************************************************
|
|
*
|
|
* void endgraph(void)
|
|
*
|
|
****************************************************************
|
|
*
|
|
endgraph start
|
|
|
|
jmp ~ENDGRAPH
|
|
end
|
|
|
|
****************************************************************
|
|
*
|
|
* char *shellid(void)
|
|
*
|
|
* Inputs:
|
|
* ~CommandLine - address of the command line
|
|
*
|
|
****************************************************************
|
|
*
|
|
shellid start
|
|
|
|
ldx #0 return NULL if there is no command line
|
|
lda >~COMMANDLINE
|
|
ora >~COMMANDLINE+2
|
|
bne lb1
|
|
rtl
|
|
|
|
lb1 lda >~COMMANDLINE+2
|
|
pha
|
|
lda >~COMMANDLINE
|
|
pha
|
|
phd
|
|
tsc
|
|
tcd
|
|
phb
|
|
phk
|
|
plb
|
|
ldy #6
|
|
lb2 lda [3],Y
|
|
sta id,Y
|
|
dey
|
|
dey
|
|
bpl lb2
|
|
plb
|
|
pld
|
|
pla
|
|
pla
|
|
lda #id
|
|
ldx #^id
|
|
rtl
|
|
|
|
id dc 8c' ',i1'0'
|
|
end
|
|
|
|
****************************************************************
|
|
*
|
|
* void startdesk(int width)
|
|
*
|
|
****************************************************************
|
|
*
|
|
startdesk start
|
|
|
|
jmp ~STARTDESK
|
|
end
|
|
|
|
****************************************************************
|
|
*
|
|
* void startgraph(int width)
|
|
*
|
|
****************************************************************
|
|
*
|
|
startgraph start
|
|
|
|
jmp ~STARTGRAPH
|
|
end
|
|
|
|
****************************************************************
|
|
*
|
|
* int toolerror(void)
|
|
*
|
|
****************************************************************
|
|
*
|
|
toolerror start
|
|
|
|
lda >~TOOLERROR
|
|
rtl
|
|
end
|
|
|
|
****************************************************************
|
|
*
|
|
* int userid(void)
|
|
*
|
|
****************************************************************
|
|
*
|
|
userid start
|
|
|
|
lda >~USER_ID
|
|
rtl
|
|
end
|