Path: news.uiowa.edu!news.physics.uiowa.edu!math.ohio-state.edu!uwm.edu!news.cse.psu.edu!news.math.psu.edu!news.cac.psu.edu!howland.reston.ans.net!news-e2a.gnn.com!newstf01.news.aol.com!newsbf02.news.aol.com!not-for-mail From: babarstcyr@aol.com (BabarStCyr) Newsgroups: comp.sys.apple2.comm Subject: Re: Terminal Program Date: 20 May 1996 20:37:02 -0400 Organization: America Online, Inc. (1-800-827-6364) Lines: 97 Sender: root@newsbf02.news.aol.com Message-ID: <4nr37e$5dt@newsbf02.news.aol.com> References: Reply-To: babarstcyr@aol.com (BabarStCyr) NNTP-Posting-Host: newsbf02.mail.aol.com Hi I wrote this program after reading "Apple 2c Ref Manual". I think it's not possible to do more simple! If you have no assembly language try with mini-assembly included in your 2c rom. Babar de Saint Cyr 65C02 on org $2000 ttu start dataint equ $08 txempty equ $10 intmask equ $77 tolower equ $7F toupper equ $80 LF equ $0A irqloc equ $03FE txthole equ $04FA txthole2 equ $04FF $04FC for a memory expanded //c & later buf equ $3000 kbd equ $C000 kbdstrb equ $C010 p2txrcv equ $C0A8 p2status equ $C0A9 p2comnd equ $C0AA p2contl equ $C0AB go80 equ $C300 cout equ $FDED longa off longi off jsr go80 PR#3 lda kbdstrb clear keyboard strobe sei disable interrupt lda #myint sta irqloc+1 stz txthole2 user mark lda #%00011010 1 stop bit/8 bits/internal clock/2400 sta p2contl lda #%00001001 no parity/echo off/int on receiver only sta p2comnd cli enable interrupt begin anop lda lit+1 reading index = writing index ? cmp ecrit+1 beq next yes so none new char waiting lit lda buf get new char inc lit+1 adjust reading index bpl lit2 " stz lit+1 " lit2 cmp #LF = LF ? beq next yes (trash all LF) ora #toupper go upper ASCII jsr cout display char next lda kbd read keyboard bpl begin key pressed? tax yes, save it lda kbdstrb clear keyboard strobe next2 lda p2status and #txempty mask all ones but empty bit beq next2 not ready txa restore acc and #tolower down lower ASCII sta p2txrcv char on telegraph road... bra begin myint anop lda txthole is for ACIA 2 ? bpl exit no exit and #dataint is a receive data interrupt beq exit no exit lda txthole acknowledge interrupt and #intmask sta txthole lda p2txrcv get char ecrit sta buf write in buffer inc ecrit+1 adjust writing index bpl exit " stz ecrit+1 " exit rti end