johnw@reed.UUCP (John Windberg) (09/10/85)
I am still searching for a graphics package for the Tandy 2000's MS-dos Pascal. As it stands graphics are unattainable. I would simply like to be able to switch graphics modes and set a single dot. From there I can get what I need. Including some nifty 3-d routines worked out by the Reed College Physics department, translated from machine to machine by yours truly. The big if now is graphics commands on the 2000. Anybody out there know where or how I might be able to find a graphics package of sorts? thanks in advance. johnw@reed P.S. There is a program in this months 80-micro that makes a mod III or IV emulate mac-paint on the apple macintosh. Being in an apple consortium school surrounded by macs, I would love a copy of this program. I am willing to trade,beg borrow or plead to obtain said program. thanks again johnw
earl@trsvax (09/17/85)
Graphics on a Tandy 2000 using MS-PASCAL. Actually, it is fairly easy to do graphics on the machine. Especially when using MS-PASCAL. All you need is Microsoft's Assembler and you're in business. For example: ;**************************** ;* ;* PASCAL PROCEDURE PIXEL ;* ;* Called like so: ;* PIXEL(row,col,color: integer); external; ;* ;**************************** ; data segment public 'data' data ends dgroup group data assume cs:adds,ds:dgroup,ss:dgroup adds segment 'code' public pixel pixel proc far push bp ;save regs push cx push dx mov bp,sp ;setup pntr to stack mov dx,14[bp] ;get row val mov cx,12[bp] ;get col val mov al,10[bp] ;get pixel color mov ah,12 ;set up fot MSDOS funct call int 10h ;go write the pixel pop dx ;restore regs pop cx pop bp ret 6 ;return and clear stack pixel endp adds ends end You also have to be able to set the screen mode, if you want to get into graphics. Thus you could use: ;********************************** ;* ;* PASCAL PROCEDURE SCREEN ;* ;* Called like so: ;* ;* SCREEN(mode: integer); external; ;* ;*********************************** ; data segment public 'data' data ends dgroup group data assume cs:adds,ds:dgroup,ss:dgroup adds segment 'code' public screen screen proc far push bp ;save regs mov bp,sp ;setup pntr to stack mov al,6[bp] ;get screen mode mov ah,00h ;set up for DOS funct call int 10h ; go set screen mode pop bp ;restore reg ret 2 ;return and clear stack screen endp adds ends end Anyway, you use the assembler to create a Relocatable Object File, then use the LIB command to merge these into a library file, Then within a Pascal program declare these procedure to be external. When you get to the LINKing stage, just add the library to the list. Tandy sells a Programmer's Reference Manual for about $20.00 that has more detailed information on using MSDOS and BIOS function calls. By using these functions and the assembler and LIB commands, a user/prog- grammer can build up a fairly sizable set of graphics functions on their own. I think that since it is fairly simple to create one's own custom graphics library package, that nobody bothered to do it. This information is provided by an individual and is not supported by TANDY Corporation.