Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site pucc-k Path: utzoo!watmath!clyde!cbosgd!ihnp4!inuxc!pur-ee!CS-Mordred!Pucc-H:Pucc-I:Pucc-K:aaz From: aaz@pucc-k (Marc Mengel) Newsgroups: net.micro.cbm Subject: roman numerals contest entry (where is ...!looking!... ??) Message-ID: <617@pucc-k> Date: Sun, 25-Nov-84 22:59:34 EST Article-I.D.: pucc-k.617 Posted: Sun Nov 25 22:59:34 1984 Date-Received: Tue, 27-Nov-84 03:45:21 EST Organization: Undue Purversity Lines: 32 ; roman numerals print routine for contest ; 6502 version by Marc Mengel & ; Kevin Braunsdorf ; Purdue University {ihnp4|decvax}pur-ee!pucc-i!aaz ; 25 Nov 1984 table0 dfb 1 ,4 ,5 ,9 ,10 ,40 ; values dfb 45 ,49, 50 ,90 ,95 ,99 ,100 table1 txt 'iivixxvilxvic' ; first characters table2 dfb 00,'v',00,'x',00,'l' ; second characters dfb 'll',00,'ccc', 00 roman ldx #12 ; length of table loop1 cmp table0,x ; >= table value? bcc nosub sbc table0,x ; yes !! pha ; save decremented value lda table1,x jsr PRINT ; print letters lda table2,x ; ascii 0 does nothing jsr PRINT pla ; recover value bne loop1 ; looks better as jmp... nosub dex ; bottom of table?? bpl loop1 stop rts ; yes!! go home end roman ; total number of byte 66