Atari Portfolio as a Linux-Terminal
Assemble APTerm.com on DOS.
You need the assembler program apterm.dbg and the DOS utility 'debug'.
The terminalprogramm APTerm.com as a assembler program (apterm.dbg)
A 100
MOV AH,2 ; procedure: read keyboard
INT 16 ; Check if Shift left and right pressed
AND AL,03 ; clear bit 2-7
CMP AL,03 ; bit 0 high and bit 1 high ?
JE 130 ; jump to the end of the program
MOV AH,1 ; is a char available?
INT 16 ;
JZ 11B ; if no char available: goto 'read serial port'
MOV AH,0 ; if char available: get char (in AL)
INT 16
MOV AH,1 ; send char (from AL) to serial port
INT 14
JMP 100 ; goto 'read keyboard'
NOP
NOP
NOP
NOP
A 11B
MOV AH,2 ; procedure: read serial port
MOV DX,0 ; is a char in the serial port buffer ?
INT 14
ROL AH,1 ; if there is no char: goto 'read keyboard'
JB 100
MOV AH,0E ; if there is a char:
MOV BL,0 ; display it on the screen
INT 10
JMP 100 ; main loop
NOP
NOP
NOP
NOP
NOP
A130
MOV AH,4C ; prepare return to DOS
INT 21
SBB BH,[SI] ; Ctrl-Z, terminates the copy procedure
NOP ; on the Atari Portfolio
NOP
NOP
NOP
NOP
N APTERM.COM
RCX
38
W
Q
DOS: Assemble it with:
debug < apterm.dbg
And you got the executable file apterm.com.Hexdump of the terminalprogramm APTerm.com (52 Bytes)
Hexdump:
0100 B4 02 CD 16 24 03 3C 03-74 26 B4 01 CD 16 74 0B
0110 B4 00 CD 16 B4 01 CD 14-EB E6 90 B4 02 BA 00 00
0120 CD 14 D0 C4 72 DA B4 0E-B3 00 CD 10 EB D2 90 90
0130 B4 4C CD 21 1A 3C 90 90
Go to
[ Index ]
[ Minux ]
[ Program ]
[ Link ]
Questions ? Ask
program@online-center.com
File: apterm_d.htm Last update: Tue Apr 4 02:35:04 2000