funkheld Posted January 12, 2012 Share Posted January 12, 2012 (edited) atari800xl (Altirra) as with the graphics .... xio : draw, fill , plot? I would then incorporate this into theVOLKSFORTH. a course? GRUSS Edited January 12, 2012 by funkheld Quote Link to comment Share on other sites More sharing options...
Rybags Posted January 12, 2012 Share Posted January 12, 2012 These should really go in the programming section. Do you have the OS Manual? It has the info you need. It's online in PDF in various places (I had a thread with it in, but chances are the site doesn't exist anymore). Plot is essentially just a PUT CHARACTER. First you set the COLCRS and ROWCRS to where the pixel is to go. If you just keep doing Put Chr, the pixels go left to right. Clear screen and <EOL> function as normal. Draw line and Fill come under CIO Special commands. For Draw, you set NEWROW/NEWCOL. You don't necessarily need to use IOCB #6 like Basic does, I guess a good implentation might be to use it as default but allow others if specified. I don't have all the info in front of me, but could get it if you can't find an OS manual. Quote Link to comment Share on other sites More sharing options...
Rybags Posted January 12, 2012 Share Posted January 12, 2012 Draw command is $11. I think the info I posted re Newrow/Newcol is wrong. The handler maintains the Old/New variables, so you should just set Colcrs/Rowcrs, plot the point then set them again to the end point of the line then call with the Draw command. Fill command is $12. Quote Link to comment Share on other sites More sharing options...
funkheld Posted January 12, 2012 Author Share Posted January 12, 2012 hello, thank you. I ABBUC from the system's manual for the atari800xl but there is no detail for a beginner step inside from the first plot to the first. 1. step 2. step 3. step ..... thanks Quote Link to comment Share on other sites More sharing options...
russg Posted January 13, 2012 Share Posted January 13, 2012 (edited) I'm not sure what you're after. XIO 18,#6,0,0,"S:" is a XIO drawto fill command. Here's a little drawto program in Atari BASIC 10 GRAPHICS 7 12 SETCOLOR 4,0,15 15 CC=79:CR=44 16 TC=79:TR=0 17 RC=125:RR=70 18 LC=34:LR=70 92 COLOR 2:SETCOLOR 1,6,4 100 PLOT RC,RR 110 DRAWTO CC,CR 120 DRAWTO CC,CR 130 POSITION LC,LR 140 POKE 765,2:XIO 18,#6,0,0,"S:" 142 SETCOLOR 0,3,4:COLOR 1 144 MC=50 150 PLOT CC,CR:DRAWTO TC,TR:DRAWTO TC,TR:POSITION MC,CR:POKE 765,1:XIO 18,#6,0,0,"S:" 160 PLOT CC,CR:DRAWTO LC,LR:DRAWTO LC,LR:POSITION MC,CR:XIO 18,#6,0,0,"S" 170 MC=107 172 SETCOLOR 2,12,2:COLOR 3:POKE 765,3 180 PLOT MC,CR:DRAWTO TC,TR:DRAWTO TC,TR:POSITION CC,CR:XIO 18,#6,0,0,"S:" 190 PLOT RC+1,RR:DRAWTO MC,CR:DRAWTO CC,CR:POSITION RC,RR:XIO 18,#6,0,0,"S:" Makes this: The .BAS file XIODRAW.zip Edited January 13, 2012 by russg Quote Link to comment Share on other sites More sharing options...
Rybags Posted January 13, 2012 Share Posted January 13, 2012 Basic stuff aside from XIO doesn't really give an insight into what happens behind the scenes. Since he's developing library functions for a low(ish) level language, he needs to know the low level stuff. Quote Link to comment Share on other sites More sharing options...
russg Posted January 13, 2012 Share Posted January 13, 2012 XIO commands are calls to the BASIC cart, and maybe use CIOV. I don't think it is simple to put XIO-like commands in assembler, and if you did it would require BASIC. I think. Quote Link to comment Share on other sites More sharing options...
Rybags Posted January 13, 2012 Share Posted January 13, 2012 (edited) XIO calls CIOV allowing the program to specify IOCB#,Aux1, Aux2, and command. It can serve as a good example of a calling sequence since any other parameters have to be Poked in. Practically all the other file and graphics statements use CIO too, but don't serve well for examples because all the grunt work happens behind the scenes. Doing XIO stuff in Assembler - easy. IOCB *16 goes in register X, the other stuff gets stored in the IOCB. XIO is only so useful though, no good for Buffer_Length=0 stuff where the data is passed via A. I should add to this, in the spirit of the original request: The OS Fill is pretty useless, very simple algorithm with no stacking mechanism. Providing a flood fill would be a good inclusion to any language, but the stack required for complex fills could be potentiall enormous. The diamond fill algorithm is slower, but much less costly in stack space. IIRC it comes to something like 4 X/Y entries * <max resolution used> - so under 2K or so for most modes, somewhat bigger for Graphics 8 since X co-ords take 2 bytes. Edited January 13, 2012 by Rybags Quote Link to comment Share on other sites More sharing options...
russg Posted January 13, 2012 Share Posted January 13, 2012 (edited) Well. I worked on this some, so I'll post what I dug up. It is the XIO commands from 'Your Atari Computer'. You can get the assembler use of CIOV (IOCB) from De Re Atari. YACXIO.PDF Edited January 13, 2012 by russg Quote Link to comment Share on other sites More sharing options...
funkheld Posted January 13, 2012 Author Share Posted January 13, 2012 hello, all thanks you !!! gruss Quote Link to comment Share on other sites More sharing options...
Tin_Lunchbox Posted January 13, 2012 Share Posted January 13, 2012 That XIO fill command in Atari BASIC is really really slow IIRC. You might consider another method to do whatever it is. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.