Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!magnus.acs.ohio-state.edu!fseipel From: fseipel@magnus.acs.ohio-state.edu (Frank E Seipel) Newsgroups: comp.sys.atari.8bit Subject: Z-Magazine Issue #192 (Part IV) Message-ID: <1991May11.140750.7328@magnus.acs.ohio-state.edu> Date: 11 May 91 14:07:50 GMT Sender: news@magnus.acs.ohio-state.edu Organization: The Ohio State University Lines: 164 Originator: fseipel@bottom.magnus.acs.ohio-state.edu Nntp-Posting-Host: bottom.magnus.acs.ohio-state.edu 8-bit Atari BBS's with full access on first call: A.C.E.C. BBS (614) 471-8559 3oo/12oo/24oo bps Pandora BBS (614) 471-9209 3oo/12oo bps A.C.E.C. has read-only message bases containing Compuserve Atari Forum posts and GEnie roundtable messages. -------------------------------------------------------------------------- width of screen memory, which is 256 characters. I don't know what happens if more than 80 characters are printed to the screen, however, they should all be there. I haven't tried this, but you should be able to horizontally scroll over to read the rest of the message by using the proper CIO call. I also don't know what happens if you try to print more than 256 characters to the status line. Another exercise for the reader. Also, I haven't built an automatic clearing of the status line into the ML routine. You are responsible for clearing the status line of your messages. That can be done by printing a string of spaces to the status line. See line 170 in Listing 1. LISTING 1 110 DIM ML$(126),MSG$(7) 120 FOR I=1 TO 126:READ BYTE:ML$(I,I)=CHR$(BYTE):NEXT I 130 MSG$="MESSAGE" 135 LIST 100,170 140 ? "MESSAGE IS STARTING" 150 GOSUB 210 160 FOR DELAY=1 TO 800:NEXT DELAY 165 LIST 180,1080 170 MSG$=" " 180 ? "MESSAGE IS ENDING" 190 GOSUB 210 200 END 210 XPOS=PEEK(85):YPOS=PEEK(84) 220 X=USR(ADR(ML$),ADR(MSG$),LEN(MSG$),XPOS,YPOS) 230 RETURN 1000 DATA 104,104,141,1,1,104,141,0,1 1010 DATA 104,141,3,1,104,141,2,1,104,104,141,4,1,104,104 1020 DATA 141,5,1,162,0,169,20,141,66,3,169,12,141,74,3 1030 DATA 169,152,141,75,3,32,86,228,162,0,169,11,141,66,3 1040 DATA 173,0,1,141,68,3,173,1,1,141,69,3,173,2,1 1050 DATA 141,72,3,173,3,1,141,73,3,32,86,228,162,0,169 1060 DATA 20,141,66,3,169,12,141,74,3,173,4,1,141,75,3 1070 DATA 32,86,228,162,0,169,20,141,66,3,169,12,141,74,3 1080 DATA 173,5,1,9,128,141,75,3,32,86,228,96 LISTING 2. 110 DATA 865,373,529,260,928,972,422,136,892,679,984,28,413,644,592,8717 1000 DATA 136,898,912,282,393,936,643,15,881,5096 LISTING 3. 1000 *= $5000 ; this code is relocatable, however MAC/65 requires 1010 ; the Program Counter be set during assembly with the 1020 ; *= directive even though it will do nothing during 1030 ; the assembly of this code. 1040 ; 1050 ; condition of stack when entering this routine. 1060 ; num of arguments (one byte: thrown away and not used.) 1070 ; buffer addr (hi byte) 1080 ; buffer addr (lo byte) 1090 ; buffer length (hi byte) 1100 ; buffer length (lo byte) 1110 ; xpos (hi byte) 1120 ; xpos (lo byte) 1130 ; ypos (hi byte) 1140 ; ypos (lo byte) 1150 ; 1160 STOR1 = $0100 ; buffer address 1170 STOR2 = $0102 ; buffer length 1180 STOR3 = $0104 ; x position of cursor before entering this routine 1190 STOR4 = $0105 ; y position of cursor before entering this routine 1200 ; 1210 ICCOM = $0342 1220 ICBAL = $0344 1230 ICBAH = $0345 1240 ICBLL = $0348 1250 ICBLH = $0349 1260 AUX1 = $034A 1270 AUX2 = $034B 1280 CIOV = $E456 1290 ; 1300 ; This segment of code stores all the arguments at the top of the 1310 ; stack on the bottom of the stack -- 1320 ; Thus preventing loss of the values if CIO uses the stack. 1330 PLA ; number of arguments on stack 1340 PLA 1350 STA STOR1+1 ; ICBAH 1360 PLA 1370 STA STOR1 ; ICBAL 1380 PLA 1390 STA STOR2+1 ; ICBLH 1400 PLA 1410 STA STOR2 ; ICBLL 1420 PLA 1430 PLA 1440 STA STOR3 ; XPOS 1450 PLA 1460 PLA 1470 STA STOR4 ; YPOS 1480 ; 1490 ; Routine to move cursor to Status Line. 1500 ; Using an XEP80 Special CIO call. 1510 LDX #$00 1520 LDA #$14 1530 STA ICCOM 1540 LDA #$0C 1550 STA AUX1 1560 LDA #$98 1570 STA AUX2 1580 JSR CIOV 1590 ; 1600 ; Routine to print text buffer. 1610 ; Using a Device Independent CIO call. 1620 LDX #$00 1630 LDA #$0B 1640 STA ICCOM 1650 LDA STOR1 1660 STA ICBAL 1670 LDA STOR1+1 1680 STA ICBAH 1690 LDA STOR2 1700 STA ICBLL 1710 LDA STOR2+1 1720 STA ICBLH 1730 JSR CIOV 1740 ; 1745 ; Routine to return the cursor to its original horizontal position. 1746 ; Using a XEP80 Special CIO call. 1750 LDX #$00 1760 LDA #$14 1770 STA ICCOM 1780 LDA #$0C 1790 STA AUX1 1800 LDA STOR3 1810 STA AUX2 1820 JSR CIOV 1830 ; 1834 ; Routine to return the cursor to its original vertical position. 1836 ; Using an XEP80 Special CIO call. 1840 LDX #$00 1850 LDA #$14 1860 STA ICCOM 1870 LDA #$0C 1880 STA AUX1 1890 LDA STOR4 1900 ORA #$80 1910 STA AUX2 1920 JSR CIOV 1930 RTS 1940 .END ======================================================================= Z*MAGAZINE ISSUE #192 APRIL 24, 1991 =======================================================================