Subject: One last thing (very long) Date: Wed, 6 May 1998 19:58:18 -0600 (MDT) From: Mark Iuzzolino To: "Ing. Franz Glaser" On Wed, 6 May 1998, Mark Iuzzolino wrote: > > I never found your name > > on any of the response mails, where questions were answered. ==================================================================== THIS WAS OBVIOUSLY A TERRIBLE ERROR, PLEASE EXCUSE ME (Franz Glaser) ==================================================================== Here are my posts: Article 21867 of comp.lang.pascal.borland: Path: nmia!plato.nmia.com!monsters From: monsters@plato.nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: Physical address from GlobalAlloc Date: 20 Oct 1996 19:58:55 GMT Organization: NMIA Lines: 54 Message-ID: <54e09v$lsh@hume.nmia.com> References: <548k5r$f7o@newsreader.wustl.edu> NNTP-Posting-Host: plato.nmia.com In article <548k5r$f7o@newsreader.wustl.edu>, Jonathan M. Elson wrote: >I need to get the physical address of a block of memory obtained by >a GlobalAlloc in TPW 1.5 under Windows 3.0. Does anyone know how to do >this? I'm still trying to find out whether Windows 3.0 runs in >plain protected mode or paged protected mode (it makes a difference). >If it is plain protected mode (bit 31 of CR0 is 0) I think I know how >to do this by reading the GDT register and then finding the beginning >of the GDT, but it is pretty complicated. Is there any routine either >in Windows thad does this, or in an archive somewhere that tells how to do >it? > >I need to put the physical address into the DMA controller to do DMA from >the memory block. If you use GlobalDosAlloc you can use the high-order word for the segment address. uses winapi; var RMPtr,PMPtr:pointer; L:longint; begin L:=GlobalDosAlloc(32000); RMPtr:=ptr(L shr 16,0); {this is now a real mode pointer} PMPtr:=ptr(L,0); {this is now a Protected Mode pointer} end. If you use GlobalAlloc instead, you can do the following: uses winapi; function GetSegBaseAddr(Selector:word):longint; assembler; asm mov ax,301h mov bx,Selector int 31h mov ax,dx mov dx,cx end; var RMPtr:pointer; MySelector:THandle; begin MySelector:=GlobalAlloc(GHND,32000); RMPtr:=ptr(GetSegBaseAddr(MySelector) shr 4,0); {RMPtr is now a real mode pointer} end. There are no guarantees, however, that you will be able to access the real mode pointer via DMA. -- Mark Iuzzolino one of the monsters@nmia.com In article <32B24FD7.2EDB@sn.no>, Asbjørn wrote: >Tenie Remmel wrote: >> > function wa_abs (w : integer) : word; assembler; >> > asm >> > mov ax,[w] >> > or ax,ax >> > jns @okay >> > @negate: >> > xor ax,1111111111111110b >> > @okay: >> > end; >> >> This is wrong. If you give it -2 (1111111111111101b) it will output >> 3 (0000000000000011b) which isn't 2. >> Change that 'Xor ax,1111111111111110b' for a 'Neg AX'. > >Is there a way of do the abs function without jumping? > >- Asbjørn Yes, but it doesn't necessarily mean that it will be faster. For use with assembly, you can do the following (initial value in EAX, return value in EAX; destroys EDX): cdq xor eax,edx sub eax,edx Here is the [Borland] Pascal equivalent for integers: function absval(val:integer):word; inline($58/ { pop ax} $99/ { cwd } $33/$c2/ { xor ax,dx } $2b/$c2); { sub ax,dx } --Mark Iuzzolino One of the monsters@monstersoft.com http://www.monstersoft.com I'm trying to do the following: type Tfoo=object x,y:word; procedure foobar; end; {$L asmobj} procedure TFoo.foobar; external; I'm trying to code Tfoo.foobar as an external assembly routine. I've run into a snag in that I cannot find the syntax for doing this. Obviously declaring it as: GLOBAL Tfoo.foobar:PROC won't work, as the compiler doesn't like the period between Tfoo and foobar. I know how to declare the object w/ TASM.. but I cannot get BP (7.0) to recognize the method. Here is [one possible] declaration in TASM: TFoo struc METHOD { foobar:dword = Tfoo_Foobar } x dw ? y dw ? Tfoo ENDS TFoo_Foobar proc ret Tfoo_Foobar endp Does anyone know how to do this? --Mark Iuzzolino One of the monsters@monstersoft.com http://www.monstersoft.com In article <32B6A31D.3FBB@primenet.com>, Mike Copeland wrote: >> Mike Copeland wrote: [snip] >> > Of course, this begs the question of _why_. He sees references and >> > code for inserting assembler code in TP programs, but he doesn't state >> > what his reason for wanting (needing?) to do so. IMHO it's unnecessary >> > for all but the most unusual applications, and the use of assembler is >> > extremely overdone. [snip] >Asbjørn wrote: >> And what about all those great program that has some asm in them? Every one >> of mine has at least a couple of lines. Ok, I don't really need them to >> be in asm, and they're not great (that's my programs :), but many >> things are a lot easier to write in asm than in pascal. > > "Easier to write in asm than Pascal"? That says your experience in >Pascal is limited or that you're ignoring the extra effort to write >one-for-one hardware instructions (and debug them) versus the benefits >of having many machine instructions generated from one Pascal statement. This is an incredibly naieve statement. There are many things that one can do in assembler that have no equivilant in Borland Pascal. I believe that the reason we use assembler is to deal with the inefficiencies of the compiler. BP is a wonderful programming environment. But, let's face it, BP is still a barely-optimizing 16-bit compiler. However, my colleagues and I have been using BP 7.0 as a 48-bit (16-bit selector, 32-bit offset) protected mode compiler (for dealing with large linear graphics buffers). There is no way one could do this without using assembler. >Years ago, I, too, _felt_ it was "easier" to write many assembler >instructions instead of figuring out which Pascal statement to use - >when my 20+ years of experience with it outweighed my knowledge of >Pascal, but only because I didn't know the HLL well enough. Use your 20+ years of experience and do a rep movsd (48-bit addressing/ 32-bit count) without any assembly. ;) ... Actually, as a forethought, there is a way of doing this without any assembly... but it isn't pretty, and debugging would be nearly impossible. (involves arrays, variables of type procedure, and self-modifying code) --Mark Iuzzolino One of the monsters@monstersoft.com http://www.monstersoft.com Article 24725 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: problems with SVGA in protected mode Date: 31 Jan 1997 01:07:47 GMT Organization: MonsterSoft Lines: 60 Message-ID: <5crgl3$mq2@hume.nmia.com> References: <32E7645C.522F@akh-wien.ac.at> <5ci8ni$crv@rznews.rrze.uni-erlangen.de> <32ED18E2.277A@bigfoot.com> <32EF1208.7267@ix.netcom.com> NNTP-Posting-Host: plato.nmia.com In article <32EF1208.7267@ix.netcom.com>, Scott Earnest wrote: >PROBE TEAM wrote: > >> You are in deep water my son, all the things you desribe is very tricky >> to perform, the SVGA *I belive* doesn't work cause tha VESA (1.2) >> functions is not supported in protected mode. I belive you have to >> use VESA 2.0 but that is only supported when you have liner 32 bit >> addressing so you can't use it in BP:s (fucked up memory) > >Do a little more research, then. You can definitely use VESA from >protected mode code. It's just a bit slower because you need to pass >the interrupt requests through the PM interface, which in turn calls the >real mode interrupt and coordinates all the registers. You can call the bank-switch routine directly from protected mode. The code looks something like this: type dword=record LoWord,HiWord:word; end; var SwitchBank:procedure; VesaSelector,CodeSelector:word; procedure OldSwitchBank; far; assembler; asm mov ax,4f05 int 10h end; {...} If BankSwitch=NIL then @SwitchBank:=@OldSwitchBank else begin SetSelectorBase(VesaSelector,longint(dword(BankSwitch).HiWord)*16); SetSelectorLimit(VesaSelector,65535); CodeSelector:=AllocDStoCSAlias(VesaSelector) @SwitchBank:=ptr(CodeSelector,Dword(BankSwitch).LoWord) end; BankSwitch is the real-mode procedure address. SwitchBank then becomes the procedure you call to change the current bank. To obtain the real-mode address you must call function 4f01 of Int 10h. The PM version requires a real-mode callback. There is an example of how to get VESA information from either real or protected mode on our website at: http://www.monstersoft.com/tutorial1/VESA_info.html or directly from: http://www.monstersoft.com/download/vesainfo.zip >It is probably true that as is, a VESA 2.0 linear frame buffer can't be >created or used in BP7 Although I haven't seen anyone actually do this, I am still working on it, and making some progress. -- Mark Iuzzolino | "If we're not a game company, what One of the monsters@monstersoft.com | are we?" http://www.monstersoft.com/ | "A cult!" Article 24691 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: Protected mode & memory access (BP7) Date: 29 Jan 1997 11:22:12 GMT Organization: MonsterSoft Lines: 35 Message-ID: <5cnbt4$1sh@hume.nmia.com> References: <32E72211.6A06@sn.no> <32E73E36.11EB@Renault.FR> <32E85B2E.B26@ix.netcom.com> NNTP-Posting-Host: plato.nmia.com In article <32E85B2E.B26@ix.netcom.com>, Scott Earnest wrote: >Antoine Leca wrote: > >> [snip] >So it kept on going, no problem. I suppose then that I made a bad >assumption that the physical limitation of 16MB on a 286 would be >reflected in a 16-bit DPMI server. The 64K limit still exists, of >course. Actually, by using the NewFrontier unit, one can allocate all the memory on a PC, and use it as flat memory. The only limits are that it *must* run in Protected Mode (obviously), and you can allocate a maximum of 2^46 bytes (or 64 terabytes) as multiple 4 gigabyte segments. Of course, allocating that much memory is purely theoretical, since no one has that much. However, I did successfully allocate a single contiguous buffer that was 32208460 bytes long. The URL for this unit is: ftp://x2ftp.oulu.fi/pub/msdos/programming/pmode/s3unit3.zip (no examples) or, you can download a slightly modified/updated version from our web-site (with examples) at: http://www.monstersoft.com/download/newfront.zip PS: Source is included, and it is free =). >Scott Earnest --Mark Iuzzolino One of the monsters@monstersoft.com | "We've already eaten the http://www.monstersoft.com | competition." Article 24711 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: Protected mode & memory access (BP7) Date: 30 Jan 1997 07:49:05 GMT Organization: MonsterSoft Lines: 50 Message-ID: <5cpjph$dhp@hume.nmia.com> NNTP-Posting-Host: plato.nmia.com In article <01bc0d41$ce35d100$5fed4ec1@Pnmjcaspers>, Marco Caspers wrote: >Michael Tippach schreef in artikel ><32EC0AB1.62EC@REMOVE_TO_REPLY.dialin.deh.de>... [snip] >> Let's not doubt about the 17 MB reported. .... BUT: >> The DPMI doc's explicitely state that, while setting a >> descriptor base address, the highest 8 bits of the 32 bit >> base address are ignored in a 16 bit implementation EVEN >> WHEN RUNNING ON A 386 (or better). > >So what? >I'ts a descriptor, not a selector! >A descriptor points to a table, a selector points to memory, the selector >is 32 bits so you can address up to 4Gb! A virtual address on the 80386+ is specified by two numbers, a selector and an offset. The selector is a 16-bit value that serves as a virtual name for a memory segment. The offset is the distance from the beginning of the segment, and it is a 32-bit value. The system uses the selector as an index into its descriptor tables. That aside, it is actually possible to allocate more than 4Gb of memory. In a segmented model of memory organization, the logical address space consists of as many as 16,383 segments of up to 4 gigabytes each, or a total as large as 2^46 bytes (64 terabytes). [snip] >> After all, I'm not too familar with Borland's "extensions" >> to the DPMI standard since I'm using the Delphi 2^H^H^H^H^H^H^H^H >> compiler backend for my TP/DOS programs, together with >> a 32 bit DPMI host, where the above problems (and others) >> basically do not exist. ;-) The above problems don't exist with BP7.0. It just takes a little coaxing to get the compiler to actually allocate flat memory. However, once you have the right tools it is very easy to allocate as much memory as the computer has, and use it as one large contiguous chunk. As I mentioned in a previous post, there exists a unit called NewFrontier that does exactly this. The two URLs you can obtain this unit from (that I am aware of) are: http://www.monstersoft.com/download/newfront.zip (contains examples) or ftp://x2ftp.oulu.fi/pub/msdos/programming/pmode/s3unit3.zip Everyone that writes protected mode programs that require a lot of memory should have this unit. --Mark Iuzzolino One of the monsters@monstersoft.com | "When we're not coding http://www.monstersoft.com/ | we're eating the furniture." Article 25083 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: >>> Dynamic array sample <<< Date: 10 Feb 1997 23:45:37 GMT Organization: MonsterSoft Lines: 43 Message-ID: <5dobv1$3cq@hume.nmia.com> References: <5cpng8$8tv@sugar.h.belgacom.be> <32fa43e3.5016687@news.dca.net> NNTP-Posting-Host: plato.nmia.com In article <32fa43e3.5016687@news.dca.net>, Don Stauffer wrote: >>: Somebody somewhere wrote: >>: >I need to create an array of longints but I don't know when will it end >>: >because the end of this array readed from keyboard. How can I do it? I >>: >have tried to find something in help system but couldn't. >>: [snip] >This appears to be a linked list, not a dynamic array. The important >difference is that to get to an element in the middle of a linked >list, you have to step through all other elements rather than simply >indexing an array. Also, you must allocate memory for each element as >a separate function call. > >In C, once you know how many elements are to be in the array (at run >time) you can do something like this: > >long *p; > >p = (long *) malloc (n * sizeof (long)); /* Array is 0 based */ >if (p == null) /* Error handling routine */ > >p[5] = 100000; /* Assuming n is greater than 5 */ >Can you do anything like this in Pascal? I tried and failed. Very >interested in an answer to this. type TWordArray=array[0..maxint-1] of word; var DynArray:^TWordArray; NumOfElements:integer; begin NumOfElements:=3000; getmem(DynArray,NumOfElements*sizeof(word)); DynArray^[5]:=42; freemem(DynArray,NumOfElements*Sizeof(word)); end. You are limited to a dynamic array of 64K. There are ways of allocating more than 64K arrays, but they require BP7. Email us if you want an example. --Mark Iuzzolino One of the monsters@monstersoft.com | "Sooner better than later; later http://www.monstersoft.com/ | better than never at all." Article 25610 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: Speeding things up with Inline-Assembly Date: 24 Feb 1997 23:10:18 GMT Organization: MonsterSoft Lines: 31 Message-ID: <5et74q$2pg@hume.nmia.com> NNTP-Posting-Host: plato.nmia.com In article <105575341wnr@jayman.demon.co.uk>, Jason Burgon wrote: >In article: <330DA2E2.4E8@ix.netcom.com> Scott Earnest >writes: >>The procedure call here is actually relatively fast, since it's a near >>relative call, but far calls take longer, and in protected mode the >>calling time for a far call for a simple procedure like that might be >>several times the amount of time required to execute the actual code >>body! >A far call on a 486 takes 18 cycles in real mode and 20 cycles in protected >mode according to my TASM reference manual. They do take twice as long as >a RM far call on 286's and 386's (~26+m and ~34+m respectively). Anyone >know what the score is on a Pentium? According to the Pentium Processor User's Manual (Volume 3: Architecture and Programming Manual): Opcode Instruction Clocks Description C3 RET 2 Return (near) to caller CB RET 4 Return (far) to caller, same privilege CB RET 23 Return (far), lesser privilege, switch stacks C2 iw RET imm16 3 Return (near), pop imm16 bytes of paramaters CA iw RET imm16 4 Return (far), same privilege, pop imm16 bytes CA iw RET imm16 23 Return(far), lesser privilege, pop imm16 bytes I'll run some time tests on my pentium and post the results in a bit. --Mark Iuzzolino One of the monster@monstersoft.com | "We've already eaten http://www.monstersoft.com | the competition." Article 25739 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: Networking questions Date: 27 Feb 1997 23:32:37 GMT Organization: MonsterSoft Lines: 22 Message-ID: <5f55il$bt8@hume.nmia.com> References: <01bc20c2$a4eef800$14e74cc3@administracio> NNTP-Posting-Host: plato.nmia.com In article <01bc20c2$a4eef800$14e74cc3@administracio>, INFOSELVA, S.L. wrote: >I just developed a program with TP7.0 in text mode, and now it must run >under network connexion, the problem I have is as follow: > >The program use differents files with commands like assign, reset, rewrite >and close, but now if I try to open an already opened file (by another >user) the program gets out. How can I access to this information at the >same time? or, which is the instruction(s) I have to use in networking >code. FileMode:=$42; When you do this, however, make sure you use reset() to open the file, not rewrite(). This works on Novell networks, and probably Win95 and NT networks. However, it does *not* work under Banyan VINES. AFAIR, there is a file attribute that you have to change using one of the file utilities that comes with Banyan. I'm sure that there is an interrupt call that will allow you to change the attribute, which one could find in Ralph Brown's Interrupt list. --Mark Iuzzolino One of the monsters@monstersoft.com | "Doesn't everybody make offerings to http://www.monstersoft.com | the technology gods?" Article 25610 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: Speeding things up with Inline-Assembly Date: 24 Feb 1997 23:10:18 GMT Organization: MonsterSoft Lines: 31 Message-ID: <5et74q$2pg@hume.nmia.com> NNTP-Posting-Host: plato.nmia.com In article <105575341wnr@jayman.demon.co.uk>, Jason Burgon wrote: >In article: <330DA2E2.4E8@ix.netcom.com> Scott Earnest >writes: >>The procedure call here is actually relatively fast, since it's a near >>relative call, but far calls take longer, and in protected mode the >>calling time for a far call for a simple procedure like that might be >>several times the amount of time required to execute the actual code >>body! >A far call on a 486 takes 18 cycles in real mode and 20 cycles in protected >mode according to my TASM reference manual. They do take twice as long as >a RM far call on 286's and 386's (~26+m and ~34+m respectively). Anyone >know what the score is on a Pentium? According to the Pentium Processor User's Manual (Volume 3: Architecture and Programming Manual): Opcode Instruction Clocks Description C3 RET 2 Return (near) to caller CB RET 4 Return (far) to caller, same privilege CB RET 23 Return (far), lesser privilege, switch stacks C2 iw RET imm16 3 Return (near), pop imm16 bytes of paramaters CA iw RET imm16 4 Return (far), same privilege, pop imm16 bytes CA iw RET imm16 23 Return(far), lesser privilege, pop imm16 bytes I'll run some time tests on my pentium and post the results in a bit. --Mark Iuzzolino One of the monster@monstersoft.com | "We've already eaten http://www.monstersoft.com | the competition." Article 26330 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: Not 320X300 ????????? Date: 12 Mar 1997 11:55:19 GMT Organization: MonsterSoft Lines: 17 Message-ID: <5g65j7$jdt@hume.nmia.com> References: <01bc2d96$3600d5e0$299f07c4@afriend.iafrica.com> <5g378k$9m3@freenet.unbc.edu> NNTP-Posting-Host: plato.nmia.com In article <5g378k$9m3@freenet.unbc.edu>, Hilton Janfield wrote: > >>Anyone has a procedure for going into 800X600X256 ? > >For that, the user *HAS* to support VESA 1.2+. >And you have to use VESA code. Actually, every video card [that can support that resolution] has a non VESA BIOS mode number for 800x600x256. However, that number can (and quite frequently does) change depending on the vendor of the card. > Valdus --Mark Iuzzolino One of the monsters@monstersoft.com | "Okay, so carrots don't have blood. http://www.monstersoft.com | Who knew?" Article 26361 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: Help : How to make use of arrow Keys in Pascal Date: 12 Mar 1997 21:21:57 GMT Organization: MonsterSoft Lines: 29 Message-ID: <5g76pl$o3p@hume.nmia.com> References: <5eukk8$5t@news2.jaring.my> <3318e42d.392439@news.internetland.net> <5g4h3n$r1o$1@sys10.cambridge.uk.psi.net> NNTP-Posting-Host: plato.nmia.com In article <5g4h3n$r1o$1@sys10.cambridge.uk.psi.net>, Matt Parkins wrote: >--[ggrotz@internetland.net (Programmer Dude) was heard to say]-- > >>On Tue, 25 Feb 1997 12:09:59 GMT, wongkt@pl.jaring.my (Ray) wrote: > >>>1. How do I get use of the arrow keys so I can use it to select an >>>option, instead of having to type an option number? > >>Look up readkey. > >Actually, readkey returns zero for the arrow keys. >I'd be interested in a solution that someone might have for this. ky:=upcase(readkey); case ky of #0:case readkey of #75:GoLeft; #80:GoDown; #72:GoUp; #77:GoRight; end; end; This *must* be in the FAQ..? --Mark Iuzzolino One of the monsters@monstersoft.com | "Who do you want to kill today?" http://www.monstersoft.com | Article 26362 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: File Randomness Date: 12 Mar 1997 22:04:04 GMT Organization: MonsterSoft Lines: 45 Message-ID: <5g798k$oe9@hume.nmia.com> References: <01bc237a$77261ce0$8d022399@fa> <3317936e.13306019@news.sn.no> <5fdsi8$ohb@hume.nmia.com> <332427c1.10629521@news.sn.no> NNTP-Posting-Host: plato.nmia.com In article <332427c1.10629521@news.sn.no>, Kim Robert Blix wrote: >monsters@nmia.com (MonsterSoft) once said: [snip] > >okie, then you open it as FILE (not text) and use this readline function to get >the line ( semi code again): > >Function ReadFileLine:string; >Var C:Byte; > s:String; >Begin > S:=''; > Repeat > Read(fila,c) > s:=S+chr(c); > Until C=chr(13); > ReadFileLine:=S; >End; You'll need to open it as a file of byte instead of just FILE. Also, you will need to make provisions to ensure that you do not read past the end of the file. type FOB=File Of Byte; function ReadFileLine(var inf:FOB):string; var c:byte; s:string; begin s:=''; c:=0; while (c<>13) and not(eof(inf)) do {this is *very* non-portable} read(inf,c); while not(eof(inf)) do begin read(inf,c); if c=13 then break else s:=s+chr(c) end; ReadFileLine:=s end; Not particularly fast.. but it works. --Mark Iuzzolino One of the monsters@monstersoft.com | "Just think of us as large http://www.monstersoft.com | drooling bunnies." Article 26362 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: File Randomness Date: 12 Mar 1997 22:04:04 GMT Organization: MonsterSoft Lines: 45 Message-ID: <5g798k$oe9@hume.nmia.com> References: <01bc237a$77261ce0$8d022399@fa> <3317936e.13306019@news.sn.no> <5fdsi8$ohb@hume.nmia.com> <332427c1.10629521@news.sn.no> NNTP-Posting-Host: plato.nmia.com In article <332427c1.10629521@news.sn.no>, Kim Robert Blix wrote: >monsters@nmia.com (MonsterSoft) once said: [snip] > >okie, then you open it as FILE (not text) and use this readline function to get >the line ( semi code again): > >Function ReadFileLine:string; >Var C:Byte; > s:String; >Begin > S:=''; > Repeat > Read(fila,c) > s:=S+chr(c); > Until C=chr(13); > ReadFileLine:=S; >End; You'll need to open it as a file of byte instead of just FILE. Also, you will need to make provisions to ensure that you do not read past the end of the file. type FOB=File Of Byte; function ReadFileLine(var inf:FOB):string; var c:byte; s:string; begin s:=''; c:=0; while (c<>13) and not(eof(inf)) do {this is *very* non-portable} read(inf,c); while not(eof(inf)) do begin read(inf,c); if c=13 then break else s:=s+chr(c) end; ReadFileLine:=s end; Not particularly fast.. but it works. --Mark Iuzzolino One of the monsters@monstersoft.com | "Just think of us as large http://www.monstersoft.com | drooling bunnies." Article 26445 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: [Q]Use TP7's PutPixel to show BMP is very slowly! Date: 14 Mar 1997 11:52:35 GMT Organization: MonsterSoft Lines: 49 Message-ID: <5gbe63$d6v@hume.nmia.com> References: <01bc23a0$f3950360$930000c0@jsz07> <3324905A.6C80@is.belgacom.be> <332518D3.6BAF@sn.no> <574073571wnr@jayman.demon.co.uk> NNTP-Posting-Host: plato.nmia.com In article <574073571wnr@jayman.demon.co.uk>, Jason Burgon wrote: >In article: <332518D3.6BAF@sn.no> Asbj?rn writes: >>Very easy, works for almost every gfx card that's vesa compatible. Look: >>640x480x256 colors >> [putpixel code snipped] [explantion about differing granulatiry on various cards snipped due to complete agreement] >The above code also assumes the that the video memory is mapped to $A000 which >is another thing that a VESA VBE compliant driver does not guarantee. The fact >that I know of no video card that doesn't map its colour graphics to $A000 is >no reason assume this, and therefore fail to comply with the VBE >specification. Alright.. here's where I disagree. Any VBE driver creator who doesn't support $a000 being the beginning of screen memory is asking for trouble. Literally every [graphic] application I've ever seen source code to uses and expects video to start at $a000. Anyone who changes this is 1) stupid 2) or insane 3) or both. If anyone did actually change where screen memory is and someone complained about my program(s) not working on their system, I would simply tell them to get a different driver. >Thought not relevant to a PutPixel function, there are quite a few cards that >use a dual window system, such as the Matrox Millenium, where Window #0 is >used to define the write window and Window #1 used as the read window. These >cards have TWO "Bank registers" and you cannot therefore assume that a pixel >read from (say) $A000:0000 is the same pixel you have just written to this >address unless you set both registers to the same value with two calls to >VBE function 05 (changing the value of BL to 1 for the second call). Also -on some systems that only have one read window- trying to change the second window will cause the application to crash. So, it is good to test to see if a second window is available before changing it. There is a very simple way to keep both windows sync'd (if necessary) with nominal overhead. >To summerize: The VESA VBE is Venus Fly Trap just waiting to catch those >programmers who don't read and understand the spec very thoughly. >Implementing a well behaved VESA graphics library is not a task to be taken >on lightly. If you want it you run on the zillions of different SVGA cards >in the world, you'd better get the specs, and conform to those specs to the >letter. Agreed. --Mark Iuzzolino One of the monsters@monstersoft.com | WallyWorld: We have 300 frames http://www.monstersoft.com | of animation *just* for his hair. Article 26481 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: [Q]Use TP7's PutPixel to show BMP is very slowly! Date: 15 Mar 1997 07:56:41 GMT Organization: MonsterSoft Lines: 29 Message-ID: <5gdknp$q6i@hume.nmia.com> References: <01bc23a0$f3950360$930000c0@jsz07> <332518D3.6BAF@sn.no> <574073571wnr@jayman.demon.co.uk> <3328B973.513D@hotmail.com> NNTP-Posting-Host: plato.nmia.com In article <3328B973.513D@hotmail.com>, Asbjørn wrote: >Jason Burgon wrote: >> The above code also assumes the that the video memory is mapped to $A000 >> which is another thing that a VESA VBE compliant driver does not guarantee. >> The fact that I know of no video card that doesn't map its colour graphics >> to $A000 is no reason assume this, and therefore fail to comply with the >> VBE specification. > >And where do you get that info? I have a book which covers gfx very good, >and it doesn't mention that. If you take a look at the structure that GetModeInfo returns it should be pretty obvious: TModeRec = record ModeAttributes : Word; WindowAFlags : Byte; WindowBFlags : Byte; Granularity : Word; WindowSize : Word; WindowASeg : Word; {Should be $A000} WindowBSeg : Word; {Should also be $A000 if available} BankSwitch : Pointer; BytesPerLine : Word; {etc.} --Mark Iuzzolino One of the monsters@monstersoft.com | "A gleekzorp without a tournpee http://www.monstersoft.com | is like a icnar without a flagnog" Article 26256 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: Graphics file formats (Was: [...]) Date: 11 Mar 1997 07:27:17 GMT Organization: MonsterSoft Lines: 35 Message-ID: <5g31gl$3bj@hume.nmia.com> References: <5fs1gf$64q@freenet.unbc.edu> NNTP-Posting-Host: plato.nmia.com In article <5fs1gf$64q@freenet.unbc.edu>, Hilton Janfield wrote: > >Does anyone know what the smallest graphics file format, besides JPEG, is >which works with 16 color images? We've found that PNG is probably the best file format for lossless compression on picture-like images. You can get information on the PNG specification at: http://www.w3.org/pub/WWW/TR/REC-png.html For game type graphics PCX is probably the easiest format to decompress. However, we have a file format called Mooishi! that gets better compression than PCX and decompresses faster. The description of this file format is too lengthy to post here, but you can email us for the specification and/or source code. As an example of the compression difference between MSH and PCX: A blank 320x200 screen stored in a PCX takes 3K. The same image compressed as a MSH is 602 bytes (including palette information). >I made a small mouse/graph driven program and a couple people who want to >use it are requesting the ability to display graphics, and I don't want >to take up 300k of space with some of these images as BITMAPS :) >And does anyone have source code to work with this format, or GIF or PCX? Don't forget that there is some legal tangles with using the GIF format. Software developers have to pay Unisys to compress *OR* decompress images. >I've seen a bunch of GIF/PCX source in SWAG but most of it either doesn't >work, or I can't use it, etc etc. I did find one good one but it was so >damned SLOW... :) About two lines per second (600 column pic). ouch :) We have an object oriented gfx library that will decompress PCX files *very* quickly. Email us if you want a copy. --Mark Iuzzolino One of the monsters@monstersoft.com | "Who do you want to kill today?" http://www.monstersoft.com Article 26395 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: sprite prog - criticise please - sprite.pas [1/1] Date: 13 Mar 1997 13:43:41 GMT Organization: MonsterSoft Lines: 103 Message-ID: <5g90ad$sh@hume.nmia.com> References: <3326295a.0@ren2.netconnect.com.au> NNTP-Posting-Host: plato.nmia.com In article <3326295a.0@ren2.netconnect.com.au>, squigger wrote: >--*-*-*- Next Section -*-*-* >Content-Type: Text/Plain; charset=US-ASCII > >Have a look at this, and tell me how bad it is and how I can improve it >:) Okay, since I'm up, I'll tell you how bad it is. Does the phrase, "Oh, dear God! The horror! The humanity!" mean anything? I mean, WTF were you thinking when you decided to implement a getimage/putimage routine with LINKED LISTS!? Sorry.. DOUBLY LINKED LISTS!? You are using at least 8 bytes (two pointers) for EACH PIXEL!!!!!! This means that your image is now 9 times bigger than the original - raw - bitmap. Please tell me this post is a joke? If not, I must save this and enter it into the *worst* implementation of an algorithm contest. (This is close to the worst line plotting routine posted in rec.games.programmer a while back) >also, can someone tell me why my first sprite is only garbage? Perhaps it is emulating your technique!? Okay, okay.. enough belittling. Although your use of complex data structures is, well, admirable.. it is severe overkill. At *most* your image in memory should take up 4 bytes more than the original. 2 bytes (1 word) for the width, 2 bytes (1 word) for the height. Basically a bitmap stored in memory should be: 1st word: width; next word: height width*height bytes: data Here are example getimage/putimage routines for a 320x200x8bpp screen: procedure getimage(x,y,width,height:word;var p:pointer); assembler; asm push ds les di,p mov ax,width mov es:[di],ax mov ax,height mov es:[di+2],ax add di,4 mov ds,SegA000 mov ax,320 mul y add ax,x mov si,ax ; {DS:[SI] now points to the screen[x,y]} mov cx,width mov dx,height @@lop: push cx rep movsb pop cx add si,320 sub si,cx dec dx jnz @@lop pop ds end; Note, the above is untested and poorly optimized. However, presuming that there are no bugs, it should run rings around your routine. Here is the routine that will display an image that was captured with getimage() (the above version, not the graph version ;) procedure putimage(x,y:word;p:pointer); assembler; asm push ds mov es,SegA000 mov ax,320 mul y add ax,x mov di,ax lds si,p mov cx,ds:[si] mov dx,ds:[si+2] add si,4 @@lop: push cx rep movsb pop cx add di,320 sub di,cx dec dx jnz @@lop pop ds end; To use: var p:pointer; begin {Init graphics here} getmem(p,width*height+4); getimage(x,y,width,height,p); putimage(0,0,p); {when done...} freemem(p,width*height+4); end. >squigger hops again [dreadful code snipped] --Mark Iuzzolino One of the monsters@monstersoft.com | "When we're not programming http://www.monstersoft.com | we're eating the furniture." Article 26551 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: OS Date: 15 Mar 1997 22:15:49 GMT Organization: MonsterSoft Lines: 64 Message-ID: <5gf72l$3po@hume.nmia.com> References: <5g767o$h1t@news1.iamerica.net> <3331b752.30708711@wi <5gb68k$qde@frodo.pgfn.bc.ca> <332A76B7.1121@ix.netcom.com> NNTP-Posting-Host: plato.nmia.com In article <332A76B7.1121@ix.netcom.com>, Scott Earnest wrote: >Hilton Janfield wrote: > >> [snip!] >> As for your comment about EVERY OS being written in Crap/Crap++... >> C sucks for graphics. So does TP. Unless you use MY 90% asm graphics >> unit with extended text and graphics mosue support, individual card >> support, vesa 1.2+ support, and more... > >You sound like someone who knows little or nothing about the C >language. Maybe you call it crap because you lack the intelligence to >try to understand it. It is by no means crap (and considering that it's >one of the most used languages, plenty of other programmers don't think >it's crap either). In general, C happens to far more efficient in >design and optimization. Not that I want to take sides here (and I certainly don't want to make it appear that I'm taking sides with Hilton)... but I do know quite a bit about the C language. And, IMHO, it *IS* crap. Just because it is one of the most used languages doesn't mean it's good. Windows is one of the most used OSs (if you can call it that), but it doesn't make *that* good. I can think of at least three that rank in ahead of it.. NeXTstep, BeOS, and TAOS. And, just because plenty of other programmers don't think it's crap either doesn't make it good, nor make them sane. Granted, C has it's place... but only because there isn't a BP compatible compiler for Un*x that has OS hooks. I believe C is crap because I have a tool that has the same capabilities as C, but much better syntax, a faster compiler, and a better programming environment. Can you honestly say that you want to program in a language that can produce a line of code such as: (*(void(*)(void))*(void**)((Uint32)&SlaveCommand+0x20000000))(); (That is a very real line of code btw...) >I happen to use Turbo Pascal more often >because I'm more fluent in it and can get things done faster, but when I >need to use it, C is indispensible. I'm curious to know how much DOS C programming you do? The only time I touch C is when I'm coding for Unix, BeOS, AmigaUnix (we have a BP compatible compiler for AmigaDOS =), or when I'm converting something to pascal. [snip] >(BTW, 90% ASM? After saying TP and C "suck" for graphics, what's the >rest of it? Navel lint? And how much of it is original work? From >past messages, I'd get the impression that it's more likely you're >pasting together a good deal of other people's work and not learning how >things work on your own. Duplicating isn't improving.) I've exchanged email with Hilton, and he's still using 16 colours w/ the BGI.. so I severely doubt he has anything close to what he says he does. However, if he pops up with an object oriented gfx library similar to the one he mentions above, that would be mine (yeah, yeah, I know I shouldn't help him, but this was before his egotistical rampage through c.l.p.b, and he could have gotten it off our web-page anyway. W/ no comments it will take him years to figure it out ;). >Scott Earnest >setech@ix.netcom.com --Mark Iuzzolino One of the monsters@monstersoft.com | "If you're right 90% of the time, http://www.monstersoft.com | why quibble about the remaining 3%?" Article 26667 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: OS Date: 18 Mar 1997 00:29:40 GMT Organization: MonsterSoft Lines: 17 Message-ID: <5gknlk$6uf@hume.nmia.com> References: <3324C5C6.7B8D@ix.netcom.com> <33255FF9.613C@airmail.net> <3326CA88.32FB@primenet.com> <5gjhlb$m95@falcon.le.ac.uk> NNTP-Posting-Host: plato.nmia.com In article <5gjhlb$m95@falcon.le.ac.uk>, Dr E. Buxbaum wrote: > >>> Jeremy Johnston wrote: >>> >>> > how do you make an OS? can you write one with BTP 7.0? If not how do you >>> > write one? > >As far as I know, operating system kernels have not been written in Pascal, >only shells (4dos, for example). I have a friend who is writing ZuulOS in pascal. Also, a friend of Darrell Long's (moderator of comp.os.moderated) once wrote Multics for the 386 in pascal. --Mark Iuzzolino One of the monsters@monstersoft.com | "This tagline has been encrypted http://www.monstersoft.com | for your own safety." Article 26715 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: X modes.. Date: 18 Mar 1997 13:04:52 GMT Organization: MonsterSoft Lines: 65 Message-ID: <5gm3tk$gju@hume.nmia.com> References: <01bc3255$8acf9480$160519c4@dac> NNTP-Posting-Host: plato.nmia.com In article <01bc3255$8acf9480$160519c4@dac>, Nexus wrote: >Hi there, > Anyone out there extremely clued up with X modes & tweeking the >resolution of a > Register compatible video card?? > I'm wanting to see if it is feasible to create a 640x400x256 xmode... > (Set to 320x400, tweek the horiz res??) procedure _320x400; assembler; asm mov ax,0013h int 10h mov dx,03c4h mov ax,0604h out dx,ax mov ax,0100h out dx,ax mov dx,03c2h mov al,0e3h out dx,al mov dx,03c4h mov ax,0300h out dx,ax mov dx,03d4h mov al,11h out dx,al inc dx in al,dx and al,07fh out dx,al dec dx mov ax,0014h out dx,ax mov ax,0e317h out dx,ax mov dx,03c4h mov ax,0f02h out dx,ax mov dx,03d4h mov al,13h out dx,al inc dx mov al,28h out dx,al ;{change scan lines} mov dx,3d4h mov al,9 out dx,al inc dx in al,dx and al,0e0h out dx,al ;{end change scan lines} {You might want to clear vid mem here} end; All ModeX routines should work fine in this resolution. --Mark Iuzzolino | "And I don't need to be a poet. I one of the monsters@monstersoft.com | don't need to be a hero, as long as http://www.monstersoft.com | I keep on loving you." --Alphaville Article 26716 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: X modes.. Date: 18 Mar 1997 13:29:36 GMT Organization: MonsterSoft Lines: 27 Message-ID: <5gm5c0$gs2@hume.nmia.com> References: <01bc3255$8acf9480$160519c4@dac> <332D4E5C.47C9@ix.netcom.com> NNTP-Posting-Host: plato.nmia.com In article <332D4E5C.47C9@ix.netcom.com>, Scott Earnest wrote: >Nexus wrote: > >> Hi there, >> I'm wanting to see if it is feasible to create a 640x400x256 xmode... >> (Set to 320x400, tweek the horiz res??) >Well, I've twiddled a bit with mode X, and the answer is basically, no, >it's not feasible to create a 640x400x256 screen, even though enough >memory exists for it. The standard VGA clock doesn't have the ability >to drive that much graphic information to the screen. Hmm.. I must read people's questions more carefully (lack of sleep.. bleah) as I just posted a 320x400 video mode set. Anyway.. I've twiddled a bit with mode-x, and it is feasible to create a 640x400x256 screen. AFAIR, someone in the newsgroup had actually done this and posted code. Unfortunately, I've looked through all the source code I've saved recently and could not find it. Perhaps you could search through DejaNews for it. >Scott Earnest I have an inordinate number of your posts saved, Scott. =) --Mark Iuzzolino one of the monsters@monstersoft.com | http://www.monstersoft.com | Article 26718 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: Protected mode - text screen reading Date: 18 Mar 1997 13:58:43 GMT Organization: MonsterSoft Lines: 53 Message-ID: <5gm72j$h4v@hume.nmia.com> References: <01bc2d8a$17e1ebf0$200a07a3@schouw> <9703171300591.DLITE.joperez@delphi.com> NNTP-Posting-Host: plato.nmia.com In article <9703171300591.DLITE.joperez@delphi.com>, Jose' M. Perez wrote: >>How does one read (and write) to the text screen in protected mode. >> In real mode setting up an array at the absolute address $B800 works great >>but in protected mode this causes a GPF. >> >Look up addressing in protected mode. You will see that for the more >commonly used address like B800 that there are predefined variables that >can be used in real mode and protected mode. For those that are not >predefined, you will have to figure out how to set the address. >The reason that absolute addressing does not work in protected mode is >that protected mode supports flat addressing, not segmented addressing. From our web page (http://www.monstersoft.com/tutorial1/48bit_intro.html): The memory on the bus of the PC is called physical memory. Each byte is assigned a unique address, called a physical address, which ranges from zero to a maximum of 2^32-1 bytes. With segmentation, however, it is possible to have multiple, independent address spaces. [...] The PC is limited to 16,383 segments of up to 4 gigabytes each, or a total as large as 2^46 bytes (64 terabytes). _32-Bit Addressing_ 32-bit addressing is commonly referred to as the "flat" memory model. This is a misnomer, since there isn't a mode bit or control register which turns off the segmentation mechanism. Instead, all of the segment registers are mapped to the same address space (usually the base of memory), and only the 32-bit offset is used. This mode has the benefit of not needing to load segment registers. >Some of the predefined addresses are Seg0040, SegA000, SegB000 and SegB800. >The absolute address equivalents should be obvious. For additional >information, consult the manuals, the help file or Brian Long's, The Borland >Pascal Problem Solver, Addison-Wesley, 1994, ISBN 0-201-59383-1. You can also create your own with this function: function SegToSelector(SegAddr:word):word; assembler; asm mov ax,0002h mov bx,SegAddr int 31h end; SegC000:=SegToSelector($C000); >Jose' Perez --Mark Iuzzolino one of the monsters@monstersoft.com | "Paradise is similar to where you are http://www.monstersoft.com | now, only much *much* better." Article 26851 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: Port and PortW Date: 21 Mar 1997 07:43:10 GMT Organization: MonsterSoft Lines: 46 Message-ID: <5gte6e$tll@hume.nmia.com> References: <332E0676.6A1@ix.netcom.com> <332ECEEF.11D5@gwdg.de> <332F0A79.462@gwdg.de> <332eb35e.5872723@news.sn.no> NNTP-Posting-Host: plato.nmia.com In article <332eb35e.5872723@news.sn.no>, Kim Robert Blix wrote: >Ulli Conrad once said: > >>And: >>Always be careful if you don't know excact what this port is doing. You >>can cause hardware damage by short circuit!!!!! > >Anyone ever seen this happen? I mean, I know it was possible on a ooold >Oric A friend of mine had. I belive the hardware you buy today is tested, >and should be able to tollerate you playing around with it a bit. Yes. My friend Danny has blown up many pieces of hardware with faulty programming. For example, While writing the DannyUtilities (to compete with the NortonUtilities), he wrote a disk formatter than would format a diskette in 1/30th of a second. It worked and the disk was formatted, but the disk drive never worked again. While debugging a program for our novell network at school, the program crashed. When Danny rebooted the machine, the ethernet card didn't see the network. So.. he moved to the next machine. He changed a few lines of source, re-TASM'd it, and boom. It crashed. When he rebooted, *that* ethernet card didn't see the network. Luckily, he finally tracked down the bug. Several years ago we were playing with the CRT regs on an old 386. We were trying to do what Tran did in Ambience (which was produce an 18bit colour palette while in mode-q). After randomly outing numbers to a port, the monitor started smoking and shortly thereafter imploded. Needless to say, it was quite impressive. There are a lot of other examples of Danny blowing up hardware, but they were due to non-programming factors. (Like the time he had his hard-drive outside the case, put it down on the power-supply.. chip side down, and turned on the computer, etc). However, if you would like to see what kind of programmer he is, you can download the source-code to DannyPaint from our web-page. Compile and run it if you dare! Mwahahahahaha!. Actually, I'm just kidding, DannyPaint is probably the most stable program Danny has written. > Kim Robert Blix --Mark Iuzzolino one of the monsters@monstersoft.com | "Come on Payton, you know you want http://www.monstersoft.com | it... take the sugar cube!" --Danny Article 26852 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: DPMI - Int $31 Date: 21 Mar 1997 07:51:04 GMT Organization: MonsterSoft Lines: 35 Message-ID: <5gtel8$to5@hume.nmia.com> References: <33317869.1E63@nac.ac.za> <33314E5C.3094@ix.netcom.com> <33318F68.11CB@nac.ac.za> <5gsih1$j0b@glas.apc.org> NNTP-Posting-Host: plato.nmia.com In article <5gsih1$j0b@glas.apc.org>, Alessandro Scecottini wrote: >Piet Theron wrote: > >>I downloaded the code from SWAG and assume it works >>RTM.EXE and DPMI16BI.OVL is loaded when the program starts. >>Do i need something else ? > >>Function RealModeInt( IntNo : Byte; >> Var RealRegs : TRealModeRegs) : Boolean; >>Assembler; >>Asm >> Mov AX, $0300 >> Mov BL, IntNo Try: mov bh,1 >> XOr CX, CX > > If i remember well, try to increase the value of CX register. I >think it contains the stack size. CX= Number of words to copy from protected mode to real mode stack. If you set the ss and sp fields in the RealModeRegs structure to 0 DPMI will automatically allocate a stack. This is the preferred method, since you would have to allocate your own stack in real mode otherwise. It changing bh to 1 doesn't solve the problem, then you have a bad field in RealRegs. --Mark Iuzzolino one of the monsters@monstersoft.com | "If we're not a game company, then http://www.monstersoft.com | what are we?" "A cult!" Article 26874 of comp.lang.pascal.borland: Path: nmia!bug.rahul.net!rahul.net!a2i!nntp.mainstreet.net!news.pbi.net!news.mathworks.com!fu-berlin.de!news-ber1.dfn.de!news-ham1.dfn.de!news-han1.dfn.de!news.gwdg.de!not-for-mail From: Ulli Conrad Newsgroups: comp.lang.pascal.borland Subject: Re: Port and PortW / Danny blowing up hardware Date: Fri, 21 Mar 1997 09:47:44 -0800 Organization: University Goettingen, Dept. of Neuroscience Lines: 11 Message-ID: <3332C9C0.5CEB@gwdg.de> References: <332E0676.6A1@ix.netcom.com> <332ECEEF.11D5@gwdg.de> <332F0A79.462@gwdg.de> <332eb35e.5872723@news.sn.no> <5gte6e$tll@hume.nmia.com> Reply-To: uconrad1@gwdg.de NNTP-Posting-Host: cipbio12.zool1.bio.uni-goettingen.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01Gold (Win16; I) MonsterSoft wrote: > Yes. My friend Danny has blown up many pieces of hardware with faulty > programming. As I wrote: We had this problem only one time. Since that we're using a special constructed Bus-Repeater when we're testing software which resets or redirects ports, to buffer it from the computers ports.... -- Ulli Conrad Goettingen, Planet Earth uconrad1@gwdg.de http://www.gwdg.de/~uconrad1 Article 27051 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: Random Number Genorator wanted Date: 24 Mar 1997 11:22:26 GMT Organization: MonsterSoft Lines: 40 Message-ID: <5h5o5i$i7e@hume.nmia.com> References: <19970323172201.MAA01729@ladder01.news.aol.com> NNTP-Posting-Host: plato.nmia.com In article <19970323172201.MAA01729@ladder01.news.aol.com>, DTHSHDW wrote: >a good spot to grab a number is at mem[$44:0]. Okay, first off, the system timer is at $40:$6c (or Seg0040:$6c in PM). >This number only changes >every 18.2 times/second this is the internal clock timer. combining it >with pascal's random can give you a much more random result. because this >value changes on a fairly regular basis, it increases the range of responses >you can get from the existing random command. Unfortunately, since the value is always incrementing, in some cases this will produce poor random results. Also, if you are getting random numbers more often than about 1/5th of a second, you will get the same number. Therefore, you should just use the built in random() function. > >function newrandom(range:word):word; {word version just an example} >var > t:word; >begin > newrandom:=(random(255)*mem[$44:0]+random(255)) mod range; >end; > >While not foolproof, it's better than just a straight random command. Uhm... why are you doing this? Isn't random() random enough? I could argue that this is 2 to 3 times slower than a call to random(), and will barely produce more random results. If you are going to do all of the above, you might want to try this instead: function newrandom(range:word):word; begin newrandom:=((portw[$40] shl random(8)) xor random(65535)) mod range end; --Mark Iuzzolino one of the monsters@monstersoft.com | "This tagline has been censored http://www.monstersoft.com | for your benefit." Article 27126 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: Passing arrays to procedures Date: 25 Mar 1997 23:27:40 GMT Organization: MonsterSoft Lines: 37 Message-ID: <5h9n1c$b4d@hume.nmia.com> References: <3338D09F.EF8@usa.net> <333580a7.290223@news.internetland.net> NNTP-Posting-Host: plato.nmia.com In article <333580a7.290223@news.internetland.net>, Programmer Dude wrote: >On Tue, 25 Mar 1997 16:58:14 +0100, ReBeL >wrote: > > >>type >> sm = array [0..30000] of integer; >> >> var >> Data : ^sm; >> >> procedure Calc (var x:array of ^Integer); <--- Work ????? >> blah end; > >No work, actually...this is defined as an array of, which is a no-no >in parameter passing....gonna have to define that part as a type as >well... No... you can declare an array of something in the paramater list of a procedure. ie, procedure foo(var x:array of integer); works fine. However, the above is incorrect in that you wouldn't do array of ^integer. If the array you are passing in is an array of pointers to integers, you should just declare it as: procedure Calc(var x:array of pointer); and then typecast them to integers. So, you could do: procedure Calc(var x:array of pointer); begin integer(x[10]^):=42; end; However, for the above, you would indeed need to make a separate type so that you don't get a type mismatch. --Mark Iuzzolino one of the monsters@monstersoft.com | "I'd love to go out with you, http://www.monstersoft.com | but I have to floss my cat." Article 27127 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: A brief question of C-types vs. PASCAL-types Date: 25 Mar 1997 23:36:15 GMT Organization: MonsterSoft Lines: 28 Message-ID: <5h9nhf$b6g@hume.nmia.com> References: <3319cb11.17592971@news.xs4all.nl> <199703241830549588@du-356.clara.net> NNTP-Posting-Host: plato.nmia.com In article <199703241830549588@du-356.clara.net>, David Singleton wrote: >J.R. Ferguson wrote: >> A DWORD or double word is a 32 bit integer. You could use the Turbo >> Pascal type LongInt for that. >why not define your own DWORD type like this: > >type >dword = record > highword : word; > lowword : word; > end; That should be: type dword = record LowWord,HighWord:word; end; One of the reasons not to do this is because you have to typecast it everywhere, and that is a pain. > David Singleton --Mark Iuzzolino one of the monsters@monstersoft.com | "The meek shall inherit the earth, http://www.monstersoft.com | they are too weak to refuse." Article 27389 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: VESA/SVGA Programming? Date: 1 Apr 1997 14:09:25 GMT Organization: MonsterSoft Lines: 17 Message-ID: <5hr4ul$ebj@hume.nmia.com> References: <5hp627$bam@dinkel.civ.utwente.nl> NNTP-Posting-Host: plato.nmia.com In article <5hp627$bam@dinkel.civ.utwente.nl>, Paeblow wrote: >I'm going to make an all-in graphics unit (from 320x200x256 game >routines to 1280x1024 windowing thingies) so i need ALL the >information i can get on VGA/SVGA/VESA graphics programming... >Please send me info, or some related url's Hvordan gaar det? Check out our web-page, which discusses exactly this: http://www.monstersoft.com/ http://www.monstersoft.com/tutorial1/ (<- that's a one on the end) --Mark Iuzzolino one of the monsters@monstersoft.com | "When we're not programming, we're http://www.monstersoft.com | eating the furniture." Article 27401 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: Speed Date: 2 Apr 1997 00:08:47 GMT Organization: MonsterSoft Lines: 32 Message-ID: <5hs82f$kik@hume.nmia.com> NNTP-Posting-Host: plato.nmia.com Chughes@tscnet.com wrote: > > Can someone help me? How would you speed up a loop, I'm doing a project > for school and I have a loop doing random PUTPIXEL in black,white, and Gray > so that It will look like TV fuzz but it just isn't fast enough. Is there > anyway to speed it up? Please mail me at Chughes@tscnet.com Draw the screen randomly in the first 16 colours, and then set the palette randomly for them. ie: for y:=0 to GetMaxY do for x:=0 to GetMaxX do putpixel(x,y,random(16)+1); ... repeat WaitForRetrace; for i:=1 to 16 do begin bytevalue:=random(63); setrgbpalette(i,bytevalue,bytevalue,bytevalue) end until done; Setting the palette for 16 colours is much faster than redrawing the entire screen, and even more so than trying to fill the screen randomly. --Mark Iuzzolino one of the monsters@monstersoft.com | "Beware of programmers who carry http://www.monstersoft.com | screwdrivers." Article 27523 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: new() Date: 5 Apr 1997 13:01:03 GMT Organization: MonsterSoft Lines: 25 Message-ID: <5i5ief$trr@hume.nmia.com> References: <33521dec.2510638@nntp.glas.apc.org> NNTP-Posting-Host: plato.nmia.com In article <33521dec.2510638@nntp.glas.apc.org>, Alessandro Scecottini wrote: >On Fri, 4 Apr 1997 09:11:50 -0500, Federico Balbi - GSU > wrote: >>hello, >> does new() use all the ram i have or im limited to 640k?? >i'd say a single new() limits you to 64K - 8 bytes. > >> if so is there any way to use all the extended? > yes, DPMI. To be a little more specific, with Borland Pascal 7.0 - compiling for protected mode - it is possible to allocate up to 16 megabytes.. in 64K chunks. However, with an additional unit for BP 7.0, one can allocate all the memory on the PC (up to the limit of 2^46 bytes or 64 terabytes), and allocate it as one large contiguous chunk. If you have BP 7.0 and you are in need of large contiguous buffers, you should download how to do this: http://www.monstersoft.com/download/newfront.zip >-- A. Shch. -- --Mark Iuzzolino one of the monsters@monstersoft.com | COM program murdered. "Bits http://www.monstersoft.com | everywhere" says witness. Article 27561 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: Making Cryptograms / an exercise (part 2 of 2) Date: 6 Apr 1997 11:58:17 GMT Organization: MonsterSoft Lines: 97 Message-ID: <5i834p$dup@hume.nmia.com> NNTP-Posting-Host: plato.nmia.com In article <33444e72.684365@news.internetland.net>, Programmer Dude wrote: >On Fri, 04 Apr 1997 16:28:45 -0800, Bill Luchsinger > wrote: > >>I respect those who take the time to share their work with others. It's >>a shame that some members of the group would rather spend their time >>picking on stupid, petty issues, instead of checking out these programs, >>and submitting some kind of response. > >Actually, because this isn't the place to share one's work with >others. What a load of bunk! You used to post your tutorials here.. what's the difference if someone else posts source code? Did someone yell at you about it (er.. actually I used to, but only about optimization issues), and so now you're taking it out on other people!? >Note, that the better places to share programs are such >places as FTP sites, WWW sites, SWAG, and other sources. Yeah, everyone.. I just wrote a 20 line program that will answer many of your questions of how to do something and put it at ftp site somewhere.blah.cs.edu.com. Please open up your ftp browsers and go there, download it, un-zip it, and take a look, and then post comments about it. Puh-leaze! >You will >find that MANY people share their programs via these more proper >formats, as it gives the OPTION for those who want the source code to >get it, and not have to pay the per minute charges People who don't want to pay per minute charges for downloading excess posts should unsubscribe from c.l.p.b or get a new ISP. On the other hand, they could easily save some money by putting you in their kill-file. In the last month you have made 14 posts to c.l.p.b. Of those: 4 were *only* plugs for your tutorial 4 were one liners 5 were completely useless 1 was part of your tutorial (Can we say hypocrite!?) 3 were the same post repeated 2 were flames and only ONE contained any source code. Are you really helping this newsgroup? Well, I don't think so. Personally, I encourage people to post source code, as long as they use common sense. I first learned that one could do jump tables in pascal from this group, and I learned how here. Many people don't know that certain things are possible, let alone how to do them.. so why shouldn't someone else post things that are advanced? To make my point clearer... How many people out there know that you can do 80 bit moves with the FPU? How many people out there know how? Well, here is the source code to flip a 320x200 double buffer contained in the pointer scrn2 to the screen using floating point instructions: (Note: offset of scrn2^ needs to be zero) procedure fpages2; assembler; asm mov dx,ds mov cx,64000/10 mov es,SegA000 lds di,scrn2 @@lop: fld tbyte ptr ds:[di] fstp tbyte ptr es:[di] add di,10 dec cx jnz @@lop mov ds,dx end; Now, is it *really* worth me putting this up on a ftp site somewhere, only to be lost among the hundreds or thousands of other pieces of source code other people have put up? We're trying to draw all the resources of the net that we, as borland pascal programmers, find useful to one place. Not spread them around and make it more difficult for people to find. If I submitted the above to SWAG, how many people here would rush out and download a new version!? I've downloaded SWAG once. I may have even used it two or three times. But when I want something *real* .. I come here. Why? Because Scott^H^H^H^H^Hpeople post very useful code snippets here. The only reason I would discourage posting source code here is if it needs a binary data file, if it is in more than 2 pieces, or if it is more than 500 lines. You know, I think I'll start posting source code here again. If you don't like that, Glenn, you can put me in your kill file. Of course, you'll miss stuff that you may not know how to do.. and if I remember correctly, I'm a much better programmer than you. So sit back and shut up. >Glenn Grotzinger --Mark Iuzzolino One of the monsters@monstersoft.com | "A mind is a terrible thing to http://www.monstersoft.com | ...OOOH a new video game!" Article 27613 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: Help with program! Date: 8 Apr 1997 05:21:58 GMT Organization: MonsterSoft Lines: 52 Message-ID: <5icklm$b6v@hume.nmia.com> NNTP-Posting-Host: plato.nmia.com In article <3345d4cc.2445810@news.internetland.net>, Bad Programmer Dude wrote: >On 7 Apr 1997 00:11:41 GMT, vkhao@thunder.temple.edu (Mister Ouija) >wrote: > >>I need to randomize 52 numbers (1 to 52) and put them into an array that >>has 52 spaces. I don't want any duplicates in the array. So, how would I >>go about randomizing the numbers into the array. I mean, i know how to >>place them into the array, but I don't know how to eliminate duplicates. >>If the computer randomize a number that is already in the array, i want >>the computer to try again and pick a nother number. >>Any help would be appreciated! > >What is this for? It's for a card game, you blithering idiot. (at least, I presume it's for a card game.. I can't think of many things that have 52 unique items). >Anyway, I'll give you a clue: (no comment) >try setting up >another array with markers, that will indicate which numbers you've >used. Then when you generate a number, generate it until it's a >number you have not used. Then when you do get a number generated >that you have not used, then place it into the next position of the >number array, and then mark off the number as being used in the other >array. Sure, you *could* do what glenn recommends.. if you want your program to be slow and inefficient. Here is a better, if not optimal solution. var cards:array[1..52] of word; i,idx:word; ... randomize; for i:=1 to 52 do cards[i]:=i; for i:=1 to 52 do begin idx:=random(52)+1; {swap the contents of cards[i] with cards[idx] here} end; You now have a perfectly shuffled array without any duplicates. >Glenn Grotzinger --Mark Iuzzolino one of the monsters@monstersoft.com | "ASSEMBLY - see Programmer. http://www.monstersoft.com | COBOL - see Accountant." Article 27631 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: Making Cryptograms / an exercise (part 2 of 2) Date: 8 Apr 1997 15:26:00 GMT Organization: MonsterSoft Lines: 146 Message-ID: <5ido28$i38@hume.nmia.com> References: <5i834p$dup@hume.nmia.com> <5ibnt2$9ke$1@sys10.cambridge.uk.psi.net> NNTP-Posting-Host: plato.nmia.com In article <5ibnt2$9ke$1@sys10.cambridge.uk.psi.net>, Matt Parkins wrote: >--[monsters@nmia.com (MonsterSoft) was heard to say]-- > >>>Note, that the better places to share programs are such >>>places as FTP sites, WWW sites, SWAG, and other sources. > >>Yeah, everyone.. I just wrote a 20 line program that will answer many >>of your questions of how to do something and put it at ftp site >>somewhere.blah.cs.edu.com. Please open up your ftp browsers and go there, >>download it, un-zip it, and take a look, and then post comments about it. >>Puh-leaze! > >_Doh_ The crypogram program was so big in needed spliting over two >posts. It's not a 20 line post. You should have read my post more carefully. I never advocated him/her posting the code. I said that as long as people use common sense posting source code should be perfectly acceptable. The reasons I would discourage posting source is if it requires a binary file, if it is in more than 2 pieces, or if it was over 500 lines. I think that with these criteria very few people would object. This is a place of discussion. However, for the most part we don't discuss source code? We end up with thread discussions such as this one. I usually try to stay out of all the petty bickering that goes on here, but Glenn really went too far. He used to post his tutorials here. He then turned around and told people not to post source code. I have a problem with that. It's called being a hypocrite. I got sick of him and a few other people with holier-than-thou attitudes trying to dictate what should and shouldn't go on here. This used to be a really friendly place. But now we are beginning to look like comp.lang.c. That is *not* what I want, and I know it isn't what a lot of other people want (judging by the overwhelming support I got in my mailbox). When I want criticism for source code that I have written, this is the best forum for it. If I put it up on my web-page, very few people will download it, and even fewer people will comment on it. It will also take a very long time for any real discussion. Why do you think this group exists!? To tell people that we won't do their homework!?? >>>You will >>>find that MANY people share their programs via these more proper >>>formats, as it gives the OPTION for those who want the source code to >>>get it, and not have to pay the per minute charges > >>People who don't want to pay per minute charges for downloading excess >>posts should unsubscribe from c.l.p.b or get a new ISP. > >But if the newsgroup is not intended for large posts, why should I >unsubscribe? I agree.. this newsgroup isn't intended for large posts. I never said I wanted large posts. Come on, pay attention here. >How would I learn? And what are you learning by perpetuating this thread? Only my opinions, not anything related to pascal. Has anybody learned anything substantial here in the last 6 months? >I'm exceptionally happy with my ISP, >it's the telephone company that charges per minute, we're not all from >the states Mr. narrow minded. Just because I wasn't aware other countries charge per minute rates doesn't mean that I'm narrow minded. However, it was pointed out that people outside the united states *do* pay per minute charges. I suppose the only solution to that is to move to the United States ;). Okay.. so you have the problem that some people might post large source code to this group. And you have the problem of having to download all that source code. Still, are we not taking up more bandwith arguing about this and other really really stupid things? IMO, we'd all be better off if we didn't argue or flame each other and instead posted usable information. >>How many people out there know that you can do 80 bit moves with the FPU? >>How many people out there know how? >Around 50 since I work for a games company who make code run like a >bat out of hell. Wow, and so the rest of us work for a game company? [Looking around] Okay, so I work for a game company. My friends work for a game company. Statistically speaking, a majority of the people I know work for game companies. Still, that doesn't mean that everyone in c.l.p.b works for a game company, Mr. narrow minded. (couldn't resist ;) > >-[snip]- > >Cheers for that. Hey, wait a minute, nobody asked for it! Yay! >Another wannabe... *sobbing* Yes, you've found me out. I *am* a wannabe. Is there a wannabe anonymous that I can go to? I need help. I am one of the few that wants to share the knowledge I have and not keep it from other people. Working for a game company, I'd expect this of you. *sniff* I guess I'm not up to your or Bill Gates' level yet. >> We're trying to draw all the >>resources of the net that we, as borland pascal programmers, find >>useful to one place. Not spread them around and make it more >>difficult for people to find. If I submitted the above to SWAG, >>how many people here would rush out and download a new version!? > >Ooo, Oooh. Me, me, me. If you write a program that fulfils a >requirement that I have then I'll put a respective amount of effort >into acquiring a solution. Including searching the SWAG archives. But a lot of people *DON'T KNOW* that certain things are possible. This is a great place to show people that certain things are possible. The only way to do that is to have real discussions of souce code. I know a great deal about the pascal language (in the Borland flavour). But this doesn't mean that I know how to do everything. If I don't know that something exists, how am I supposed to ask how to do it? Okay, how about this... show me something that I don't know how to do. >>Because Scott^H^H^H^H^Hpeople post very useful code snippets here. > >I've found just as many at SWAG, and at other people's web sites - >more, now I think of it. Perhaps I should restate my position on SWAG. SWAG is, in general, a good place for retired code to reside. There is a lot of general-purpose starter information that has been put into one place. If one needs an example of how to do something, SWAG or the GPE are the places to go. Web-sites are a bit less friendly. There is no way of knowing if you are going to download a virus, if source code is included, etc. But this isn't about where to find useful code snippets. It is about *discussion* of code snippets. It is about *discussion* of Borland Pascal. How often do we discuss code that's in SWAG? One of the reasons I don't submit my work to SWAG is because my code improves constantly. So does the code of everyone else who works on a project for more than 3 days. But there is a limit. I'm not the best programmer in this group. There are some thigns I excel at, but I am not the end all of programmers. I come here to learn, and I come here to teach my specialty, which is graphics programming and optimization. So, lets start discussing source code, not bickering amongst ourselves. >Top discussion bloke. You lose. Wow, I lose because you say so. And I thought *I* had an ego problem. Sheesh. >MdP --Mark Iuzzolino One of the monsters@monstersoft.com | "When we're not programming http://www.monstersoft.com | we're eating the furniture." Article 27636 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: One final argument Date: 8 Apr 1997 17:50:16 GMT Organization: MonsterSoft Lines: 69 Message-ID: <5ie0go$jif@hume.nmia.com> NNTP-Posting-Host: plato.nmia.com Here is my final argument on the matter of posting here. There are some amazing programmers who post regularly to this group, each with their own specialty. Scott Earnest and R E. Donais (red) can field almost any general and high-level pascal questions. Jason Burgon probably knows more about VESA programming and Turbo Vision than anyone I know. Timo Salmi (sp?) can answer most pascal related questions, and if not, point you to somewhere where you can find an answer. Dr John Stockton has an incredible collection of links and answers to FAQs. AME is great for comic relief =). I have an extensive background with graphics programming, game programming and optimization techniques in assembler. There are many others that have windows, sound, and network programming, not to mention compiler design (FPK pascal, for example). If you were put all aforementioned people in the same room for a week, I have no doubt that you could recreate any piece of software ever written. This forum is a wonderful place for newer and less experienced programmers to find out better ways of programming in Borland Pascal. We are all connected by one thing.. a compiler. I would wager that a majority of readers of c.l.p.b use BP/TP because they feel it is the best tool for their projects. I have learned a great many things from this group. Either by participating in discussions or following other ones. I don't want that to end. Recently there has been a large number of complaints about someone posting source code. I agree that excessively large posts and/or binaries should *not* occur here. Nor should requests to do your homework for you. And everyone should have at least these three resources: SWAG, the PCGPE (PC Game Programming Encyclopedia), and the TurboPascal FAQ. Although they are indispensable for pascal programmers, they evolve very slowly. Changes don't happen very often if at all, and downloading updates isn't always convenient. This group is the addition and balance to those resources. Changes can happen rapidly. Bugs can be found and fixed within days, not months or years. Open discussion of techniques can lead to better code, and to better programmers. We disdain people who ask for a response to their question to be emailed to them, saying that other people may want to know the same thing.. and so we post here as well as cc'ing a copy to them. So why limit ourselves to private conversations via email? If you don't allow source to be posted here, that is what will happen. Without an open discussion, our programming abilities will stagnate. You can only go so far before you hit a ceiling in your knowledge. This is why I recommend that some source code be posted here. There is a rift between being a good programmer and being a real programmer. I can only think of two ways to cross that rift. Either you learn by trial and error, or you learn from someone who already has learned by trial and error. I have learned by the former.. having spent more than 50% of my life programming. I am talking about methodologies and techniques that they don't teach in any schools. Real world experience. I would say that the people mentioned in the first paragraph have this experience. With comment and criticism of source code other people can learn from them. This is why I feel that posting source code (within reason) is acceptable. I hope that many others feel the same way. PS: I apologize to the other resident gurus for not mentioning them by name. SWAG can be found at: http://www.gdsoft.com/swag/swag.html Mini-FAQ for c.l.p.b: http://www.merlyn.demon.co.uk/clpb-faq.txt Timo's FAQ: ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip PC Game Programming Encyclopedia: ftp://x2ftp.oulu.fi/pub/msdos/programming/gpe/pcgpe10.zip Game programming information: http://www.strangecreations.com/strange/library/games/rgpfaq.htm --Mark Iuzzolino one of the monsters@monstersoft.com | Barney: what you get when you feed http://www.monstersoft.com | a smurf after midnight. Article 27631 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: Making Cryptograms / an exercise (part 2 of 2) Date: 8 Apr 1997 15:26:00 GMT Organization: MonsterSoft Lines: 146 Message-ID: <5ido28$i38@hume.nmia.com> References: <5i834p$dup@hume.nmia.com> <5ibnt2$9ke$1@sys10.cambridge.uk.psi.net> NNTP-Posting-Host: plato.nmia.com In article <5ibnt2$9ke$1@sys10.cambridge.uk.psi.net>, Matt Parkins wrote: >--[monsters@nmia.com (MonsterSoft) was heard to say]-- > >>>Note, that the better places to share programs are such >>>places as FTP sites, WWW sites, SWAG, and other sources. > >>Yeah, everyone.. I just wrote a 20 line program that will answer many >>of your questions of how to do something and put it at ftp site >>somewhere.blah.cs.edu.com. Please open up your ftp browsers and go there, >>download it, un-zip it, and take a look, and then post comments about it. >>Puh-leaze! > >_Doh_ The crypogram program was so big in needed spliting over two >posts. It's not a 20 line post. You should have read my post more carefully. I never advocated him/her posting the code. I said that as long as people use common sense posting source code should be perfectly acceptable. The reasons I would discourage posting source is if it requires a binary file, if it is in more than 2 pieces, or if it was over 500 lines. I think that with these criteria very few people would object. This is a place of discussion. However, for the most part we don't discuss source code? We end up with thread discussions such as this one. I usually try to stay out of all the petty bickering that goes on here, but Glenn really went too far. He used to post his tutorials here. He then turned around and told people not to post source code. I have a problem with that. It's called being a hypocrite. I got sick of him and a few other people with holier-than-thou attitudes trying to dictate what should and shouldn't go on here. This used to be a really friendly place. But now we are beginning to look like comp.lang.c. That is *not* what I want, and I know it isn't what a lot of other people want (judging by the overwhelming support I got in my mailbox). When I want criticism for source code that I have written, this is the best forum for it. If I put it up on my web-page, very few people will download it, and even fewer people will comment on it. It will also take a very long time for any real discussion. Why do you think this group exists!? To tell people that we won't do their homework!?? >>>You will >>>find that MANY people share their programs via these more proper >>>formats, as it gives the OPTION for those who want the source code to >>>get it, and not have to pay the per minute charges > >>People who don't want to pay per minute charges for downloading excess >>posts should unsubscribe from c.l.p.b or get a new ISP. > >But if the newsgroup is not intended for large posts, why should I >unsubscribe? I agree.. this newsgroup isn't intended for large posts. I never said I wanted large posts. Come on, pay attention here. >How would I learn? And what are you learning by perpetuating this thread? Only my opinions, not anything related to pascal. Has anybody learned anything substantial here in the last 6 months? >I'm exceptionally happy with my ISP, >it's the telephone company that charges per minute, we're not all from >the states Mr. narrow minded. Just because I wasn't aware other countries charge per minute rates doesn't mean that I'm narrow minded. However, it was pointed out that people outside the united states *do* pay per minute charges. I suppose the only solution to that is to move to the United States ;). Okay.. so you have the problem that some people might post large source code to this group. And you have the problem of having to download all that source code. Still, are we not taking up more bandwith arguing about this and other really really stupid things? IMO, we'd all be better off if we didn't argue or flame each other and instead posted usable information. >>How many people out there know that you can do 80 bit moves with the FPU? >>How many people out there know how? >Around 50 since I work for a games company who make code run like a >bat out of hell. Wow, and so the rest of us work for a game company? [Looking around] Okay, so I work for a game company. My friends work for a game company. Statistically speaking, a majority of the people I know work for game companies. Still, that doesn't mean that everyone in c.l.p.b works for a game company, Mr. narrow minded. (couldn't resist ;) > >-[snip]- > >Cheers for that. Hey, wait a minute, nobody asked for it! Yay! >Another wannabe... *sobbing* Yes, you've found me out. I *am* a wannabe. Is there a wannabe anonymous that I can go to? I need help. I am one of the few that wants to share the knowledge I have and not keep it from other people. Working for a game company, I'd expect this of you. *sniff* I guess I'm not up to your or Bill Gates' level yet. >> We're trying to draw all the >>resources of the net that we, as borland pascal programmers, find >>useful to one place. Not spread them around and make it more >>difficult for people to find. If I submitted the above to SWAG, >>how many people here would rush out and download a new version!? > >Ooo, Oooh. Me, me, me. If you write a program that fulfils a >requirement that I have then I'll put a respective amount of effort >into acquiring a solution. Including searching the SWAG archives. But a lot of people *DON'T KNOW* that certain things are possible. This is a great place to show people that certain things are possible. The only way to do that is to have real discussions of souce code. I know a great deal about the pascal language (in the Borland flavour). But this doesn't mean that I know how to do everything. If I don't know that something exists, how am I supposed to ask how to do it? Okay, how about this... show me something that I don't know how to do. >>Because Scott^H^H^H^H^Hpeople post very useful code snippets here. > >I've found just as many at SWAG, and at other people's web sites - >more, now I think of it. Perhaps I should restate my position on SWAG. SWAG is, in general, a good place for retired code to reside. There is a lot of general-purpose starter information that has been put into one place. If one needs an example of how to do something, SWAG or the GPE are the places to go. Web-sites are a bit less friendly. There is no way of knowing if you are going to download a virus, if source code is included, etc. But this isn't about where to find useful code snippets. It is about *discussion* of code snippets. It is about *discussion* of Borland Pascal. How often do we discuss code that's in SWAG? One of the reasons I don't submit my work to SWAG is because my code improves constantly. So does the code of everyone else who works on a project for more than 3 days. But there is a limit. I'm not the best programmer in this group. There are some thigns I excel at, but I am not the end all of programmers. I come here to learn, and I come here to teach my specialty, which is graphics programming and optimization. So, lets start discussing source code, not bickering amongst ourselves. >Top discussion bloke. You lose. Wow, I lose because you say so. And I thought *I* had an ego problem. Sheesh. >MdP --Mark Iuzzolino One of the monsters@monstersoft.com | "When we're not programming http://www.monstersoft.com | we're eating the furniture." Article 27636 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: One final argument Date: 8 Apr 1997 17:50:16 GMT Organization: MonsterSoft Lines: 69 Message-ID: <5ie0go$jif@hume.nmia.com> NNTP-Posting-Host: plato.nmia.com Here is my final argument on the matter of posting here. There are some amazing programmers who post regularly to this group, each with their own specialty. Scott Earnest and R E. Donais (red) can field almost any general and high-level pascal questions. Jason Burgon probably knows more about VESA programming and Turbo Vision than anyone I know. Timo Salmi (sp?) can answer most pascal related questions, and if not, point you to somewhere where you can find an answer. Dr John Stockton has an incredible collection of links and answers to FAQs. AME is great for comic relief =). I have an extensive background with graphics programming, game programming and optimization techniques in assembler. There are many others that have windows, sound, and network programming, not to mention compiler design (FPK pascal, for example). If you were put all aforementioned people in the same room for a week, I have no doubt that you could recreate any piece of software ever written. This forum is a wonderful place for newer and less experienced programmers to find out better ways of programming in Borland Pascal. We are all connected by one thing.. a compiler. I would wager that a majority of readers of c.l.p.b use BP/TP because they feel it is the best tool for their projects. I have learned a great many things from this group. Either by participating in discussions or following other ones. I don't want that to end. Recently there has been a large number of complaints about someone posting source code. I agree that excessively large posts and/or binaries should *not* occur here. Nor should requests to do your homework for you. And everyone should have at least these three resources: SWAG, the PCGPE (PC Game Programming Encyclopedia), and the TurboPascal FAQ. Although they are indispensable for pascal programmers, they evolve very slowly. Changes don't happen very often if at all, and downloading updates isn't always convenient. This group is the addition and balance to those resources. Changes can happen rapidly. Bugs can be found and fixed within days, not months or years. Open discussion of techniques can lead to better code, and to better programmers. We disdain people who ask for a response to their question to be emailed to them, saying that other people may want to know the same thing.. and so we post here as well as cc'ing a copy to them. So why limit ourselves to private conversations via email? If you don't allow source to be posted here, that is what will happen. Without an open discussion, our programming abilities will stagnate. You can only go so far before you hit a ceiling in your knowledge. This is why I recommend that some source code be posted here. There is a rift between being a good programmer and being a real programmer. I can only think of two ways to cross that rift. Either you learn by trial and error, or you learn from someone who already has learned by trial and error. I have learned by the former.. having spent more than 50% of my life programming. I am talking about methodologies and techniques that they don't teach in any schools. Real world experience. I would say that the people mentioned in the first paragraph have this experience. With comment and criticism of source code other people can learn from them. This is why I feel that posting source code (within reason) is acceptable. I hope that many others feel the same way. PS: I apologize to the other resident gurus for not mentioning them by name. SWAG can be found at: http://www.gdsoft.com/swag/swag.html Mini-FAQ for c.l.p.b: http://www.merlyn.demon.co.uk/clpb-faq.txt Timo's FAQ: ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip PC Game Programming Encyclopedia: ftp://x2ftp.oulu.fi/pub/msdos/programming/gpe/pcgpe10.zip Game programming information: http://www.strangecreations.com/strange/library/games/rgpfaq.htm --Mark Iuzzolino one of the monsters@monstersoft.com | Barney: what you get when you feed http://www.monstersoft.com | a smurf after midnight. Article 27857 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.ansi-iso,comp.lang.pascal.borland Subject: Re: Limitations of Pascal Date: 14 Apr 1997 05:23:31 GMT Organization: MonsterSoft Lines: 23 Message-ID: <5isf0j$f95@hume.nmia.com> References: <334B9D92.6380@cuimail.unige.ch> <5iophh$rvs$1@sys10.cambridge.uk.psi.net> <5ir6in$kmp$2@sys10.cambridge.uk.psi.net> NNTP-Posting-Host: plato.nmia.com Xref: nmia comp.lang.pascal.ansi-iso:1190 comp.lang.pascal.borland:27857 In article <5ir6in$kmp$2@sys10.cambridge.uk.psi.net>, Matt Parkins wrote: >--[jude@smellycat.com (Jude Giampaolo) was heard to say]-- >>In article <5iophh$rvs$1@sys10.cambridge.uk.psi.net>, mattp@gremlin.co.uk wrote: >>> --[jude@smellycat.com (Jude Giampaolo) was heard to say]-- >>> >These aren't limitations of pascal. They're limitations of DOS and PC >>> >architecture. (I'm reading this in comp.lang.pascal.ansi-iso) >>> Hey, dude. All I know is that I can't MAlloc 4Mb with Pascal but I >>> can with Watcom C. > >>Then your Pascal compiler is crap. I've allcoded 32MB blocks of memory >>with my compilers no problem...... > >I use TP 7 - what do you use? I use BP 7.0, and I can allocate 32MB blocks of memory with no problem. Heck, I could allocate 64 terabytes if the machine had it. >MdP --Mark Iuzzolino one of the monsters@monstersoft.com | REALITY.SYS corrupted, http://www.monstersoft.com | reboot Universe? (Y/n) Article 28290 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: free pascal compiler Date: 26 Apr 1997 17:27:05 GMT Organization: MonsterSoft Lines: 38 Message-ID: <5jtdt9$5ot@hume.nmia.com> NNTP-Posting-Host: plato.nmia.com In article <5jsv92$7bf@sun3.uni-essen.de>, Peter Gerwinski wrote: >At the moment I agree, but with Borland Pascal 7 you are stuck with >64kB variables and code segments, bugs in the compiler which will >*never* be fixed, etc. First off, I believe the 64K limit has to do with data segment, not code segment (different units have different code segments?). As for allocating memory, with BP7.0 in Protected Mode, one *could* allocate 16383 4-gigabyte segments, or a little under 64 terabytes (if the machine had that much memory). Can I do that with gnu pascal? As for the bugs in the compiler... since BP7 comes with the RTL, you can change stuff as needed. As for the unfixable bugs, there are only a handful. Whose buglist is smaller? Borland's or Gnu's? >With Delphi you are bound to Windows 95 and >have no chance to port your programs to Linux, OS/2 or other real >operating systems. Well, I was going to say that I can port to AmigaDOS, but then you had to go and say "real operating systems". ;) >The same holds for FPK Pascal. FPK pascal is still in its infancy as a compiler. The last time I checked (which was a few months ago) it still couldn't do jump tables. And I couldn't do *anything* in assembly. I'm kind of surprised that you didn't mention TMT pascal. Out of all the alternative pascal compilers I've tried, TMT by and far was the best. I could do jump tables, BASM style assembly, call interrupts without a GPF, and actually *do* something with it. Granted, there are some annoyances w/ it... but they are minor. The compiler is fast and produces decent code. --Mark Iuzzolino one of the monsters@monstersoft.com | "But, your Honor, the light had http://www.monstersoft.com | Doppler shifted to green!" Article 28319 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: need help with Procedure. Date: 27 Apr 1997 19:38:21 GMT Organization: MonsterSoft Lines: 22 Message-ID: <5k09vd$jss@hume.nmia.com> References: <334C23D5.924@arkansas.net> <01bc4e1b$a71e5e00$186484a9@aaron> <01bc526a$f464f7c0$602a8acd@benjamik> <33629B2C.61C3@primenet.com> NNTP-Posting-Host: plato.nmia.com In article <33629B2C.61C3@primenet.com>, Mike Copeland wrote: >> function NextCh (Letter : char) : Char >> begin >> Ch := Chr(Ord(Letter) + 1); >> end; {NextCh} >> Now im not sure about the function Chr. Its thte opposite of Ord. If > its not Ch its something like it. [snip] > However, your function isn't correct, and it won't work - within a >Pascal Function, there must be code which _assigns_ a value of the >function type to the function's name. Thus, your code should have been: > >Function NextCh (Letter : char): char; >begin > Inc(Letter,1); NextCh := Letter >end; Why not use succ(ch)? --Mark Iuzzolino one of the monsters@monstersoft.com | "What do you mean you formatted http://www.monstersoft.com | the cat?" Article 28321 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: free pascal compiler Date: 27 Apr 1997 20:01:21 GMT Organization: MonsterSoft Lines: 24 Message-ID: <5k0bah$k73@hume.nmia.com> References: <5iqt7a$8o4$1@news.fas.harvard.edu> <5jsv92$7bf@sun3.uni-essen.de> <33624D44.1DB3@Today.Bud> <5ju3t4$87f@sun3.uni-essen.de> NNTP-Posting-Host: plato.nmia.com In article <5ju3t4$87f@sun3.uni-essen.de>, Peter Gerwinski wrote: >Mike Monett (NoJunkEmail@Today.Bud) wrote: [snip] >> If so, is there any chance of running it in Real Mode? > >For technical reasons, it is *impossible* to have a 32-bit program >and/or flat memory model in real mode. This isn't true. It is possible to have 32bit segments in real-mode. As long as himem.sys is the only memory manager loaded, one can pop into protected mode, set the segment limits to 4 gigabytes, and pop back out to real mode without a reset. I've used this mode, Ultima VII uses this mode, many demos use this mode, and you can find examples of how to do this floating around the net. (Look for a file called realflat.zip or realmem.zip). Had someone discovered it before windows became popular, we might all be writing 32-bit applications in real-mode. As for running a 32-bit program in real mode: 32-bit code will run in either 16-bit or 32-bit segments. You take a one cycle penalty for each 32-bit operand while in a 16-bit segment, however. --Mark Iuzzolino one of the monsters@monstersoft.com | "At least you can always use http://www.monstersoft.com | my code as a bad example." Article 28572 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: Q: How to read the keyboard's state in "protected mode" (BP 7.0) Date: 8 May 1997 10:26:10 GMT Organization: MonsterSoft Lines: 22 Message-ID: <5ks9o2$mar@hume.nmia.com> NNTP-Posting-Host: plato.nmia.com [snip] >>The question is: >>is there a possibility (a special function or a variable similar >>to "SegB800" for the segment at $0000, or even a better trick) You can convert any real-mode segment address to a protected mode selector with the following procedure: function SegToSelector(SegAddr:word):word; assembler; asm mov ax,0002h mov bx,SegAddr int 31h end; So: Seg0000:=SegToSelector($0000); --Mark Iuzzolino one of the monsters@monstersoft.com http://www.monstersoft.com Article 28574 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: Two pages with VESA mode Date: 8 May 1997 18:08:48 GMT Organization: MonsterSoft Lines: 35 Message-ID: <5kt4rg$r1a@hume.nmia.com> NNTP-Posting-Host: plato.nmia.com In article <336FCA6D.5B09@mediann.ru>, Dmitry Dmitrienko wrote: > >NicOFirst wrote: >> >> How can I do in order to use two pages with VESA? >> I want to make animations without flicking. > >If you're using VBE 1.2 revision, you may use following exmpl: >Imagine: there are simply double-highed screen: 640x480x256 >should consider as 640x960x256 - two screen's pages each 640x480. The first problem with the above is that it doesn't work on machines with only 512K video memory. 640*960=614400. You would have to use 640x400 in order to achieve two pages, and that mode isn't supported on every machine. >And you should use these pages sequentially first after second after >first and so on. Each page is available throu 64K bank-window at >A000 segment address. You may switch accessing area of this window across >all of the video memory using VBE fn.5 - Set/Get VideoMemory bank. >When you've filled one page, let it be visible using VBE fn. 7: Set/Get >Display Start. Function 7 also doesn't work on all machines. There is really no stable way to produce hardware double buffers on a majority of machines w/ VBE 1.2. However, in protected mode it is possible to create a double buffer as big as the screen, write to it, and then flip it to the screen. Although this may not be faster (which is really hard to say at this point), it will work on 99% of the machines out there, provided you have BP 7.0. --Mark Iuzzolino one of the monsters@monstersoft.com | CONGRESS.SYS Corrupted: http://www.monstersoft.com | Reboot Washington D.C (Y/n)? Article 28676 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: love letter Date: 11 May 1997 21:16:04 GMT Organization: MonsterSoft Lines: 13 Message-ID: <5l5cuk$gap@hume.nmia.com> NNTP-Posting-Host: plato.nmia.com In article <6WeTy1MUxmB@site33.ping.at>, rseoeg@site33.ping.at (Chris Mathews) writes: >"In fact, of course, the Internet is a shallow and unreliable electronic >repository of dirty pictures, inaccurate rumors, bad spelling and worse >grammar, inhabited largely by people with no demonstrable social skills." >American University's Washington College of Law CDA dissent Hmm... coming from a lawyer that has *got* to be a compliment. He probably got on AOL for a few minutes and then wrote the above. --Mark Iuzzolino one of the monsters@monstersoft.com | "Ask not for whom the bell tolls; http://www.monstersoft.com | let the machine get it." Article 28772 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Size of objects Date: 15 May 1997 10:39:54 GMT Organization: MonsterSoft Lines: 51 Message-ID: <5lep5q$bo7@hume.nmia.com> NNTP-Posting-Host: plato.nmia.com While doing some network programming I came across something that people may find interesting. It is possible to find the size of a child object from a parent object, without knowing anything about the child. Take this code as an example: type parent=object x,y,z:word; constructor init; destructor done; procedure size; end; child=object(parent) a,b,c,d:longint; end; var testobj:child; constructor parent.init; begin end; destructor parent.done; begin end; procedure parent.size; begin writeln(sizeof(self)-sizeof(parent)); end; begin TestObj.init; TestObj.size; TestObj.Done; end. The output from the above code is 16, which is the size of the child minus the size of the parent (4 longints=16 bytes). At first glance this may not seem all that useful. However, I was working on some object oriented code that sends network packets, and the size of the packet was important. Since the end programmer shouldn't have to specify how big the structure he/she is sending, this was a perfect workaround. The parent object will know how much data is in an unknown child without any programmer intervention, and the front-end application can create child packets of varying size without having to calculate how much data is in the child. --Mark Iuzzolino one of the monsters@monstersoft.com http://www.monstersoft.com Article 29349 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: Max data size, available memory in Turbo Pascal ? ? ? Date: 8 Jun 1997 15:37:16 GMT Organization: MonsterSoft Lines: 58 Message-ID: <5nejjc$g7n@hume.nmia.com> NNTP-Posting-Host: plato.nmia.com In article <8F5E34BAD4DDF93E.66291223BB3DCE59.1ECA341B13D4B2FE@library-proxy.airnews.net>, al chase wrote: >I wrote a series of large number cruncher programs a few years back in >Turbo Pascal 5. I needed to use large arrays. The problem, as I >remember it, was that data was limited to 64k per unit and an entire >program was limited to 640k. [snip] >Some Questions: >1) Will the Turbo Pascal 7/1.5 allow me to handle *large* arrays and >forgo the contrived implementations outlined if the first paragraph >above? Will I be able to use as much memory as I can afford, or how >much? Which Pascal version would you recommend? Borland Pascal 7.0 is capable of allocating up to 2^48 bytes (or 64 terabytes), but you have to jump through a few hoops to get it to work. >2) Are there other W95 versions of Pasacal that would be even more >compatible with large arrays ? Delphi 2.0 is a decent pascal compiler for win95 and winNT. You should be able to allocate as much memory as you want, but you will have to stomach the UI. >I downloaded fpk pascal and the memory availability is ideal but keeps >giving gpf errors when compling even simple procedures.Is there a way >to get it to work? There are some heavy proponents of FPK and GNU pascal lurking in this group, but there is also TMT pascal which I believe is the most BP-like. It has compiled 95% of the things I've thrown at it, has 386 assembler support (in BASM syntax instead of that AT&T crap), and can deal with large structures. >5) In Short, what would you recommed to someone with w95 and 16 meg >or more of ram who wanted to use virtually all the memory for large >number cruncher programs that used large arrays and were written in >Pascal ?? Borland Pascal comes with a lot of excellent tools to help programmers complete projects more quickly. This includes an excellent IDE, a decent debugger, blindingly fast compiler, and excellent manuals/online help. I'm not sure what the full commercial version of TMT pascal comes with (I've only used TMT-lite), but I would wager it doesn't have everything BP does. OTOH, TMT-Pascal probably would be better for a number-crunching program, as it is an optimizing compiler. IMO, it is best to use a compiler that you don't have to fight with to get things done (hence me not writing in C). If you can find it, BP7.0 is a wonderful compiler to have. However, due to the lack of DOS support by Borland (ie, we'll never see BP8.0 for DOS) I would recommend that you go with TMT-Pascal. You can check them out at: http://www.tmt.com/ >Al >alchase@airmail.net --Mark Iuzzolino one of the monsters@monstersoft.com | "When we're not programming http://www.monstersoft.com | we're eating the furniture." Article 29658 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: Does Using TP hit your carrer prospects? Date: 18 Jun 1997 06:27:02 GMT Organization: MonsterSoft Lines: 18 Message-ID: <5o7v3m$fef@hume.nmia.com> NNTP-Posting-Host: plato.nmia.com In article <5o6tef$l2g@news.cybercomm.nl>, Wottie wrote: >"Raymond Berkseth" wrote: >> What is any faster than pascal besides assembler? C isnt much faster is >>it? > >I was recently porting a C compression program to PASCAL and >immediateley it became *SLOW*!!! Then your code *SUCKS*!!! Seriously, anything I've ever ported from C has always had an increase in execution speed. This, of course, has to do more with programming style than anything else, as it is not difficult to out-optimize optimizing compilers. >Wottie --Mark Iuzzolino one of the monsters@monstersoft.com | "The worst thing about working here http://www.monstersoft.com | is hacking up the hairballs." Article 29963 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: Ahhh! objects and file access Date: 27 Jun 1997 22:44:46 GMT Organization: MonsterSoft Lines: 23 Message-ID: <5p1fou$c6b@hume.nmia.com> References: <01bc8260$d872ba40$23334781@708661617> <33B33F44.601@Today.Thanks> NNTP-Posting-Host: plato.nmia.com In article <33B33F44.601@Today.Thanks>, Mike wrote: >Mr. Matthew A. Russell wrote: >> [big snip] >> What is the best way to do it , or is there a better way. Thanks, if you >> can help > >Put it in one large file, then encrypt it using the triple-mode in >Blowfish. > >That'll keep the hackers busy so they can't get in and change the grades. What's to stop them from executing the original program? If a hacker actually does gain access to the system, it would be trivial to run the grading program. Besides, nowadays high-school students just scan in their report cards, modify them, and laser print them out. At $15 a card... well, it's a lucrative business venture. ;) >Mike --Mark Iuzzolino one of the monsters@monstersoft.com | "Who do you want to kill today?" http://www.monstersoft.com Article 30349 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: HELP! On passing variables on to OBJs in procedures Date: 13 Jul 1997 23:12:22 GMT Organization: MonsterSoft Lines: 18 Message-ID: <5qbncm$h21@hume.nmia.com> References: <33BFBA5E.5D50D80A@cyberhighway.net> NNTP-Posting-Host: plato.nmia.com Keywords: rsp@cyberhighway.net In article <33BFBA5E.5D50D80A@cyberhighway.net>, Giles wrote: >I am trying to make a better graphics unit by putting as much as I can >into assembler, but I don't know how to pass stuff like the X, Y, etc >info to it, so I can't get anything done worthwhile on this. >Thanks in advance! We have a section in our tutorial that covers exactly this at: http://www.monstersoft.com/tutorial1/ASM_intro.html or you can download examples at: http://www.monstersoft.com/download/asm1.zip --Mark Iuzzolino one of the monsters@monstersoft.com | "When we're not programming http://www.monstersoft.com | we're eating the furniture." Article 30490 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: Optimizing a Sprite Routine for Speed... Date: 22 Jul 1997 11:04:18 GMT Organization: MonsterSoft Lines: 159 Message-ID: <5r243i$1m9@hume.nmia.com> References: NNTP-Posting-Host: plato.nmia.com In article , wrote: >I have a little sprite routine that just blazes using a VESA LFB. However, >it is used at a critical point in my program (called to fill the entire >screen per frame) and I would like to ensure top speed. Assume which sprite >within an array of sprites position has already been calculated for >SpriteOfs. > >Procedure PutSprite (VideoOfs,SpriteOfs : longint); assembler; >asm > push ds {save ds for movs} > xor ax,ax > mov es,ax > mov ds,ax {zero es and ds} > push [word ptr VideoOfs+2] {push VideoOfs to stack, pop off to EDI} > push [word ptr VideoOfs+0] {Offset of LFB} > db $66 > pop di > push [word ptr SpriteOfs+2] {same as above} > push [word ptr SpriteOfs+0] {Offset of sprite data in EMB} > db $66 > pop si > mov bx,16 {Sprites are all 16x16} >@1:mov cx,4 > > db $F3 {rep movs dword ptr es:[edi],ds:[esi]} > db $66 > db $67 > db $A5 > > db $66 {add edi,320-16. Screen mode is 320x240} > db $81 > db $C7 > db $00000130 > > cmp bx,0 > dec bx > jne @1 > pop ds >end; (real 386 code, you'll have to convert it back to DBs) Procedure PutSprite (VideoOfs,SpriteOfs : longint); assembler; asm push ds {save ds for movs} push bp xor ax,ax mov es,ax {THIS WON'T WORK IN PROTECTED MODE!!!} mov ds,ax {zero es and ds} db 66h; mov di,word ptr VideoOfs db 66h; mov si,word ptr SpriteOfs mov bp,16 {Sprites are all 16x16} @1: mov eax,ds:[esi] mov ebx,ds:[esi+4] mov ecx,ds:[esi+8] mov edx,ds:[esi+12] mov ds:[edi],eax mov ds:[edi+4],ebx mov ds:[edi+8],ecx mov ds:[edi+12],edx add edi,320 dec bp jnz @1 pop bp pop ds end; Because the rep was taking up more time than it was saving it was prudent to unroll the loop. ES=DS, so it was better to use DS:[EDI] because ES causes a segment override. The instructions are perfectly paired so that it will execute optmially on the pentium without any stalls (except for the add edi,320, but you'll have to take the 1 cycle penalty). Other possibilities of improvement in speed are to make that jnz a short jump (which you cannot specify in BASM), and align the loop to a dword address (can't do [easily] in BASM either). From what I can tell, the above runs in real-mode and you probably map VideoOfs to 0a0000h. If so, you won't be able to access a 320x240 screen because the video segment is only 64K... unless you have chosen to set the video memory bank size to 128K, which DOES NOT work on all cards (very few in my experience). If you are running in flat real-mode, you still only get a 64K window. If you are running in protected mode, your segment loads will cause a GPF. Also, most VESA LFB's end up being 48-bit pointers, so you would have to load ES with the segment anyway (instead of setting it to 0). >Also, on the subject of horizontally flipping a sprite, I thought I could >do a BSWAP, but that really messed things up. BSWAP is a 486+ instruction that takes 3 clocks (despite what the intel specs say). You would probably do better to use 386 instructions. >Any ideas for a fast flip? Here are some examples from our 48-bit protected-mode object-oriented VESA library that will flip a buffer on the x and/or y axis. The code is by no means completely optimal, but it should give you an idea of how to approach the problem: gfx8@FlipY proc far arg @@self:dword push ds xor esi,esi les si,@@self mov dx,gfx8.es:[si].GetMaxY inc dx movzx ebx,gfx8.es:[si].Xres mov ds,gfx8.es:[si]._data mov edi,gfx8.es:[si]._InternalOffset mov si,gfx8.es:[si].GetMaxX add esi,edi @@lop: push esi edi @@lop2: mov al,ds:[edi] mov ah,ds:[esi] mov ds:[esi],al mov ds:[edi],ah inc edi dec esi cmp edi,esi jbe @@lop2 pop edi esi add edi,ebx add esi,ebx dec dx jnz @@lop pop ds ret Gfx8@FlipY endp procedure Gfx8.FlipX; var xwidth,count,buf:word; begin xwidth:=GetMaxX+1; getmem32(buf,XWidth); for count:=0 to (GetMaxY shr 33) do {getmaxY shr 33=getmaxy div 2} begin move32(ptr48(_data,_InternalOffset+LineOffsets[count]),ptr48(buf,0),Xwidth); move32(ptr48(_data,_InternalOffset+LineOffsets[GetMaxY-count]), ptr48(_data,_InternalOffset+LineOffsets[count]),xwidth); move32(ptr48(buf,0),ptr48(_data,_InternalOffset+LineOffsets[GetMaxY-count]),xwidth); end; freemem32(buf) end; >I think for a vertical flip, it would just involve starting at the end of the >sprite data, then use STD to work backwards to the top. The direction flag would have no use in this case, so rep movs instructions would be useless because you can't tell the computer to move memory in both directions. --Mark Iuzzolino one of the monsters@monstersoft.com | "Who do you want to kill today?" http://www.monstersoft.com Article 30554 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: Why 70 fps? Date: 25 Jul 1997 05:41:13 GMT Organization: MonsterSoft Lines: 36 Message-ID: <5r9e9p$dkp@hume.nmia.com> References: <33C63EB4.449E@concentric.net> <33d38914.767993@news.sn.no> <33D5ADDC.74A0DF10@connexus.apana.org.au> <33d7241a.1944916@news.sn.no> NNTP-Posting-Host: plato.nmia.com In article <33d7241a.1944916@news.sn.no>, Kim Robert Blix wrote: >Emil Mikulic once said: > >>> 24 fps on a computer is slow. the graphics seems jerky. 70 fps however will run >>> every frame and therefor seem much smoother. So I guess it is a personal >>> preference, IF you like jerky graphics. >>Slow? >>24/25 fps is ideal for animations. >>If you're doing a game or a 3D engine or something where there isn't >>a huge amount of information being transferred then 30fps is what you >>should go for but I don't think there would be much point in 70fps. >May I suggest to you go ahead and test your thesis? It will become apperant >the minute you actually test it. 30 fps WILL seem jerky. I have tested various refresh rates for a platform game we were making, and 70fps was unreasonable due to the amount of frames being discarded (the character can only move so much per frame), 24 seemed a little sluggish, and 35 fps seemed the most reasonable. 3D games are different in that you can get away with a more realistic imagery at a lower refresh rate due to the way the brain works. However, if I were programming a 3D game, I would shoot for 70fps. >>When you watch TV, is the movement jerky? >Different refresh-rate. The refresh rate has little to do with it. It's the motion blur, unlimited colours, and interlacing that make the biggest differences. Very few (<3?) games on the PC use motion blur, so I suspect they won't look as good as something you see on TV, even at a higher refresh rate. --Mark Iuzzolino one of the monsters@monstersoft.com | "Who do you want to kill today?" http://www.monstersoft.com/ Article 30596 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: ...Your Invited: "Grand Re-Opening".. Date: 26 Jul 1997 20:22:39 GMT Organization: Nitpickers R Us Lines: 45 Message-ID: <5rdmaf$7g4@hume.nmia.com> NNTP-Posting-Host: plato.nmia.com In article <33da0dbe.4199179@news.concentric.net>, Stephen Posey wrote: >On 26 Jul 1997 04:13:53 GMT, monsters@nmia.com (MonsterSoft) wrote: > >>In article <5raigq$ol9@buck.innerx.net>, wrote: >>> YOUR INVITED! >> >>I wouldn't put much faith in a place that has such an obvious grammatical >>error. > >Hay, liten up dude, wer'e programmmurs not englitch profesers arond >her! Eep. You're right, I should have phrased the statement in the form of a program. if (MyPost.TypeOfPost AND (Humourous OR Witty OR Informative))<>0 then goto Check; if (MyPost.TypeOfPost AND BlatentPlug)<>0 then halt; if (MyPost.TypeOfPost AND OfferingGifts)<>0 then halt; if (MyPost.TypeOfPost AND (Stupid OR Worthless))<>0 then halt; if (MyPost.TypeOfPost AND Flame)<>0 then begin OpenMouthInsertFoot; halt; halt; halt; end; Check: if (MyPost.TypeOfPost AND (SpellingErrors OR GrammaticalErrors) then while (MyPost.InputStream<>'') AND ((SpellingErrors>0) OR (GrammaticalErrors>0)) do begin read(MyPost.InputStream,s); fix(s,SpellingErrors); fix(s,GrammaticalErrors); write(MyPost.InputStream,s); end; MyPost.WriteSig; MyPost.PostMessage; MyPost.Done; --Mark Iuzzolino one of the monsters@monstersoft.com | "When we're not programming, http://www.monstersoft.com | we're eating the furniture." Article 30664 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: Optimizing a Sprite Routine for Speed... Date: 31 Jul 1997 00:59:32 GMT Organization: MonsterSoft Lines: 50 Message-ID: <5roo1k$4l0@hume.nmia.com> References: <33d5d170.4461999@news.sn.no> NNTP-Posting-Host: plato.nmia.com In article <33d5d170.4461999@news.sn.no>, Kim Robert Blix wrote: >cgfm2@hooked.net. once said: > >>I have a little sprite routine that just blazes using a VESA LFB. However, >>it is used at a critical point in my program (called to fill the entire >>screen per frame) and I would like to ensure top speed. Assume which sprite >>within an array of sprites position has already been calculated for >>SpriteOfs. > >[Snip program] > >The rutines seem as fast as they are likely to get, atleast without a major >re-write. There are two ways to make the sprites faster: > >1. Depending on the size of your sprites, you can set ss/p to the correct >location and use "pusha" to draw the sprite. > >2. Instead of having your sprites saved as graphics you can save them as code >snippets, and CALL them. (no loop,no math, no nothing :) ) > Kim Robert Blix Those are absolutely the two *worst* possible ways of drawing sprites, and here's why: 1) By using push instructions to draw your sprite, you risk corrupting surrounding data every time an interrupt is called. Let's say that you are about to push the last 4 words of a 64K buffer and an interrupt occurs. The interrupt itself will use the stack segment to save all the registers (along with the CS:IP of what it interrupted). This added data will overflow the 64K buffer and cause a GPF [in PM] or wrap around and corrupt the data at the beginning of the segment [in RM]. I've tried this method, and I've had it crash. It also wasn't any faster than using rep movsd/b combos. Or, in this case, an unrolled loop. 2) Compiled sprites take up about 4-6 times as much memory as the normal bitmap is. Mr. McDonald's sprites were 16x16. That's a measily 256 bytes of data. Are you suggesting that he should use more than 1K of code to draw 256 bytes of data!? And what if he wanted to do it in protected mode? It's a real pain in the arse to set up multiple code segments for compiled sprites. Programmers who use compiled sprites should not be called programmers. For related topics and further belittling of programmers who use compiled sprites, please visit our web-site at: http://www.monstersoft.com/tutorial1/blit_discuss.html --Mark Iuzzolino one of the monsters@monstersoft.com | "When we're not programming http://www.monstersoft.com | we're eating the furniture." Article 30783 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: DPMI : Buggy software or.... Date: 12 Aug 1997 01:12:45 GMT Organization: MonsterSoft Lines: 35 Message-ID: <5sodad$i0j@hume.nmia.com> References: NNTP-Posting-Host: plato.nmia.com In article , Pim Aarts wrote: >Hi, > >I have written a program for the handling of a laboratory robot. > >Due to a extended demand for heap space, I have converted this program from >real mode to DPMI. [snip] >My question: >1) Is there someone who has had similar problems when converting an >existing program from real mode to DPMI; >2) Is there someone who has converted a real mode program to DPMI and has >had no problems at all, or only problems he or she was able to solve. >Pim Aarts >p.aarts@pi.net We've converted many programs from real-mode to protected-mode and have had only two minor problems. The first problem is with the number of selectors you can allocate. With the normal DPMI memory handling routines you can allocate up to 16 megabytes of memory, but you can only chop it up into around 2000 pieces. All attempts to allocate memory beyond this limit will fail. The other problem is that memory allocation fails about 5% of the time, and when you attempt to allocate the memory again it works fine. I've not seen this problem in real-mode, but that could be due to memory consumption differences. Everything else seems to work fine. --Mark Iuzzolino one of the monsters@monstersoft.com | "Who do you want to kill today?" http://www.monstersoft.com | "Sanford Wallace for starters." Article 31064 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: The Future of TP Date: 26 Aug 1997 22:51:52 GMT Organization: MonsterSoft Lines: 37 Message-ID: <5tvmm8$but$1@hume.nmia.com> References: <5tacpq$7r6@news.keyworld.net> <33FB3B65.95FAEA5F@koeln.netsurf.de> <33FD40E9.BA7F4277@ix.netcom.com> <5ttuh7$94s@n.ruf.uni-freiburg.de> NNTP-Posting-Host: plato.nmia.com X-Trace: hume.nmia.com 872635912 12253 (None) 198.59.166.165 X-Complaints-To: abuse@nmia.com Xref: nmia comp.lang.pascal.borland:31064 In article <5ttuh7$94s@n.ruf.uni-freiburg.de>, Klaus Hartnegg wrote: >Scott Earnest (setech@ix.netcom.com) wrote: >: > There's a limitation for BP7, too! You can use up to 16MB, not the whole >: > memory! The 286 code causes this limit. You'd have to use 32bit-DPMI to >: > get the whole memory (up to 4GB). > >: Slight misconception here. The 16MB limit only applies to a 286, which >: only has enough address lines to access 16MB. On a 386 or above, you >: can get well above the 16MB mark > >Borland Pascal uses the protected mode of the 286, not 386. >Thus Borland Pascal is indeed limited to 16 Megabytes >(and 64 Kilobytes for all global variables). >Klaus Borland Pascal uses 16-bit addressing. While the protected mode aspect of BP does work on a 286, this does not limit it to 16 megabytes. On the 386, and with the correct library (ie, NewFrontier), you can allocate up to 64 terabytes of memory with Borland Pascal 7.0. Recently I was able to work on a test system with 256 megabytes of RAM. I allocated one contiguous memory buffer of 120 megabytes with BP7. It took a really really long time to clear the memory ;), but it worked without a hitch. If you have more than 16-megabytes of memory, you can test this out for yourself by downloading: http://www.monstersoft.com/download/newfront.zip and running NEW4.EXE. The program will try to allocate as much memory as you have. For more information on allocating enormous buffers in BP7.0 see: http://www.monstersoft.com/tutorial1/PM_intro.html --Mark Iuzzolino one of the monsters@monstersoft.com | "Who do you want to kill today?" http://www.monstersoft.com Article 31143 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (MonsterSoft) Newsgroups: comp.lang.pascal.borland Subject: Re: !How to use S-VGA Date: 29 Aug 1997 16:22:49 GMT Organization: MonsterSoft Lines: 81 Message-ID: <5u6t0p$hcr$1@hume.nmia.com> References: <33F90739.190B@lakenet.com> <33FB3A6A.B32C0943@koeln.netsurf.de> NNTP-Posting-Host: plato.nmia.com X-Trace: hume.nmia.com 872871769 17819 (None) 198.59.166.165 X-Complaints-To: abuse@nmia.com Xref: nmia comp.lang.pascal.borland:31143 In article <33FB3A6A.B32C0943@koeln.netsurf.de>, Malte Clasen wrote: >potter wrote: > >> I'm programming my games using TP7 and a VGA mode (mostly X-mode and >> 13-h mode). I would like to have higher quality graphics for my >> programs using a S-VGA mode, but I don't know how to use for fast >> animations. Could you help me by giving me a unit or an example that >> uses the S-VGA mode. > Falsehood #1: >You'd have to use LFB (Vesa2.0) for fast graphics You do not have to use a linear frame buffer for fast graphics. It is quite easy to use banked graphics and still have extremely fast routines. Falsehood #2: > but that's impossible using Borland Pascal It is not impossible. In fact, several people have been able to do it. I'm currently updating the page at our site which contains the information on how to init a LFB, but you can get the information currently from Scott Earnest's page at: http://www.netcom.com/~setech/vesa.html And now on to Falsehood #3: > [... impossible using Borland Pascal] (16bit limitation). Inherently BP 7.0 has a 16-bit limitation. However, you can *easily* use 32-bit and 48-bit addressing with the NewFrontier unit. You must write your own routines, but if you are needing to use that much memory you should probably have the background to be able to do it. Or, if you don't, we'll probably have a tutorial on how to use NewFrontier sometime in the future. Falshood #4: > Vesa1.2 is rather slow Vesa 1.2 is not slow. The only reason VESA should be slower than mode 13h is because you are moving 4 or more times the amount of memory to the screen. Falsehood #5: > [Vesa 1.2 is rather slow] and not usable for action games. Vesa 1.2 is very usable for action games. We are currently work on a parallax scrolling platform game in 640x480x8bpp. It runs at 30fps on a 486-100, and could easily run at 70fps on a pentium. A majority of the time it uses banked routines, but will use a LFB if possible. The LFB isn't more than 5% faster than the banked routines. Non-sequitor #1: > Learn assembler ;) Ah... so you were coding your vesa 1.2 action game with pascal drawing routines. That would make sense why it was slow. Regardless, we have only done 11 routines in pure assembler: putpixel(), getpixel(), rawline(), horizline(), vertline(), scale(), clear() putblit() , getimage(), putimage(), bar(). Everything else is built upon these routines, and everything else is in pascal. For an example of what can be done with pascal, you might download our e-zine which runs in 640x480x8bpp from: http://www.monstersoft.com/download/bitdream.zip If you want other examples of what is possible w/ high-res graphics, email us. We have currently ported 10-15 Mode13h "effects" to high-res. --Mark Iuzzolino one of the monsters@monstersoft.com | "We've already eaten the competition" http://www.monstersoft.com Article 36324 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (Mark Iuzzolino) Newsgroups: comp.lang.pascal.borland Subject: Re: ROT13 (was Re: [req] Lips / Kiss) Date: 15 Mar 1998 02:21:27 GMT Organization: MonsterSoft Lines: 45 Message-ID: <6efdv7$r7k@hume.nmia.com> References: <3502661e.104572692@news.mag-net.com> <350540EE.C8C2B7FD@bcgroup.net> <350562E3.4938@gwtc.net> NNTP-Posting-Host: plato.nmia.com In article , Paul Dietrich wrote: >On Tue, 10 Mar 1998, Donovan wrote: > >> Hilton Janfield wrote: >> > [from alt.ascii-art "discussion" on what to do when your newsreader >> > doesn't support ROT13] //nitpick time Well, since you're nitpicking ... [snip] >> > > int ch; > >//ch is not an integer, use char ch (you can get away with int ch, >//but it uses more bytes (2 bytes on 16-bit, 4 on 32 bit machines)) ch is an integer. From manpages: int getc(FILE *stream); int getchar(void); char *gets(char *s); int ungetc(int c, FILE *stream); The reason it is an integer is because an EOF is returned as a -1. >> > > while ((ch = getchar()) != EOF) >> > > { >> > > if ((ch >= 65) && (ch <= 90)) > >//replace all ascii values with the letters (really works, and >//easier to read ie: if((ch >= 'A') && (ch <='Z')) Yes, but what happens when you run the program on a machine where A isn't 65? EBDIC machines, for example. OTOH, if they're not trying to convert generic input and they *want* 'A', they shouldn't use ASCII codes. YMMV. Of course, this is all rather silly, as this is comp.lang.PASCAL.borland. --Mark Iuzzolino one of the monsters@monstersoft.com | "When we're not programming http://www.monstersoft.com | we're eating the furniture." MonsterSoft Email verification & Intercept Layer (MS_EVIL) spam filter in effect. Article 36384 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (Mark Iuzzolino) Newsgroups: comp.lang.pascal.borland Subject: Re: Pictures Date: 17 Mar 1998 22:34:52 GMT Organization: MonsterSoft Lines: 20 Message-ID: <6emtqc$1q4@hume.nmia.com> NNTP-Posting-Host: plato.nmia.com Daniel Marcovitch schrieb: > > BS"D > Does anyone know any units/programs etc. for handling pictures (I don't > care what type - but I'd prefer something which loads them fast !) > > Daniel Marcovitch > maurdan@hotmail.com http://www.monstersoft.com/objgfx/ The graphics library will encode/decode PCX, MSH, and DNY with more types coming soon. It's also the fastest high-res 256 colour graphics library for Borland Pascal 7.0 (and, in at least one case, performing better than TMT Pascal's graph unit). --Mark Iuzzolino one of the monsters@monstersoft.com | "Just think of us as large http://www.monstersoft.com | drooling bunnies." Article 37528 of comp.lang.pascal.borland: Path: nmia!nmia.com!monsters From: monsters@nmia.com (Mark Iuzzolino) Newsgroups: comp.lang.pascal.borland Subject: Re: Borland gets a new name Date: 2 May 1998 07:12:18 GMT Organization: MonsterSoft Lines: 20 Message-ID: <6ieh0i$nqp@hume.nmia.com> References: <3548962E.EABF8F17@anasazi.com> NNTP-Posting-Host: plato.nmia.com In article <3548962E.EABF8F17@anasazi.com>, Randy Galbraith wrote: >If you haven't already done so, you'll be in for a surprise when you >visit www.borland.com. That site will take you to www.inprise.com. >Yes, Borland is gone, "Inprise" is now the new company name. Hey, >maybe, Apple will change its name to Orange? Perhaps Microsoft will >become Microhardball or Orwelsoft, hmmm ;-) One has to wonder if someone in the Microsoft kamp picked that name. Nobody in their right mind would pick such a stupid name unless they wanted the company to be laughed at, ridiculed, and eventually flamed into the ground. Next thing you know Del Yocam will be requesting that the newsgroup be called comp.lang.pascal.inprise. *shudder* --Mark Iuzzolino one of the monsters@monstersoft.com | "Who do you want to kill today?" http://www.monstersoft.com Article 37729 of comp.lang.pascal.borland: Path: nmia!plato.nmia.com!monsters From: Mark Iuzzolino Newsgroups: comp.lang.pascal.borland Subject: Newgroup abuse (long) (was Re: Acessing Modem and Other Com ports.) Date: Wed, 6 May 1998 19:47:43 -0600 Organization: New Mexico Internet Access Lines: 96 Message-ID: Reply-To: Mark Iuzzolino NNTP-Posting-Host: plato.nmia.com Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Sender: monsters@plato.nmia.com To: "Ing. Franz Glaser" In-Reply-To: <35509ECF.38E34CE4@eunet.at> On Wed, 6 May 1998, Ing. Franz Glaser wrote: > Sorry, I do not understand your reasons to write this. Really, I do not > understand. And it is not a foreign language problem. Apparently so. I will try to be more clear. > In most cases I answer to peoply who obviously contact the NG very > seldom or for the first time. And there are plenty links and .ZIPs on > the TP-links page which answer their questions in depth. Yes, but you *post* in the newsgroup. You could just email them instead of duplicating your URL again, and again, and again, ad naseum. > I think, and it does not matter if you agree, that you should be more > angry about the people who do not read the NG mails some days back or > call the DejaNews site, but simply cry into the wood waiting for some > echo without their own effort. I only have to read them once, I have to read your posts again and again and again. I cannot actually recall the last time you posted a line of useful source code. [checking dejanews]. Well, I found two things. Today you posted source code, and... I was wrong in my assumption that you were on the borderline of abuse. I did a search of your email address and came up with 1500 matches (346 of which were posts since 97/12/08!). This *CLEARLY* constitutes abuse. I am truly dumbfounded. There have been about 38000 articles since the creation of the newsgroup back in 93/94. Of the hundreds of regulars and the thousands of one time posters, you have a whopping 1% of the newsgroup traffic. In my entire 15 years on the internet I cannot claim to have contributed 1% [cumulatively] to *any* newsgroup, even to newsgroups I've created or participated in since their birth. I will be taking this up with your ISP. > I do a lot of work having the TP-links page up to date and showing all > relevant informations. This is another reason why I "advertise" it, yet > without any commercial benefit for me or my company. Spam does not have to be of a commercial nature to be considered "spam". Excessive or irrelevant postings also constitute spam. I will be checking to see if you have violated the terms of service (TOS) and acceptable usage agreement (AUP) of your ISP. I am not a net.cop, or a net.kook. I am a concerned netizen who has been around long enough to see the net degrade into what it is today. (Note: I am part of the lumber cartel (tinlc)). I cannot stop the many, one-time questions about runtime errors on 200Mhz computers, or the questions about where they can find the graph unit. I can, however, stop you from continually abusing the newsgroup. Comp.lang.pascal.borland is my last safe haven from poor signal to noise ratios. You, sir[/madam .. I can never tell anymore], are making it not worth reading. I'm not giving up on usenet without a fight. In case you feel you are being singled out, you are not. I have 56 confirmed net.kills of spammers, 3 of those were people who posted advertisements in c.l.p.b. I consider your abuse of the newsgroup as bad as spam, and will fight it with every means necessary and at my disposal. > And I received many thankful answers from the TP-links page. So have I for my web-page.. That doesn't give you the right to keep posting your URL hundreds or thousands of times! Usenet, like the internet, is a privilege, not a right. I pay for my access, as does everybody else, except for some college students. But, they pay for it with tuition. You are clogging the newsgroup and taking up my time. In the long run you are costing me money. This is a bad thing. > A big problem is the NOSPAM usage in many email adresses, so I am tired > of deleting responses on my mail server which tells me that a particular > mail could not be sent. Therefore I stopped answering directly to avoid > this other kind of spam. Are you too incompetent to take out "nospam" or to read the whole message to see how to respond to them? Your incompetence, or perhaps laziness does not give you the authority to excessively post. > It could be true that it is nonsense to repeat the URL in the NG, > because the people who do not read back will never see it and the other > feel that this was boring. I did not find a solution until now. I'm afraid it's already too late. I'm cc'ing this to the newsgroup for public record and/or for others to debunk my statements. If I'm wrong on this matter, I will cease any action and retract my statements. However, I believe that I am not wrong. --Mark Iuzzolino | "When we're not programming one of the monsters@monstersoft.com | we're destroying the accounts http://www.monstersoft.com | of those who abuse the Internet."