export MAKE
-MODULES = font pl$$mv pl$$txt pl$$u stack matrix oct
+MODULES = font pl$$mv pl$$txt pl$$u stack matrix oct liblok tt$$low
F4_MODULES=pmat graphics
FRTN_COMMAND = frtn
all: $(LIBS)
# @echo $(LIBS)
-# @echo '$(OBJECTS)'
+# @echo '$(F4_OBJECT_FILES)'
$(ORG_OBJDIR)/lastrun: $(ORG_LIBDIR)/*
@if [ ! -d $(OBJ_DIR) ]; then mkdir $(OBJ_DIR); fi
@ cd $(OBJ_DIR) && $(LDC_COMMAND) $(notdir $(subst $$,\$$,$@))
-$(LIBS):$(LIB_DIR)/%.lib: $(RECIPE_DIR)/%$(RECIPE_SUFFIX) $(OBJECT_FILES)
+$(LIBS):$(LIB_DIR)/%.lib: $(RECIPE_DIR)/%$(RECIPE_SUFFIX) $(OBJECTS)
@./buildlib.sh genlib $(RECIPE_DIR)/$(basename $(notdir $@))$(RECIPE_SUFFIX)
src/font.asm: font.config fonts/*.asm
#FONT=cyrilc
#FONT=futural
#FONT=futuram
+
+# Der ist nett
#FONT=gothgbt
+
+# Der BESTE!
#FONT=gothgrt
+
#FONT=gothicita
#FONT=gothitt
#FONT=greekc
#FONT=hp_charset0_1
#FONT=hp_charset0_2
#FONT=hp_charset0_3
-#FONT=hp_charset0_4
+FONT=hp_charset0_4
#FONT=hp_charset1_1
#FONT=hp_charset1_2
#FONT=hp_charset1_3
#FONT=romant
#FONT=rowmand
#FONT=rowmans
+
#FONT=rowmant
-FONT=scriptc
+
+#FONT=scriptc
#FONT=scripts
#FONT=symbolic
#FONT=timesg
# Graphics games
-#obj/BOX
-#obj/SQUARE
+ obj/BOX
+ obj/SQUARE
# Text driver
-#obj/PL$TXT
+obj/PL$TXT
# Movement driver
obj/PL$MV
# Matrix operations
-#obj/MATRIX
+obj/MATRIX
# Low level pulse motion driver
obj/PL$U
# Text Font (Selected in makefile)
-#obj/PL$FNT
+obj/PL$FNT
# Matrix debug
obj/PMAT
# Integer output
obj/OCT
+# Teletype IO
+obj/TT$IN
* CALL PL$IDN - RESET TRANSFORMATION MATRIX
*
********************************************************************************
-*
-*
+*
SUBR PL$MV,MOVE
+ SUBR PL$X,XU
+ SUBR PL$Y,YU
SUBR PL$MVR,MVR
SUBR PL$RST,RST
SUBR PL$LN,LINE
SUBR LINE
SUBR PL$RMR,RMR
- SUBR PL$X,UX
- SUBR PL$Y,UY
SUBR PL$MAT,ATRA
SUBR PL$SCL,SCLE
SUBR PL$SCI,SCLI
STA RELA
CALL T$INIT
DAC ATRA
+ CALL PL$PU
JMP* INIT
*
*
LDA* ROT
STA FCR2
IRS ROT
+ IRS ROT
CALL T$ROT
DAC ATRA
FCR2 DAC 0
* PLOTTER TEXT OUTPUT
*
+* PHILIPP HACHTMANN
+* 06.11.2008
*
*
+* USAGE:
+*
+* CALL PL$TXT
+* DAC STACK POINTER TO INITIALIZED STACK
+* DAC TEXT POINTER TO TEXT
+* DAC LENGTH POINTER TO TEXT LENGTH
+* DAC 0 ZERO FOR FORTRAN IV COMPATIBILITY
+*
+* CALL PL$NL
+*
SUBR PL$TXT,FPTX
SUBR PL$TNL,NEWL
*
PADR EQU '40 PORT ADDRESS OF THE PLOTTER INTERFACE
*
*
-* SUBR PL$U,UP
-* SUBR PL$D,DOWN
-* SUBR PL$R,RGHT
-* SUBR PL$L,LEFT
-* SUBR PL$PU,PENU
- SUBR PL$PD,PEND
+ SUBR PL$U,UP
+ SUBR PL$D,DOWN
+ SUBR PL$R,RGHT
+ SUBR PL$L,LEFT
+ SUBR PL$PU,PENU
+ SUBR PL$PD,PEND
SUBR PL$UR,UR
SUBR PL$UL,UL
SUBR PL$DR,DR
SUBR PL$DL,DL
*
*
- REL THIS IS A RELOCATABLE OBJECT
+ REL THIS IS A RELOCATEABLE OBJECT
ORG '0
*
*
* JMP LLL
* IRS CNT
* JMP LLL
-*
*
JMP* OUT
*
LDA CPNU
JST OUT
JMP* PENU
+CPNU OCT '20
*
*
PEND DAC **
JST OUT
IRS PEN
JMP* PEND
+CPND OCT '40
*
*
UL DAC **
ADD CRGT
JST OUT
JMP* UR
+CUP OCT '1
*
*
DL DAC **
ADD CLFT
JST OUT
JMP* DL
+CLFT OCT '4
*
*
DR DAC **
ADD CRGT
JST OUT
JMP* DR
-*
+CRGT OCT '10
+CDWN OCT '2
+*
*
* CONSTANTS
-CUP OCT '1
-CDWN OCT '2
-CLFT OCT '4
-CRGT OCT '10
-CPNU OCT '20
-CPND OCT '40
*
PEN DEC 0 PEN STATE: 1=DOWN
*
*
* CALL S$INIT
* DAC SDATA STACK DATA
-* OCT SSIZ DATA SIZE (NOT STACK DEPTH!!!)
+* DAC SSIZ DATA SIZE (NOT STACK DEPTH!!!)
*
* PUSHING AND POPPING THE A-REGISTER FROM AND TO THE STACK:
*
STA SPTR,1 SAVE TO STACK POINTER
IRS INIT
*
- LDA* INIT LOAD DATA POOL SIZE
+ LDA* INIT LOAD DATA POOL SIZE POINTER
+ STA PTR DEREFERENCE POINTER
+ LDA* PTR LOAD DATA POOL SIZE
SUB VARS VARIABLE SIZE
STA SSIZ,1 SAVE TO STACK DEPTH
*
LDA ATM1
LDX XTM
IRS INIT
+ IRS INIT FOR FORTRAN COMPATIBILITY
JMP* INIT
*
*
--- /dev/null
+* TELETYPE LOW LEVEL I/O
+*
+* CALL TT$IN(BUFFER,COUNT)
+*
+ SUBR TT$IN,KRD
+*
+*
+ REL
+ ORG 0
+KRD DAC *
+ LDA* KRD GET POINTER
+ STA PTR
+ IRS KRD
+ LDA* KRD
+ STA CNT
+ IRS KRD
+ IRS KRD
+*
+ OCP 4
+*
+*********
+LOOP JST GETC
+ STA HI
+ ANA ='177
+ SUB =13
+ SNZ
+ JMP EHI
+ JST GETC
+ STA LO
+ ANA ='177
+ SUB =13
+ SNZ
+ JMP ELO
+ IRS* CNT
+ IRS* CNT
+ LDA HI
+ ALS 8
+ ADD LO
+ STA* PTR
+ IRS PTR
+ JMP LOOP
+***********
+EHI CRA
+ STA* PTR
+ IRS PTR
+ STA* PTR
+ JMP* KRD
+*
+ELO LDA HI
+ ALS 8
+ STA* PTR
+ IRS PTR
+ CRA
+ STA* PTR
+ IRS* CNT
+ JMP* KRD
+*
+PTR DAC **
+CNT DAC **
+HI DAC 0
+LO DAC 0
+*
+******
+GETC DAC *
+ INA '1004
+ JMP *-1
+ JMP* GETC
+******
+ END