home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.cbm
- Path: sparky!uunet!spool.mu.edu!umn.edu!csus.edu!netcom.com!fuzzy
- From: fuzzy@netcom.com (Fuzzy Fox)
- Subject: Re: Programming Question
- Message-ID: <0=yn1=m.fuzzy@netcom.com>
- Date: Mon, 14 Sep 92 06:35:31 GMT
- Organization: Foxes 'R' Us - Seven locations to serve you
- References: <1992Sep12.190730.17219@ultb.isc.rit.edu>
- Lines: 49
-
- whd0675@ritvax.isc.rit.edu writes:
-
- >What is the equivalent of this in assembler instead of BASIC:
-
- > 500 input#15,en,em$,et,es
- > 510 if en>0 then print en,em$et,es:stop
- > 520 return
-
- chkin = $ffc6
- clrchn = $ffcc
- chrin = $ffcf
- chrout = $ffd2
-
- errbuff .byte 80 ; Buffer to store error message
-
- ldx #15 ; Use #15 as standard input
-
- jsr chkin
-
- ldy #0
- loop1 jsr chrin
- sta errbuff,y
- iny
- cmp #$0d ; Carriage return ends input
- bne loop1
-
- jsr clrchn ; Clear standard input.
-
- lda errbuff ; Check for "00"
- cmp #'0'
- bne error
- cmp errbuff+1
- bne error
-
- rts ; All is okay, no error.
-
- error ldy #0 ; Print error message
- lda errbuff,y
- jsr chrout
- cmp #$0d
- bne error
-
- rts
-
- --
- #ifdef TRUE | Fuzzy Fox fuzzy@netcom.com
- #define TRUE 0 | a.k.a. David DeSimone an207@cleveland.freenet.edu
- #define FALSE 1 |
- #endif | How's my posting? Call 1-800-ALT-FLAME
-