#: 8539 S3/Languages 02-Dec-90 13:28:11 Sb: #'C' problem Fm: Jim Peasley 72726,1153 To: 'C' mavens Anybody want to help save my sanity?? I'm trying to parse out the year from an input string passed to a function, and can't see where I'm going wrong. Sample C code : ------------------------------------------------------------------------ print_event(Inline) char Inline[81]; { int e_yr; ... ... char ev_yr[3]; char *inptr = Inline; ... ... p strncpy(ev_yr,inptr + 6,2); /* copy bytes 6 & 7 to ev_yr */ itoa(e_yr,ev_yr,10); /* convert int e_yr to char ev_yr base 10 */ printf("\nEvent year = %s",ev_yr); <=== always prints "2" ... ... ------------------------------------------------------------------------ I'm using Turbo C and stepping through the code line-by-line, and still can't see what's wrong... anybody else see the problem?? BTW - Turbo C is a neato development environment - lots of on-screen help and it's lightning FAST, but the CoCo C compiler catches some errors that TC seems to ignore. ...Jim There is 1 Reply. #: 8540 S3/Languages 02-Dec-90 15:00:12 Sb: #8539-#'C' problem Fm: Pete Lyall 76703,4230 To: Jim Peasley 72726,1153 (X) Jim - Off the top: Are you REALLY passing an ARRAY of characters to the function, or did you pass a pointer to that array? If you called the function with the name of the array, you passed a pointer: char junk[81]; gets(junk); do_function(junk); .. as in this scenario. It'll also be easier to manipulate (and faster) in the target function. I've never passed an array in TC, but don't think you CAN under MW C. Also - on your reference to strncpy(), you said you were copying the 6th and 7th characters... you actually started the copy at the 7th character when you did this: strncpy(target, source+6, 2); Pete There is 1 Reply. #: 8553 S3/Languages 02-Dec-90 20:10:40 Sb: #8540-#'C' problem Fm: Jim Peasley 72726,1153 To: Pete Lyall 76703,4230 (X) Pete; Yep, commenting error on the 6/7 bytes - stepping thru the program, I can look at the variable (or pointer + offset) and see the value at any time. Just got thru with 2 weeks of classroom 'C' and I guess all of it hasn't sunk in yet. That's what I'm trying to do now, practice until I get all the 'not quite clear' points so that I understand them. The name of the array is what's being passed to the function, and I'm declaring a local pointer to the char array. Have any ideas on why strncpy doesn't seem to be doing it's thing? ...Jim There is 1 Reply. #: 8568 S3/Languages 03-Dec-90 08:53:21 Sb: #8553-#'C' problem Fm: Pete Lyall 76703,4230 To: Jim Peasley 72726,1153 (X) Jim - If you're passing the NAME of the array, then that's automatically a pointer to the array: saying: assuming: char myarray[81]; saying : myarray is the same as &myarray[0] So, if you called a function with 'myarray like so: do_it(myarray); You'd need to declare it at the receiving end like this: do_it(stuff) char *stuff; /* myarray arrived as a pointer to the base of itself*/ { char woof[3]; strncpy(woof,myarray+5, 2); /* grab chars 6 & 7 */ .... } Pete There is 1 Reply. #: 8582 S3/Languages 04-Dec-90 00:20:40 Sb: #8568-#'C' problem Fm: Jim Peasley 72726,1153 To: Pete Lyall 76703,4230 (X) Pete; Yeah, your way seems to be a bit more self-documenting than the way I was doing it... but at this point in the game, any way that works is what I'm shooting for! ;-) > do_it(stuff) > char *stuff; /* myarray arrived as a pointer to the base of itself*/ > { > char woof[3]; Hopefully, this'll all become more automatic as time goes on. ...Jim There is 1 Reply. #: 8589 S3/Languages 04-Dec-90 08:44:46 Sb: #8582-#'C' problem Fm: Pete Lyall 76703,4230 To: Jim Peasley 72726,1153 (X) I'm sure it will (become more automatic). Even with my ASM background, the prodigous use of pointers was baffling. It became clear to me later on that if you simply point to things, vice moving them around, things are MUCH quicker. Probably some of the best tutorial hours I spent were staring at Carl Kreider's code - any of it. I highly reccomend scanning the DL's (esp. the UG LIB) for anything by Carl. He's really a wonderful programmer. Pete There are 2 Replies. #: 8631 S3/Languages 07-Dec-90 10:12:19 Sb: #8589-#'C' problem Fm: Carl Kreider 71076,76 To: Pete Lyall 76703,4230 (X) (Blush) 8-) I don't get around so much, but I get by every so often. I caught the 6809 lib unix time stuff bug and will fix it this weekend and upload fixed version. I can't believe that took this long to find! Carl There are 2 Replies. #: 8632 S3/Languages 07-Dec-90 13:18:03 Sb: #8631-#'C' problem Fm: Pete Lyall 76703,4230 To: Carl Kreider 71076,76 (X) It has been found and worked around in the past. And stop blushing... it makes the other characters on the screen hard to read .. (grin).. Pete There is 1 Reply. #: 8668 S3/Languages 10-Dec-90 09:43:45 Sb: #8632-'C' problem Fm: Carl Kreider 71076,76 To: Pete Lyall 76703,4230 (X) Well, I stll feel dumb. But i is fixed now, which of course breaks your work around .... (grin)... Carl #: 8688 S3/Languages 12-Dec-90 09:44:06 Sb: #8631-#'C' problem Fm: Paul K. Ward 73477,2004 To: Carl Kreider 71076,76 (X) Carl, I have been talking to a professional photographer here on some brochure and advertising issues. Name is RC Kreider, the son of one of five brothers who left central PA years ago to ove to (move to, oops) Ohio and Illinois. Any relation, I wonder? Paul There is 1 Reply. #: 8691 S3/Languages 12-Dec-90 12:20:14 Sb: #8688-'C' problem Fm: Carl Kreider 71076,76 To: Paul K. Ward 73477,2004 Probably are related. My kin landed in PA late 1700's or so and then moved into Ohioo,Ill, Ind, Kansas, and so on. Lots of roving preachers. #: 8639 S3/Languages 08-Dec-90 11:32:10 Sb: #8589-#'C' problem Fm: Jim Peasley 72726,1153 To: Pete Lyall 76703,4230 (X) Pete; My weekly question on "C" this week is on memcpy and strcat. I seem to be missing the boat somehow, and would appreciate a "pointer" to whtre I'm erring. >> inline = "01/22/54Tiny Tim*Birthday" << addr. passed to funct. 'print_event' print_event(inline,yr) char *inline; int yr; { int s_len, ev_len; char date[6], *eptr, name[32]; memcpy(date,inline,5); /* pull in 1st 5 bytes */ strcat(date,'\0'); /* and null term it */ eptr = strchr(inline,'*'); /* loo' for delimiter */ s_len = strlen(eptr); /* get length of event + '*' */ ev_len = strlen(inline + 8); /* get length of instring - date*/ memcpy(name,(inline + 8),(ev_len - s_len)); /* copy only name */ strcat(name,'\0'); /* and null term it */ printf("\n%s %s",date,name); return; } >> date = "01/22 %#Tiny Tim%#&$!"#$!" >> name = "Tiny Tim%$#!%$%!"#$#$" In both cases, my strings don't get null terminated and it prints garbage chars after them. ...Jim There are 3 Replies. #: 8640 S3/Languages 08-Dec-90 12:40:47 Sb: #8639-#'C' problem Fm: Bruce MacKenzie 71725,376 To: Jim Peasley 72726,1153 (X) Jim, Strcat[date,'/0']; is not the way to null terminate a string. Strcat assumes the string pointed to by date is already null terminated. It searches along it until it finds a null (from the output it obviously doesn't find a null until it's searched along several characters beyond the space set aside for the string). It then tacks on the second string, a null string in this case, at that position. To null terminate date all you need do is explicitly assign the null: date[5]=0; There are 2 Replies. #: 8649 S3/Languages 08-Dec-90 15:44:43 Sb: #8640-'C' problem Fm: Jim Peasley 72726,1153 To: Bruce MacKenzie 71725,376 (X) Thanks Bruce, I've been tearing my hair out over this one. Originally, I was trying to use strncpy, but found a caveat that I had overlooked : "if s2 is longIr than s1, the string is not null terminated". Since s2 will always be longer in my case, I thought I'd try memcpy and explicitly put a '\0' at the end. Never occurred to me that strcat has to find the original '\0' in order to know where to begin concatenating! I'll try yours and Pete's suggestion in a bit and let you know. Thanks, ...Jim #: 8655 S3/Languages 09-Dec-90 11:16:54 Sb: #8640-#'C' problem Fm: Jim Peasley 72726,1153 To: Bruce MacKenzie 71725,376 (X) Bruce; (&& Pete && JJ) Explicitly assigning the null byte worked like a champ! Thanks guys. Lots of things in 'C' are not too intuitive, but learning thns way, I'll not soon forget lessons learned! success = ((goal != experiment && frust_lvl[i] < MAX)?try_again(),++i:ask_cis()); ...Jim There is 1 Reply. #: 8669 S3/Languages 10-Dec-90 16:46:27 Sb: #8655-#'C' problem Fm: Bruce MacKenzie 71725,376 To: Jim Peasley 72726,1153 (X) Jim, Good deal. Keep with it and I hope you learn to love C as much as I do. It's a neat language. There are 2 Replies. #: 8683 S3/Languages 11-Dec-90 23:32:33 Sb: #8669-'C' problem Fm: Jim Peasley 72726,1153 To: Bruce MacKenzie 71725,376 (X) Bruce; Yah, I'm beginning to like it (he sez, gnashing teeth and pulling hair!). ...Jim #: 8727 S3/Languages 14-Dec-90 00:00:58 Sb: #8669-#'C' problem Fm: Jim Peasley 72726,1153 To: Bruce MacKenzie 71725,376 (X) Bruce; Maybe you can help- #define INFILE c:\\system\\dates.fil FILE *fp; main(argc,argv) { add_event(); etc. } add_event() { char outstring[80]; etc. if ((fp = fopen(INFILE,"a+")) == NULL) fprintf(stderr,"Cannot open output file\n"); else { if (fputs(outstring,fp) == EOF) fprintf(stderr,"File write failed\n"); } f lose(fp); clearerr(fp); return; } This code fragment doesn't want to write to the output file for some reason. Reads work fine using the same #define for INFILE, and checking the last char of "fputs(outstring,fp)" returns the correct char. I'm obviously doing something wrong, but for the life of me, can't see what it is! Can you give me a clue? Thanks, ...Jim p.s. not to worry about the obvious MS-DOS file spec, I've ifdef'd similar calls for OS9! There is 1 Reply. #: 8736 S3/Languages 14-Dec-90 09:05:09 Sb: #8727-#'C' problem Fm: Pete Lyall 76703,4230 To: Jim Peasley 72726,1153 (X) Jim - Other than the fact that your #defined name isn't in quotes, I don't see any immediate problem (granted, I'm still on my first cup of coffee...) Pete There is 1 Reply. #: 8744 S3/Languages 15-Dec-90 01:37:38 Sb: #8736-#'C' problem Fm: Jim Peasley 72726,1153 To: Pete Lyall 76703,4230 (X) Pete; Again, I missed the quotes in the translation... they're there in the source though, and the pgm. will read from the file O.K., so I know that it's getting expanded properly. Since I posted the message, I've tried 'fopen(INFILE,"a")', "a+", "at", and "at+", all without the expected results. Using the debugger, and watching the HD lights, I can see that the fopen and fputs statements, as well as the fclose statement cause some disk activity, but nothing appears in the file after the data that's already there. Actually, the new data doesn't appear ANYwhere! Oh, and using the debugger, the outstring is what it should be. Messing with it tonight though, I notice that the file IS being appended - it's grown by 130+ bytes, although when I list it or look at it with an editor, none of my fresh input is there! Curioser && curioser by the minute! ...Jim There is 1 Reply. #: 8748 S3/Languages 15-Dec-90 08:13:46 Sb: #8744-#'C' problem Fm: Pete Lyall 76703,4230 To: Jim Peasley 72726,1153 (X) Jim - Let me see the ACTUAL code. Is it in TC? If yes, I can diddle with that, as I have an AT with TC 2.0 on it... Pete There is 1 Reply. #: 8754 S3/Languages 15-Dec-90 15:03:57 Sb: #8748-#'C' problem Fm: Jim Peasley 72726,1153 To: Pete Lyall 76703,4230 (X) O.K. Pete, I'll shoot you the code and a small data file in PKZIP format (since you're using TC) to DL10 in a bit. ...Jim There is 1 Reply. #: 8760 S3/Languages 15-Dec-90 19:17:09 Sb: #8754-#'C' problem Fm: Pete Lyall 76703,4230 To: Jim Peasley 72726,1153 (X) Jim - I dl'ed and compiled it, and ran it (on instinct anyway). I think you'll be in for a surprise... Your added data DID make it into the file. Two gotchas: 1) The original file had a PHYSICAL control Z at the end of the data. That means that does won't recognize any data beyond that point (I used a Unix 'vi' editor clone on the data file, which ignores CTRL Z, to find this out). DOS no longer requires a CTRL Z at the end of text files, so I'd remove it if I were you. 2) Your added records (your birthday?.. hmm - you're 4 years older than Marsha) had no EOL's on them. I also noted you had problems with 'system(CLS)'.... why not do it the direct way (under dos) and use 'clrscr()'. That should get you rolling, hopefully. If not, I only did about a 5 minute cursory scan, and may not have dug out all the nasties. Pete There are 3 Replies. #: 8782 S3/Languages 16-Dec-90 10:41:31 Sb: #8760-'C' problem Fm: Jim Peasley 72726,1153 To: Pete Lyall 76703,4230 (X) Thanks Pete, I'll peruse your msg. and get back later today. Got some Xmas parties to attend & some honey-dews. ...Jim #: 8786 S3/Languages 16-Dec-90 12:10:08 Sb: #8760-#'C' problem Fm: Jim Peasley 72726,1153 To: Pete Lyall 76703,4230 (X) Pete; 15 mims before we have to go, so... YES!! Never thought to use another editor to look at the file. Using 'WRITE' under W3.0 shows the CTL-Z. I see what you mean about the newlines, and have added one to the end of the string to be stored. However, after deleting the CTL-Z from the original file, another one seems to have crept back in. It's gotta be DOS that's doing this, as the file on my CoCo has NO control chars, and I simply PCDOSed it over. Have to think about this a bit and do some reading in the 4.01 manual to try and get around this. BTW, some reading this thread may wonder why I'm asking DOS type questions in this forum. My intent is to become familiar with and proficient enough with the 2 OS's that I can port programs to OS-9. I've got a wealth of DOS sourc available at work & it'd be a shame to let them 'go to waste' . Thanks again, ...Jim There are 3 Replies. #: 8787 S3/Languages 16-Dec-90 12:50:14 Sb: #8786-#'C' problem Fm: Pete Lyall 76703,4230 To: Jim Peasley 72726,1153 (X) Jim - Hmm - how are you creating the file? My autoexec.bat and config.sys files don't have CTRL Z's in them. Are you using 'copy con: filename.ext'? Are you using edlin? These might be culprits (dunno if EDLIN appends CTRL Z or not...I just tried it, and it does appear to, as you have to use a CTRL Z to get out of insert mode). Enjoy the parties... I have to go tree shopping later m'self. Pete P.S. Don't plan on getting anything significant done after the parties... There is 1 Reply. #: 8813 S3/Languages 18-Dec-90 00:38:40 Sb: #8787-#'C' problem Fm: Jim Peasley 72726,1153 To: Pete Lyall 76703,4230 (X) Pete; The original incarnation of the date file was PCDOS'd over from the CoCo, but I never thought to look at it for stray control chars. I don't _think_ that PCDOS is doing it, but haven't checked yet. If I remember the sequence correctly, the first attempt at appending the file using 'fputs' seems to work o.k. with subsequent appends being 'invisible'. This is definitely on my list of things to investigate, but it'll probably be after the holidays and the house gets put back together before I get back to it. (Having some foundation work done, and the downstairs is all torn apart!) Later, ...Jim There is 1 Reply. #: 8819 S3/Languages 18-Dec-90 08:55:25 Sb: #8813-'C' problem Fm: Pete Lyall 76703,4230 To: Jim Peasley 72726,1153 (X) JIm - Another possiblity is to use kermit to move the file between machines. It also handles the EOL conversions properly (when not in image [-i] mode). Pete #: 8791 S3/Languages 16-Dec-90 17:57:00 Sb: #8786-#'C' problem Fm: James Jones 76257,562 To: Jim Peasley 72726,1153 (X) I bet that this may be some remnant of MS-DOS's CP/M-like origins. Some utility or program on the PC side may well be padding with CTRL-Z. CP/M, which MS-DOS was written to sort of behave like, at least at first, couldn't tell how long files were other than the number of 128-byte sectors they contained, so the convention for text files came up of marking the end of the good stuff with a CTRL-Z character. Anything past that was junk remaining in the last 128-byte sector of the sort that CP/M disks used. There is 1 Reply. #: 8814 S3/Languages 18-Dec-90 00:38:45 Sb: #8791-'C' problem Fm: Jim Peasley 72726,1153 To: James Jones 76257,562 (X) JJ; I think you're right on here... what had me scratching my head was the fact that I could step through the code and "see" the fopen and fputs lines being executed and the corresponding disk activity, yet not see anything new in the file! I'm having a hard enough time getting up to speed without craziness like this! Anyway, fprintf seems to solve the problem for now, and I'll investigate further after the holidaze. Thanks, ...Jim #: 8800 S3/Languages 17-Dec-90 07:39:16 Sb: #8786-#'C' problem Fm: Mark B. Sheffield 76247,1332 To: Jim Peasley 72726,1153 (X) Jim - Be sure to check how the file was opened (translated mode or not). In translated mode, reads will stop when they encounter a ^Z. Similar wierdness happens when writing. There is a global variable that you can set to specify the default mode (translated or not). Check your compiler manual, give it a try, and let me know. Translated mode can cause all kinds of headaches, so I make sure to never use it (except when it sneaks up on me ;-) ) -mark There is 1 Reply. #: 8815 S3/Languages 18-Dec-90 00:38:51 Sb: #8800-#'C' problem Fm: Jim Peasley 72726,1153 To: Mark B. Sheffield 76247,1332 (X) Mark; Do you mean the "t"ext and "b"inary modifiers to the "a"ppend, "r"ead and "w"rite modes? as in "at+", "ab+", etc.? I tried all the append combinations with about the same results - no new data that was visible, although the file size grew with each attempt! This invisible EOF character thing has me intrigued. It's things like this that make me realize just how nice OS-9 is!! BTW, I'm waiting by the front door with my screwdriver in hand! ...Jim There is 1 Reply. #: 8828 S3/Languages 19-Dec-90 08:13:02 Sb: #8815-'C' problem Fm: Mark B. Sheffield 76247,1332 To: Jim Peasley 72726,1153 (X) Jim - Yes. In addition to opening a file +t for text mode, you can open it +b for binary. In MSC 5.0/5.1 the default mode is t. Sooo, it will default to text mode. You have two choices: set the extern global _fmode to O_BINARY ("b"), I think; OR fopen the file +b. Give this a try and let me konw how it works. And BTW, keep your screwdriver ready! -mark #: 8811 S3/Languages 17-Dec-90 23:38:12 Sb: #8760-#'C' problem Fm: Jim Peasley 72726,1153 To: Pete Lyall 76703,4230 (X) Pete; Finally got the results that I was looking for by using "fprintf". Still don't know how those control ciars snuck in there when using "fputs". On another subject, have you ever investigated those C function libraries (order now and we'll throw in the source code for only $19.95!) that you see advertised in the back of the computer mags, or in the card packs that seem to find their way to your mailbox after subscribing to almost any DOS mag? For someone in my position - ie. 'greenhorn' - having libs of common functions such as get_date(), get_phone(), or get_ssn() would save lots of time, but on the other hand, I probably wouldn't learn anything. Any experience with them? Maybe it'd be a good idea for someone to collect and AR them (I'll volunteer) if anyone has any good generic routines they'd like to share. C'mon back? ..Jim There is 1 Reply. #: 8818 S3/Languages 18-Dec-90 08:53:16 Sb: #8811-'C' problem Fm: Pete Lyall 76703,4230 To: Jim Peasley 72726,1153 (X) Jim - I wouldn't say that you wouldn't learn anything - on the contrary... looking at someone else's (good) code is often the best tutorial there is. Don't forget that DOS mechanisms for getting date and such will be different than in os9. The best tool for sharpening your C skills is a flat nose.. the one you get from falling on your face from trying, and retrying to get code to compile and work. Take it from someone who took years to break the C-phobia (83-86). There is just no substitute for writing volumes of code. Pete #: 8642 S3/Languages 08-Dec-90 13:31:34 Sb: #8639-#'C' problem Fm: Pete Lyall 76703,4230 To: Jim Peasley 72726,1153 (X) Jim - I saw Bruce's answer - that's the crux of the problem. Strcat assumes that the string is already null terminated (that's how it knows where to append whatever it's appending). Memcpy() is useful for raw bytes (i.e. like copying whole structures).... strncpy or strcpy are usually fine for characters. Also, with mem???(), I believe there's a possibility of a byte order problem if you move between CPU families. I'm not sure of that though... Anyway, given your situation, here's how I might approach it: ** the year, and have passed it to the function. */ print_record(recptr, year) char *record; int year; { char date[6], name[32]; char *evptr; date[0] = '\0'; /* just to be sure... */ name[0] = '\0'; /* that they're empty */ strncpy(date, recptr, 5); /* get MM/YY */ date[6] = '\0'; /* null terminate it */ evptr = strchr(recptr, '*'); /* find the delimiter */ if(evptr == NULL) { fprintf(stderr,"No delimiter found in record '%s'\n", recptr); return(-1); /* return error to caller */ } /* This will do 2 things: a) Terminate the name field ** and b) bump evptr so that it points to the event. */ *evptr++ = 0; strncpy(name, recptr+8, 31); /* copy upto 31 chars */ name[31] = '\0'; /* just in case we truncated name */ printf("Date: %s Name: %s Event: %s\n", date, name, evptr); } ================================================================= Pete P.S. I enjoy the questions There is 1 Reply. #: 8650 S3/Languages 08-Dec-90 15:44:46 Sb: #8642-#'C' problem Fm: Jim Peasley 72726,1153 To: Pete Lyall 76703,4230 (X) Pete; > P.S. I enjoy the questions > You don't know how happy that makes me! Having a place to ask inane questions is a _real_ security blanket. Hope your patience is in good supply; I start a M68000 assembler course at the local JC in January! ;-) Are you up and running with the MM/1 yet? ...Jim There is 1 Reply. #: 8656 S3/Languages 09-Dec-90 12:22:07 Sb: #8650-#'C' problem Fm: Pete Lyall 76703,4230 To: Jim Peasley 72726,1153 (X) Jim - Well, we'll be going through it together.. though not at school. I'm taking compiler writing and calculus this semester... I have just taught myself (more accurate: am still teaching myself) 8086/80286 ASM, at least to the point where I can disassemble code, change it, and reassemble to get it to do what I want. I haven't yet learned 68K ASM, but will be shortly. It looks a LOT easier than *86 low level stuff. Nope - I still don't have an MM/1. Sore subject. Pete There is 1 Reply. #: 8682 S3/Languages 11-Dec-90 23:32:29 Sb: #8656-#'C' problem Fm: Jim Peasley 72726,1153 To: Pete Lyall 76703,4230 (X) Pete; re:learning M68000 asm. A lot of us will probably be dipping in to the font of knowledge just after the first of the year. Good to know we'll have company! Hope my MM/1 comes in time to use it for homework assignments. Do you know if the supplied S/W includes an assembler? ...Jim There are 2 Replies. #: 8686 S3/Languages 12-Dec-90 08:54:03 Sb: #8682-'C' problem Fm: Pete Lyall 76703,4230 To: Jim Peasley 72726,1153 (X) I believe that the equivalent of RMA will be included in the package. Pete #: 8689 S3/Languages 12-Dec-90 09:46:24 Sb: #8682-'C' problem Fm: Paul K. Ward 73477,2004 To: Jim Peasley 72726,1153 (X) Jim, Assember is included as the back end of the Microware C compiler. Paul #: 8643 S3/Languages 08-Dec-90 13:37:45 Sb: #8639-#'C' problem Fm: James Jones 76257,562 To: Jim Peasley 72726,1153 (X) memcpy(), unlike strcpy(), doesn't null-terminate the destination. strcat() wants pointers as arguments, so you needed strcat(whatever, ""), but...strcat itself looks for a null terminator to know where to start copying, so you can't use it to force null termination. (Sort of a catch-NUL. :-) There is 1 Reply. #: 8651 S3/Languages 08-Dec-90 15:44:49 Sb: #8643-'C' problem Fm: Jim Peasley 72726,1153 To: James Jones 76257,562 (X) JJ; I'm beginning to 'C' the light! Hallelujah!! What worries me even more, is I'm going over my first struggling attempts and making the code more terse. AAaargh! (first pgms. were written ala PL/I - one evaluation per line) ...Jim #: 8588 S3/Languages 04-Dec-90 08:40:01 Sb: 'C' problem Fm: Pete Lyall 76703,4230 To: Jim Peasley 72726,1153 (X) Yep - it's like that for a bit. Your feet look like swiss cheese after you've shot yourself there a few hundred times. Learning C is worth the anguish though. You'll be happy you invested the time later. Keep chugging, and as always, free advice is only a modem-call away. Pete #: 8584 S3/Languages 04-Dec-90 05:51:37 Sb: help on shell Fm: Kevin Darling (UG Pres) 76703,4227 To: MAS 76336,3226 (X) Robert - that is a little strange. But is it just that you don't see a BS take effect right away? The login shell is doing a ReadLn, and so nothing will happen until a CR is sent over. Also, I don't think pipes send signals on ^C or ^E. Can you give us a short piece of the code that the main app is using to send down the pipe to the login shell? best - kev #: 8600 S3/Languages 04-Dec-90 20:55:54 Sb: #login shell tst prg Fm: MAS 76336,3226 To: 76703,4230 (X) PART 1 OF TEST PROGRAM ************************************************************************* Here is a sample test program! Plese see "#### WRITE 3 ####": BS is not recognized by the login shell. ************************************************************************* /* os9exec() login and piping */ #include #include #include extern int errno; extern char **environ; extern int os9fork(); main() { int i; int c[2], std[3], pid, ret; char buffer[2]; char *argblk[2]; char bs[2]; bs[0] = (char) 8; argblk[0] = "/h0/cmds/login"; argblk[1] = 0; if ((c[0] = open("/pipe",S_IREAD|S_IWRITE)) == -1) { printf("Unable to open() read pipe : #%d\n",errno); exit(0); } if ((c[1] = open("/pipe",S_IREAD|S_IWRITE)) == -1) { printf("Unable to open() write pipe : #%d\n",errno); exit(0); } std[0] = dup(0); std[1] = dup(1); std[2] = dup(2); close(0); dup(c[0]); close(1); dup(c[1]); close(2); dup(c[1]); pid = os9exec(os9fork,argblk[0],argblk,environ,0,0,3); close(0); dup(std[0]); close(std[0]); close(1); dup(std[1]); close(std[1]); close(2); dup(std[2]); close(std[2]); if (pid == -1) { printf("\n*** Can't os9exec() ***\n"); exit(0); } for(i=0;i<5;i++) /* read from login pipe till pipe is empty */ { for(;;) { ret = getstat(1,c[1]); if (ret > 0) { read(c[1],buffer,1); printf("SHELL OUTPUT CHR> %c : %x 0) { read(c[1],buffer,1); printf("SHELL OUTPUT CHR> %c : %x 0) { read(c[1],buffer,1); printf("SHELL OUTPUT CHR> %c : %x d\\n ...\n"); for(i=0;i<5;i++) /* read from login pipe till pipe is empty */ { for(;;) { ret = getstat(1,c[1]); if (ret > 0) { read(c[1],buffer,1); printf("SHELL OUTPUT CHR> %c : %x 0) { read(c[1],buffer,1); printf("SHELL OUTPUT CHR> %c : %x #include #include extern int errno; extern char **environ; extern int os9fork(); main() { int i; int c[2], std[3], pid, ret; char buffer[2]; char *argblk[2]; char bs[2]; bs[0] = (char) 8; argblk[0] = "/h0/cmds/login"; argblk[1] = 0; if ((c[0] = open("/pipe",S_IREAD|S_IWRITE)) == -1) { printf("Unable to open() read pipe : #%d\n",errno); exit(0); } if ((c[1] = open("/pipe",S_IREAD|S_IWRITE)) == -1) { printf("Unable to open() write pipe : #%d\n",errno); exit(0); } std[0] = dup(0); std[1] = dup(1); std[2] = dup(2); close(0); dup(c[0]); close(1); dup(c[1]); close(2); dup(c[1]); pid = os9exec(os9fork,argblk[0],argblk,environ,0,0,3); close(0); dup(std[0]); close(std[0]); close(1); dup(std[1]); close(std[1]); close(2); dup(std[2]); close(std[2]); if (pid == -1) { printf("\n*** Can't os9exec() ***\n"); exit(0); } for(i=0;i<5;i++) /* read from login pipe till pipe is empty */ { for(;;) { ret = getstat(1,c[1]); if (ret > 0) { read(c[1],buffer,1); printf("SHELL OUTPUT CHR> %c : %x 0) { read(c[1],buffer,1); printf("SHELL OUTPUT CHR> %c : %x 0) { read(c[1],buffer,1); printf("SHELL OUTPUT CHR> %c : %x d\\n ...\n"); for(i=0;i<5;i++) /* read from login pipe till pipe is empty */ { for(;;) { ret = getstat(1,c[1]); if (ret > 0) { read(c[1],buffer,1); printf("SHELL OUTPUT CHR> %c : %x 0) { read(c[1],buffer,1); printf("SHELL OUTPUT CHR> %c : %x key=0; /* init root node contents */ root_ptr->lp=NULL; root_ptr->rp=NULL; I'm not sure why the example code I looked at casts the pointer returned by malloc as it did but I figure at least it provides more documentation as to what is doing on. It also ocurred to me that if pointer arithmetic is used the compiler needs to know how big the pointed to object is. Am I correct in my assumption or is there more to this? How do I reference the fields in the second node? This fails at execution time and I think I see why: node_ptr->lp->lp=NULL; This fails at compile time but I'm not sure what to try next. (*(node_ptr->lp))->lp=NULL; Suggestions? Any books that cover this sort of thing that anyone can recommend? Thanks, -J There are 2 Replies. #: 8675 S3/Languages 11-Dec-90 00:29:36 Sb: #8674-Dynamic Structure Alloc Fm: Pete Lyall 76703,4230 To: Jay Truesdale 72176,3565 (X) Jay - First of all, great questions! Now lets see if I can answer them.... The statement where you do root_ptr = (struct b_tree_rec *) malloc(sizeof(node)); . root_ptr is declared to be of type 'struct b_tree_rec *' above... malloc is of type 'char *'. Since a pointer to a char is a different animal than a pointer to a 'struct b_tree_rec' (NOTE: pointer math and size of objects was right on ethe money), then we must 'cast' or 'coerce' the source type to produce the same type as expected by the receiving variable, in this case rec_ptr. Some compilers will blow you out if you try to assign different types, and some are very lax. On the getting to the second node, I believe it'd be something like this: node_ptr = (struct b_tree_rec *) malloc(sizeof(node)); ... error checking ... ... allocation and linking of subsequent notes .... /* get at left node and determine the key */ curr_node = root_ptr->lp; curr_key = curr_node->key; Hope that helps.... Pete #: 8700 S3/Languages 12-Dec-90 21:42:10 Sb: #8674-#Dynamic Structure Alloc Fm: Jay Truesdale 72176,3565 To: Jay Truesdale 72176,3565 (X) Pete: Thanks for the confirmation about why I need to worry about what the pointer points to (pointer math) and why I need to cast the pointer returned by malloc. I think that I have to do the same cast for the same reasons to do what I really want to do, reference down the tree. If I want to get the key value contained in the left node while "at" the root node then (root_ptr->lp) references the pointer field in the root node which contains a pointer to the next node. I want to dereference this to get what this points to (the next node). The pointer contained in this field is of type b_tree_rec so I need to cast the de-reference operation to the proper type??? I then can use the -> operator to retrieve the contents to the next node like this: ((struct b_tree_rec *)(root_ptr->lp))->key This appears to work as my short test program gets the results I expected. I'm not sure why I need to cast the de-reference operation as I declared the "lp" field as being a pointer to type b_tree_rec in the structure template definition right before main. Thanks in advance, -J There is 1 Reply. #: 8708 S3/Languages 13-Dec-90 09:05:57 Sb: #8700-#Dynamic Structure Alloc Fm: Pete Lyall 76703,4230 To: Jay Truesdale 72176,3565 (X) Jay - I'm not sure why you have to cast that second dereferenced pointer either.. should be implicit because of the declaration. If you DON'T, does it break? I recall before that you were doing root_ptr->lp->key, or something like that. It may be a precedence thing, where you need to cluster the binding that way you want it (i.e. (root_ptr->lp)->key. Maybe that'll let you avoid the cast? Pete There is 1 Reply. #: 8761 S3/Languages 15-Dec-90 19:41:52 Sb: #8708-#Dynamic Structure Alloc Fm: Jay Truesdale 72176,3565 To: Pete Lyall 76703,4230 (X) Pete: If I use "node_ptr->rp" then this 'is' a member of the pointed to structure, this is probably why "node_ptr->rp->rp" failed, isn't any way to get to there from here! 'rp' is a pointer to type b_tree_rec. To get the 'next' item in my B-Tree I need to use the indirection operator to get to where "node_ptr->rp" points to. If I use *(node_ptr->rp) I get an error #102 bus trap error so I assume that I'm referencing an area in the memory map that has nothing there. I may try using this as an argument to printf in hex format to try and figure out what's going on. If I use (*)(node_ptr->rp) I get a bunch of compile errors: "btree.c", line 169: **** primary expected **** print_tree( (*)(node_ptr->rp) ); ^ "btree.c", line 169: **** expression missing **** print_tree( (*)(node_ptr->rp) ); ^ "btree.c", line 169: **** not a function **** print_tree( (*)(node_ptr->rp) ); ^ errors in compilation : 3 If I cast the pointer like this "(struct b_tree_rec *)(node_ptr->rp)" it both compiles and works. Guess I'll go do some more reading and experimenting and see if I can figure this one out. (Maybe I should have purchased that "Data Structures in C" book I saw last week...) -J There are 2 Replies. #: 8784 S3/Languages 16-Dec-90 12:01:30 Sb: #8761-Dynamic Structure Alloc Fm: Pete Lyall 76703,4230 To: Jay Truesdale 72176,3565 (X) Jay - Well, in that case (as always), empirical proof is more solid that theoretical conjecture (grin)! In other words, go with what works. Pete #: 8827 S3/Languages 19-Dec-90 08:07:29 Sb: #8761-Dynamic Structure Alloc Fm: Bill Dickhaus 70325,523 To: Jay Truesdale 72176,3565 (X) Jay, What should work is: (node_ptr->rp)->rp If rp is defined as a pointer to the structure, then you shouldn't have to cast the "(node_ptr->rp)" part. The trick here is the parentheses not the cast, I think. I use this all the time with OS9 LII without any problems. Bill #: 8702 S3/Languages 13-Dec-90 03:46:49 Sb: #C and buffers Fm: Dan Charrois 70721,1506 To: all I have a question about buffers and C that has no doubt been asked before, and I apologize for that. But anyways, given the following code: main() { printf("First line"); sleep(1); Circle(1,100); sleep(1); } Why does the system sleep for 1 Second, draw the Circle, sleep another second, and THEN print "First line" right before exiting? I gather that it must have something to do with buffered output since if I tack a \n after 'line' things work as expected, but how can I get the code above to work the way it would intuitively seem to? I noticed that I could use write and it worked alright (perhaps), except I still wouldn't know how to print formatted output this way. I'd appreciate hearing from anyone who has even the slightest idea on what exactly is going on. Dan There are 2 Replies. #: 8705 S3/Languages 13-Dec-90 06:29:18 Sb: #8702-#C and buffers Fm: James Jones 76257,562 To: Dan Charrois 70721,1506 (X) That's exactly what it has to do with. You can get it to do what you want also by inserting the line "fflush(stdout);" before the first sleep call. There is 1 Reply. #: 8717 S3/Languages 13-Dec-90 13:54:28 Sb: #8705-C and buffers Fm: Dan Charrois 70721,1506 To: James Jones 76257,562 (X) Thanks, James. I'll give that a try.. Seems to make sense, though I don't think I would have thought of that approach. #: 8709 S3/Languages 13-Dec-90 09:09:16 Sb: #8702-#C and buffers Fm: Pete Lyall 76703,4230 To: Dan Charrois 70721,1506 (X) Dan - If you want to avoid the "\n", try tacking an: fflush(stdout); This tells the buffering logic to toss the buffer contents even though an end of line (typical flag for dumping the buffer) hasn't been seen. If you don't mind losing the speed advantage of buffereing, you could just unbuffer the stream by: setbuf(stdout, NULL); Pete There is 1 Reply. #: 8718 S3/Languages 13-Dec-90 13:56:23 Sb: #8709-C and buffers Fm: Dan Charrois 70721,1506 To: Pete Lyall 76703,4230 (X) Thanks Pete. The speed isn't too important really, so I think I'll try the setbuf() approach first instead of using fflush() all the time. #: 8756 S3/Languages 15-Dec-90 17:22:45 Sb: #FORTRAN available? Fm: Mike Passer 72750,420 To: All Hello! Does anyone out there know the whereabouts of a FORTRAN compiler for OS9 Level II on the Color Computer? If anyone has even half a lead, please let me know! Thanks, Mike Passer There are 2 Replies. #: 8763 S3/Languages 15-Dec-90 19:53:00 Sb: #8756-FORTRAN available? Fm: Kevin Darling (UG Pres) 76703,4227 To: Mike Passer 72750,420 (X) Mike - call MW at 515-224-1929.... I met someone last year who bought the FORTRAN package from them, and uses it on his CoCo-3. I believe it was around $300 (?). - kev #: 8765 S3/Languages 15-Dec-90 20:17:51 Sb: #8756-#FORTRAN available? Fm: Mike Passer 72750,420 To: Mike Passer 72750,420 (X) Kevin, $300! Gasp! Choke! I thought the MW version might have come down just a little - $100, I'm afraid, is about my limit. However, thanks for the suggestion, and I will give them a call, though I've heard that they no longer sell the 6809 compilers. Thanks! Mike There is 1 Reply. #: 8767 S3/Languages 15-Dec-90 21:06:24 Sb: #8765-#FORTRAN available? Fm: Kevin Darling (UG Pres) 76703,4227 To: Mike Passer 72750,420 (X) Mike - remember that Basic09 was $250 before Tandy bought enough to bring the price down . Perhaps the FORTRAN price will drop a bit in the future. There is 1 Reply. #: 8770 S3/Languages 15-Dec-90 21:56:15 Sb: #8767-#FORTRAN available? Fm: Mike Passer 72750,420 To: Kevin Darling (UG Pres) 76703,4227 (X) Kevin, And now they're going for $10.00 at Radio Shack bargain tables! Too bad Tandy never decided to market FORTRAN for the Coco! :> I was actually hoping that someone out there in OS9 land had a dormant license that he was willing to sell me, but, I guess if it were that dormant, they wouldn't be looking _here_. I've heard about a small FORTRAN source for Unix, but don't know where on earth to start looking for it (besides the Unix and Computer Language Forums). I have the MW C compiler (still waiting for Radio Shack to mail me my cc2 and one pass compiler modules :>) and could give the old college try at porting it over (no, I don't value my sanity). On another subject, after reading the OS9 technical information section in the Level II manual, I wondered if there might be a modified system out there somewhere that does something besides print the "FAILED" message when system startup doesn't go as planned--maybe a hex code saying how far along it was, or something along those lines? Also, it says that the kernel initializes the system, inolving "Loading any required modules that were not loaded from the OS-9 Boot file." Does this mean that I could theoretically break up my boot and put the files in the execution directory (I know this is not a good idea - 8k blocks) and that OS9 would load them for me? Is this what happens with grfdrv, and, if so, why can't it go into OS9Boot? (If you hung on through this much rambling, take a break!) Ths again! Mike There is 1 Reply. #: 8771 S3/Languages 15-Dec-90 22:13:00 Sb: #8770-#FORTRAN available? Fm: Kevin Darling (UG Pres) 76703,4227 To: Mike Passer 72750,420 (X) In the upgrade, we modified REL so that it printed a number to tell how far you'd gotten (eg: BOOT FAILED #9 = no shell). That meant of course that we also had to modify os9p1, os9p2, sysgo, and perhaps one or two others to set an error byte before calling the D.Crash vector. So it's not an easy patch. You're right.. the system normally does not load any extra modules on boot. The exceptions are that CC3Go forks shell (which gets temporarily loaded), and CC3IO will load windint/grfint or vdgint, plus grfdrv. But none of those are the core kernel. The reason grfdrv can't go in the boot, is because it must sit alone in an 8K block.... it creates its own 64K "map" whenever it accesses the video memory and buffers. Actually, this isn't strictly true (it could straddle a coupla 8K blocks), altho the upgrade sure depends upon it. Umm, oh.. the important reason is because it's mapped out of the main system map, into its own map. Putting it into the boot would use up 8K of main system space (precious!) for no reason. Sorry, brain foggy ;-). kev There is 1 Reply. #: 8788 S3/Languages 16-Dec-90 14:47:06 Sb: #8771-FORTRAN available? Fm: Mike Passer 72750,420 To: Kevin Darling (UG Pres) 76703,4227 (X) Kev, Thanks for that info -- I don't quite have the distinction between system and user maps down yet, but I know that not having enough system memory can get you into trouble. Thus, the loading of grfdrv at the end of the boot make sense. Looking forward to seeing that upgrade someday. There's not too many things more frustrating that trying to figure out what caused that Boot Failed message (save Christmas shopping at the Crystal Mall in Waterford, CT or figure out what's really going on in the Gulf). Thanks, Mike #: 8809 S3/Languages 17-Dec-90 21:07:31 Sb: #malloc() problem Fm: Bob van der Poel 76510,2203 To: all Does anyone know of any problems with the malloc() C function. I'm finding that my data (saved in a malloc()ed buffer) is corrupted from time to time. I suspect a wild pointer in MY code, but I thought I'd check since I can't find the problem here. Also, I noticed that memory returned with free() does not seem to get reused unless the request size is identical to the original. Is there a fix for this? Or does it clear up when there is no more easy memory available? BTW, this question concerns the 6809 C compiler using the Krieder library, but since I hope to port the code to 68K any comments in that area will also be appreciated. There is 1 Reply. #: 8810 S3/Languages 17-Dec-90 22:22:05 Sb: #8809-malloc() problem Fm: Pete Lyall 76703,4230 To: Bob van der Poel 76510,2203 (X) If you're using Carl's malloc(), it's supposed to be clean... Pete #: 8892 S3/Languages 25-Dec-90 15:55:01 Sb: Pascal Fm: Paul Rinear 73757,1413 To: Anyone Greetings, I'm trying to use the OS9 Pascal package. With PASCAL in memory, and also in CMDS, and with a Pascal source code file in the working directory, typing PASCAL < filename #20k returns Error #244. Can you help me get started? Paul R. #: 8996 S3/Languages 01-Jan-91 23:55:16 Sb: #'C' help Fm: Jim Peasley 72726,1153 To: all Can anybody point me to some example code that uses the "tm" structure on pg. 31 of the Kreider lib docs?? I'm trying to implement a date routine and it looks as thohgh the LOCALTIME function in utime.h is what I'm after. Thanks, ...Jim There is 1 Reply. #: 8998 S3/Languages 02-Jan-91 13:18:00 Sb: #8996-#'C' help Fm: Tom Napolitano 70215,1130 To: Jim Peasley 72726,1153 (X) Jim, Your timing is perfect. For a use of localtime(), check out swave.ar in library 6. I used it in all three programs therein. Also, be sure to grab the latest of Carl's library uploads (December 1990). He fixed the utime function; the old version caused my programs to be off by a month. (Missing a month sometimes causes people problems). (Sorry about that). tom n There is 1 Reply. #: 9010 S3/Languages 03-Jan-91 23:44:58 Sb: #8998-'C' help Fm: Jim Peasley 72726,1153 To: Tom Napolitano 70215,1130 (X) Ahhh... Thanks, Tom! That was just what I needed!! Guess I'll have to re-DL the CLIBs again -- my version is dated 8/88. ...Jim #: 9018 S3/Languages 04-Jan-91 21:31:42 Sb: #Not a hot topic Fm: Paul Rinear 73757,1413 To: Anyone At the risk of being rude: has anyone printed out the Kreider C library docs from clibdo.ar ? I can't find the mroff that is said to be in there. The source code is there, but there seem to be pieces missing that are needed to compile it. Bet nobody replies to this.... There are 2 Replies. #: 9019 S3/Languages 04-Jan-91 22:04:23 Sb: #9018-Not a hot topic Fm: Pete Lyall 76703,4230 To: Paul Rinear 73757,1413 (X) Lot's of us have... in fact I did some camera ready stuff a few years back, and distributed it to those interested. Before you ask, I no longer have it. Re: mroff - what's wrong/missing? Mroff is supposed to be here in either DL9 or DL6. Worst case, someone could shoot you a binary of it (I'm no longer running a 6809, or I would). Pete P.S. Not sure I understand your "bet nobody replies to this"... Actually, that was the only 'rude' part of your message. We pride ourselves on being responsive and accurate here. You'll find you'll get lots of help without resorting to reverse psychology. #: 9020 S3/Languages 04-Jan-91 22:07:17 Sb: #9018-#Not a hot topic Fm: Pete Lyall 76703,4230 To: Paul Rinear 73757,1413 (X) Did you do a "BRO mroff*" in DL6? There you'll find two files: Mroff.ar and Mroff2.ar. The latter is only executable and documentation, if that's all you need. Pete There is 1 Reply. #: 9044 S3/Languages 06-Jan-91 17:12:40 Sb: #9020-#Not a hot topic Fm: Paul Rinear 73757,1413 To: Pete Lyall 76703,4230 (X) Thanks, and sorry for being rude It was one of those days. There is 1 Reply. #: 9047 S3/Languages 06-Jan-91 18:09:22 Sb: #9044-Not a hot topic Fm: Pete Lyall 76703,4230 To: Paul Rinear 73757,1413 (X) No problem. #: 9043 S3/Languages 06-Jan-91 16:34:41 Sb: #'C' help Fm: Jim Peasley 72726,1153 To: All Got a question and I don't know whether it's related to the way OS-9 does redirection, or whether it's related to 'C'. Any input welcome! I'm developing a 'C' program that uses cursor positioning calls, and running it from the active window, it works just fine. However, when redirecting it to another window, even before starting a shell on the non-active window, the cursor positioning code seems to generate a LF rather than aligning the text in the proper column... i.e. all the text that is supposed to be tabular is at the left side of the screen! I'm using Bruce's window descriptors (they're all the same) and it exhibits the same behavior whether the window is hardware or gfx, type 07 or type 02. Anybody know what's going on here? Thanks, ...Jim There are 3 Replies. #: 9045 S3/Languages 06-Jan-91 18:07:16 Sb: #9043-#'C' help Fm: James Jones 76257,562 To: Jim Peasley 72726,1153 (X) Hmmm...sounds like somehow you're emitting a CR there, and if that is done using I$Writeln instead of I$Write, and the path descriptor has the option set to cause CRs to be followed by LFs, then that could happen. Could you post a code fragment to show what is happening? (Don't forget the SU (save unformatted) when you do that.) There is 1 Reply. #: 9057 S3/Languages 08-Jan-91 00:31:56 Sb: #9045-#'C' help Fm: Jim Peasley 72726,1153 To: James Jones 76257,562 (X) JJ; Originally, I had a \n after printing the date and name strings due to the difference in the way DOS and OS-9 handle flushing the buffer. With the newline, all the data is positioned at the left side of the screen -- only when redirecting. I have since added a fflush(stdout); statement after the name and date, and again, in an active window, things work fine, but redirecting causes the cursor positioning to get "eaten" and the following data is positioned right after the name string. -------- code fragment from pgm. ---------- #define CURSOR pos_cur ... ... CURSOR(1,curline); printf("%s %s",date,name); fflush(stdout); if (span > 0) { CURSOR(45,curline); printf("%2d%s %s\n",span,suff,eptr); } else { CURSOR(50,curline); printf("%s\n",eptr); } Any ideas on why redirecting stdout would cause cursor positioning to be hosed? ...Jim There is 1 Reply. #: 9060 S3/Languages 08-Jan-91 05:36:01 Sb: #9057-#'C' help Fm: James Jones 76257,562 To: Jim Peasley 72726,1153 (X) No, I can't think of any reason for redirection would do that. I lack experience with doing window-related stuff, so about all I can say is that folks have had trouble, or said they've had trouble, with situations in which they have emitted escape sequences containing CR because for some reason (if they use C standard I/O, it will happen for SCF devices) I$Writeln is used to write the data instead of I$Write, because in that case they got an extra LF. If that is what is happening to you, then the only solution I know of is to set the _RBF bit in the _flags field in the FILE structure that you're using before you do any output, since that will force it to use I$Write. This, unfortunately, also means that you'll have to explicitly emit LFs after CRs that you want to have LFs following, since SCF doesn't distinguish between CR as part of an escape sequence and other CRs (which is kind of a shame). There is 1 Reply. #: 9068 S3/Languages 08-Jan-91 22:07:36 Sb: #9060-'C' help Fm: Jim Peasley 72726,1153 To: James Jones 76257,562 (X) JJ; I guess your reply means that I'll have to go and read the manual, eh? (RTFM, if I remember my acronyms correctly ;-) ) Seriously, I'll reference your msg. while looking thru tee manual and see if I can dope out a solution. ...Jim #: 9046 S3/Languages 06-Jan-91 18:08:35 Sb: #9043-#'C' help Fm: Pete Lyall 76703,4230 To: Jim Peasley 72726,1153 (X) Jim - Shouldn't be C, because C doesn't evem know about I/O (technically).. Anything differen't in the descriptors? Also - do you have the CC3io patch in place? Pete There are 2 Replies. #: 9058 S3/Languages 08-Jan-91 00:32:05 Sb: #9046-#'C' help Fm: Jim Peasley 72726,1153 To: Pete Lyall 76703,4230 (X) Pete; All the /w descriptors are dittos. And CC3io? I _think_ that I've patched it... I usually follow patches pretty closely. (This is one of my New Year's resolutions -- to *accurately* LOG all system changes on the MM/1!) See previous msg. to JJ for code fragment and more info. re: portability Not _too_ bad, if you start with it in mind, but somewhat of a pain. I've gotten the program to run on both machines, but there's just one more thing (isn't there always?) that I'd like to change. Taking a note from your 'more' program, I'm using "read(1,keyin,1);" where "keyin[1]" to get a user response without having to press . Under DOS, I've tried "read(stdin,keyin,1);" which the manual says SHOULD work, but alas, the value returned is "\5" rather that the "y" or "n" I'm expecting. What is different about the DOS version of "read"? Any ideas? I'd kindaolike to use the same function for both versions if I could. ...Jim There are 2 Replies. #: 9061 S3/Languages 08-Jan-91 05:37:24 Sb: #9058-#'C' help Fm: James Jones 76257,562 To: Jim Peasley 72726,1153 (X) I'd be very surprised if that worked. read() wants a path number (or a "file handle" in MS-DOSese). stdin is a FILE *, and goodness knows how it will be interpreted when handed to a function wanting a path number. There are 2 Replies. #: 9069 S3/Languages 08-Jan-91 22:07:39 Sb: #9061-#'C' help Fm: Jim Peasley 72726,1153 To: James Jones 76257,562 (X) JJ; Yep, I had this pointed out to me today by another 'greenhorn'. We tried it, but still it didn't work as the OS-9 version dsd -- required hitting to accept the keystroke. ...Jim There is 1 Reply. #: 9071 S3/Languages 08-Jan-91 22:47:09 Sb: #9069-'C' help Fm: James Jones 76257,562 To: Jim Peasley 72726,1153 (X) OK...that has to do with input, rather than output. Unless you do something to make C standard I/O do otherwise, like turn off buffering or set the _RBF flag, it will use I$ReadLn on SCF paths open for input to read data. That accumulates data until it either runs out of buffer or it reads a CR (well, the EOL character for the path, but that's usually CR). #: 9081 S3/Languages 10-Jan-91 23:21:04 Sb: #9061-#'C' help Fm: Jim Peasley 72726,1153 To: James Jones 76257,562 (X) JJ; RE: your Internet message about SIMM memory What did you have to pay for the 1Meg. SIMMS? Fry's had them about a month ago for $37.50 for 1x8's and $39.50 for 1x9's and I passed them up thinking they'd go down even more.... Now they're up to $44.50 for the 1x8's. Judging from the trade rags that I get to read at work, it looks like the 4Meg. SIMM production is being ramped up both here and in Japan, and we can look for falling prices RSN. One report I saw estimated < $200 by mid-summer, but I wouldn't hold my breath given the current world situation. ...Jim There is 1 Reply. #: 9088 S3/Languages 11-Jan-91 06:53:24 Sb: #9081-#'C' help Fm: James Jones 76257,562 To: Jim Peasley 72726,1153 (X) I paid about $47 each for them, which looked pretty consistent with everything else in the issue of *Computer Shopper* I scanned. I *do* hope that you're right about the 4M SIMMs. 9 Mbytes in my MM/1 would be very nice. There is 1 Reply. #: 9100 S3/Languages 11-Jan-91 23:09:54 Sb: #9088-'C' help Fm: Jim Peasley 72726,1153 To: James Jones 76257,562 (X) JJ; > hope that you're right about the 4M SIMMs. 9 Mbytes in my MM/1 would be > very nice. Yeah, but how would you ike 128 Meg? The NewsClip forum I get these tidbits from mentions that they're (Fujitsu?) starting a pilot line for 64Meg chips with limited delivery schedules starting in 1992-93 time frame. Also mentioned frequently are unbelievable capacities for 2" floppies- in the order of > 10MB, and credit card sized removable RAM memories with like capacities. Some truly amazing things coming down the pipeline! ...Jim /exit s reply 9089 Paul; I just went through the same thing. You'll need to "make" a new version of MROFF - see my previous message to Pete. Hmmm, wonder if Mark would object if I uploaded the binary for the updated MROFF? Anybody? ...Jim #: 9063 S3/Languages 08-Jan-91 08:47:43 Sb: #9058-#'C' help Fm: Pete Lyall 76703,4230 To: Jim Peasley 72726,1153 (X) JIm - In DOS, best bet is getch(), which is a non-echoing single key read. Pete There are 2 Replies. #: 9070 S3/Languages 08-Jan-91 22:07:43 Sb: #9063-#'C' help Fm: Jim Peasley 72726,1153 To: Pete Lyall 76703,4230 (X) Pete; Hmmm.. I originally used getch() (or was it getc()? ), but the difference is that one returns an int and the other a *char. Maybe I'll try casting the result and see what happens. Wouldn't it be nice if all popular (and not so popular) systems had corresponding calls that worked alike?? ...Jim There is 1 Reply. #: 9074 S3/Languages 09-Jan-91 08:07:50 Sb: #9070-'C' help Fm: Pete Lyall 76703,4230 To: Jim Peasley 72726,1153 (X) Getch() returns an int, which is the same as char in C. Pete #: 9082 S3/Languages 10-Jan-91 23:21:13 Sb: #9063-'C' help Fm: Jim Peasley 72726,1153 To: Pete Lyall 76703,4230 (X) Pete; Thanks for all the input and advice... I got the program working on both systems to my satisfaction. For all those following the thread and wondering, the program I'm working on is a C version of my DATECK.B09 program in DL10. Tim Kientzle, I think, posted a message on the Net asking for such a program during a discussion of OSK software, and I though I'd try converting it as an excercise. If anyone would like to 'beta' test it, let me know and I'll mail you the code for your comments and input. The program, generally called from Startup, checks the next 30 days for significant events like birthdays, anniversaries, etc., and will let you search by month or name. This is a learning excercise for me, so any input on additional functions or bells/whistles is solicited. Program willrrun on both OS-9 systems and PC-DOS systems. I gave my boss a copy so he could track when performance reviews and appraisals are due. (brownie points?... Nahhh!) ...Jim #: 9059 S3/Languages 08-Jan-91 00:32:13 Sb: #9046-#'C' help Fm: Jim Peasley 72726,1153 To: Pete Lyall 76703,4230 (X) Pete; One more unrelated question if you please... my recent "C" class finished in the 'hurry-up' mode, and we didn't get to cover MAKE. I spent the better part of Sunday downloading the latest version of CLIB, CLIBT, and CLIBDOC between teenagers and line noise. Now I'd like to print out the MAN pages using MROFF, but ahe version I've got barfs on some of the added formatting codes, so I've got to re-compile the source in the CLIBDOC file. Could you give it a quick run through for me please? I've separately compiled the 4 .c sources using cc -r prgname.c and placed the output in a RELS directory which, if I'm interpreting MAKEFILE correctly is where they're supposed to be. Trying to run MAKEFILE though gives me an error #216g Where am I going wrong? Thanks, ...Jim There is 1 Reply. #: 9064 S3/Languages 08-Jan-91 08:53:33 Sb: #9059-#'C' help Fm: Pete Lyall 76703,4230 To: Jim Peasley 72726,1153 (X) Jim - Running make usually requires that the Makefile be named just that (in Unix the capital is significant - is os9 it's not). The make file is a list of depenancies, and the Make program recurses down the list. Ex: foo: part1.r part2.r foo.h part1.r: part2.r: This makefile pretty much uses all defaults. That is, the .r's are implicity built from .c's. It first looks at the target (foo), and then what makes it up. It then checks the constituent parts, and sees what makes THEM up. For now, forget a RELS dir, and just put all your .r files in the current dir. Also, delete any macro relating to OBJS or RELS in the makefile. Pete There are 2 Replies. #: 9067 S3/Languages 08-Jan-91 22:07:33 Sb: #9064-'C' help Fm: Jim Peasley 72726,1153 To: Pete Lyall 76703,4230 (X) Ahhh! Now I see the problem... I don't have the Make program!! Egads, and bosh! Will peruse the libs for same. ...Jim #: 9083 S3/Languages 10-Jan-91 23:21:18 Sb: #9064-#'C' help Fm: Jim Peasley 72726,1153 To: Pete Lyall 76703,4230 (X) Pete; Nabbed Tim K's MAKE and got MROFF compiled with no problems... maybe I'm getting the hang of this stuff, eh? The learning curve seems to be flattening out a bit. Also played around a bit with yours and Mark's man.c, and got an idea for the next project... integrating a 'more'-like util into 'man' and using an environment file for the input to man so that the libs don't have to be 'hard-coded'. (dreams of grandeur, tempened by inexperience!!) ...Jim There is 1 Reply. #: 9085 S3/Languages 11-Jan-91 00:41:18 Sb: #9083-#'C' help Fm: Pete Lyall 76703,4230 To: Jim Peasley 72726,1153 (X) Jim - Already had a MAN with 'more' in it.... Didn't it surface? Durn - I have more code buried in the binary coffers around here.... Pete There is 1 Reply. #: 9099 S3/Languages 11-Jan-91 23:09:46 Sb: #9085-'C' help Fm: Jim Peasley 72726,1153 To: Pete Lyall 76703,4230 (X) Hmmm... dunno about an integrated version. I was talking about Mark's version that he included in CLIBDOC.AR which he had hacked for his system. That one does indeed have 'more' "in" it, but not integrated. ...Jim #: 9053 S3/Languages 07-Jan-91 06:47:48 Sb: #9043-#'C' help Fm: Bill Dickhaus 70325,523 To: Jim Peasley 72726,1153 (X) Jim, Are you using termcap, or just using the actual control codes? Bill There are 2 Replies. #: 9066 S3/Languages 08-Jan-91 21:35:14 Sb: #9053-'C' help Fm: Jim Peasley 72726,1153 To: Bill Dickhaus 70325,523 (X) Bill; I don know nuttin' about no stinkin' termcaps! ;-) I'm using the cursor positioning routine "pos_cur" that I found in screen.h. It works fine as long as I don't try to redirect output to another window. I can run the program from /w2 and things are as they should be, but if I to /w3 and redirect back to /w2, the cursor positioning gols to he** in a handbasket. See message #9057 for more details. ...Jim #: 9084 S3/Languages 10-Jan-91 23:21:27 Sb: #9053-'C' help Fm: Jim Peasley 72726,1153 To: Bill Dickhaus 70325,523 (X) Bill; Haven't gotten into the why's yet, but playing around with different ways of calling the program, if I call it like so - dateck <>>>/w2 , it works the way it's supposed to, but only redirecting stdout, messes up the cursor positioning. This prob is on my list of rainy day things to do, but after 5 rainless years, it may be a while! (that's a dry gryn) ...Jim #: 9103 S3/Languages 12-Jan-91 11:49:02 Sb: #9082-#'C' help Fm: Steve Wegert 76703,4255 To: Jim Peasley 72726,1153 (X) Jim, I use your Basic09 version regularly. I'd be happy to test your C version. Steve There is 1 Reply. #: 9118 S3/Languages 13-Jan-91 20:35:14 Sb: #9103-#'C' help Fm: Jim Peasley 72726,1153 To: Steve Wegert 76703,4255 (X) Steve; O.K., you got it. I'll upload it to DL10, I guess, marked for your use only. Since you're using the Basic09 version, it'll use the same file, so I'll just upload the source, as I know you've got the compiler also. Command line options are "+", "?", month N, or namestring. There's a bit of sanity checking for date input and I find that for annual recurring events such as Christmas which always fall on the same date, entering the year as "00" saves having to change it annually. Maybe someone reading this knows the rules for figuring when dates such as Thanksgiving, Easter, etc. fall -- I think I _used_ to know, but have forgotten. Might be an idea to incorporate some date calcs for such holidays in the program. While I've got you, if I wanted to send it to someone other tha a sysop, I'd have to use Email, but not having done it before, I'm not sure of the procedure... do I just type UPL at the compose message prompt? Will this work for binaries also? And what's the maxsize? ...Jim There is 1 Reply. #: 9129 S3/Languages 14-Jan-91 08:28:09 Sb: #9118-#'C' help Fm: Steve Wegert 76703,4255 To: Jim Peasley 72726,1153 (X) Jim, Thanks for the file. I see the gents here have flagged it for me. I'll nab it directly and give it a work out. Regarding the use of CompuServe mail via the forum ... It a lead pipe cinch. Create a message any way you're comfortable ... and jes, you can type UPL at the MESSAGE prompt and upload your efforts via protocol. Instead of SAVEing the message type MAIL and it will prmpt you for an address. Now ... a couple of cautions: Mailing via the forum may be limited to ASCII files only (Not sure .. I"ll have to check. Other limitations will make this a non-issue, however). You're limited to a 'message' length in file size ... apprx 2K. You'd be better served going to CompuServe Mail and uploading the the thing. Once it's uploaded, you have some neat options as 'send to multiple users' that may be helpful in a use like this. Over there ... the file size limits are more forgiving. On a text transfer it's 50,000 . Binaries can go up to 512,000. Help any? There is 1 Reply. #: 9148 S3/Languages 15-Jan-91 00:19:26 Sb: #9129-#'C' help Fm: Jim Peasley 72726,1153 To: Steve Wegert 76703,4255 (X) Steve; While you're playing with the program, I'm not sure how much 'C' experience you have, but I'd appreciate some feedback on my coding style - readability, commenting level, etc. I'm not too thrilled with the ANSI recommendation on style, and have tried to format the source to be as "readable" as possible; i.e. indentation levels, braces underneath one another, etc.. Also, input on use of #defines, macros, and function calls would be appreciated. 'C' isn't all that difficult if the original programmer wants to make his/her programs understandable, imho. That's what I'm striving for. ...Jim There is 1 Reply. #: 9154 S3/Languages 15-Jan-91 08:02:28 Sb: #9148-'C' help Fm: Steve Wegert 76703,4255 To: Jim Peasley 72726,1153 (X) How much C experience do I have ??? My usual level of expertise .... just enough to be dangerous! :-) Actually .. I'm working steadily at understanding C code. Sounds as if your programming goals should make this a snap. Steve #: 9208 S3/Languages 20-Jan-91 11:13:23 Sb: #9103-#'C' help Fm: Steve Wegert 76703,4255 To: [F] Jim 72726,1153 (X) Jim, I've had a quick chance to play with the C version of dateck and have run up against some concerns with what I'm sure you've considered as improvements. Having to go hunting for screen.h tipped me off to some impending problems. Looks like you're supporting CoCo specific screen control. Doesn't look veddy pretty on my Wyse 50. :-) The BASIC09 version was a straight ASCII version ... jes? Also ... it looks as if you've limited it's use to a single dates.file. I have my system set up for dial up use and support a hand full of users... some of which maintain their own dates.file. Any chance of changing that back? Would make multi-user life better. Steve There is 1 Reply. #: 9244 S3/Languages 22-Jan-91 23:01:49 Sb: #9208-#'C' help Fm: Jim Peasley 72726,1153 To: Steve Wegert 76703,4255 (X) Steve; re: Multi-users Did you modify the original B09 source to allow multiple users? I just checked my latest source, and it's exactly the same as the C version. Are you saying that the program needs to look at the userid and select the relevant file depending on UID? I'm kinda in the dark on this one, as both the C and B09 source call for the dates.file to be in /DD/SYS... i.e. no provision for multi-dates.files. re: screen control Yeah, the B09 version used TABs to position the cursor, and in C, I opted to go with the rudimentary calls in SCREEN.H. What happens on the WYSE? and more importantly, can you point me to some generic C calls for positioning the next output to be at a certain column/row? I could do a little calculating of the name field and write say, 60 - n blanks, but I was hoping to eliminate that sort of stuff. Appreciate the feedback! ...Jim There are 3 Replies. #: 9249 S3/Languages 22-Jan-91 23:56:48 Sb: #9244-#'C' help Fm: Pete Lyall 76703,4230 To: Jim Peasley 72726,1153 (X) Jim - Regarding multiple users... best technique (unix apps do this) is get the user's ID, and then use that to do a getpwuid() [forget if that's exactly what it's called... see the password(3) function of the Clib docs]. That will return a pointer to a structure that is the user's password file entry broken down. One of the members of the structure is a pointer to a string that is the name of that user's home [login] directory. Once you know that, your program can chd() there, and then open the dateck data file. This way, every user inherently gets access to his own file, and the program is automatically multi-user. Re: independent screen positioning... you just discovered what termcap is for. Termcap allows you to make generic calls that are used to manipulate any terminal that's being used (assming it has been defined by an entry in the /dd/sys/termcap file, and you know the name of the terminal the user is using. Pop over to DL3 and snag the two man pages discussing termcap that I recently uploaded. I'll be happy to answer questions after that. Consider it an investment in the future too, as OSK uses termcap too. Pete There is 1 Reply. #: 9272 S3/Languages 25-Jan-91 00:31:31 Sb: #9249-#'C' help Fm: Jim Peasley 72726,1153 To: Pete Lyall 76703,4230 (X) Pete; re: multi-users and getuid() Dunno if I want to get this esoteric in a pgm. that I'd like to keep as MS-DOS compatible as possible. The problem thbt Steve's having is because I changed the file pointer to look specifically in the /dd/sys directory from the original B09 program. Did this during a cleanup of my root dir. Will play around with it tho, and see what I can come up with. re: termcap related screen positioning Will go snarf the files now. Sounds like just what I was looking for. More than likely will be back with questions later...! Thanks, ...Jim There is 1 Reply. #: 9275 S3/Languages 25-Jan-91 11:47:57 Sb: #9272-'C' help Fm: Pete Lyall 76703,4230 To: Jim Peasley 72726,1153 Esoteric? Consider it a stylistic issue, and one that will prep you for other work under both OSK and Unix. It's still up to you, of course.... Also - there's always: #ifdef MSDOS ...blah blah... #else PWENT = getpwuid(getuid()); ... #endif Pete #: 9252 S3/Languages 23-Jan-91 06:20:11 Sb: #9244-#'C' help Fm: Steve Wegert 76703,4255 To: Jim Peasley 72726,1153 (X) Ack Just hate when that happens. Nope ... I don't recall modifying the BASIC09 source at all. I'll check to be sure, but the version I'm running looks for dates.file in the currect data directory. With the public execute bit set on the module, and it looking to the current data directory for dates.file, it handily supports multiple user use. On the screen control issh ... I see the date screen report all scrunched to the left of the tube, each line with a couple of stray ascii charcters leading and trailing. I'll see if I can't upload an example. Steve There is 1 Reply. #: 9273 S3/Languages 25-Jan-91 00:31:40 Sb: #9252-'C' help Fm: Jim Peasley 72726,1153 To: Steve Wegert 76703,4255 Steve; Ahh... looking at the original AR file, you're right... I did modify my copy to specifically look in the /dd/sys directory during a cleanup of my root dir. You can easilt modify the C source to emulate the B09 program by just deleting the "/dd/sys" portion of the INFILE def. That way your users will have access to their own dates.file in their OWN data dir. re: messed up output on the WYSE I'm going after Pete's termcap files right now, and will see what I can do to make it a bit less machine specific. In the meantime, if you wished you could do something like : s_len = strlen(name); for (pos = 0; pos <= (54 - s_len); ++pos) fputs (x20,1); /* not too sure on this.. haven't tried it */ in place of the CURSOR(x,y); statements. Don't have a clue where the stray ASCII chars are coming from. Will get back to you after perusing the Termcap stuff. ...Jim #: 9254 S3/Languages 23-Jan-91 06:43:23 Sb: #9244-'C' help Fm: Steve Wegert 76703,4255 To: Jim Peasley 72726,1153 (X) Ok ... took a peek at my copy of the B09 source for version 1.2 (12/2/89) and saw that filenam="dates.file". No reference to /dd/sys at all. Perhaps you have changed that in a later version. I was able to redirect standard out and err to a file and capture the output of dateck that I see on my Wyse 50 (well almost ... there's a couple of screen control characters missing at the begining of the date hit lines, but you'll get the picture). Capture follows: <<>> !%Today is February 23, 91 Searching 02/23 to 03/25 : 02/28 Ash WednesdayM%!& 1st 03/17 St. Patrick's DayM& 1st <<>> I had to change the ^B's to to keep the CIS editor from sending me to Mars, but you get the general drift. I see Pete's already pointed you to termcap, so 'nuff said there. Steve #: 9245 S3/Languages 22-Jan-91 23:02:28 Sb: #ASM code Fm: Jim Peasley 72726,1153 To: Any HP users Anybody have any experience with ASM on the HP-9000? I'm in a 68000 ASM class with about 50 other students, and needless to say, the lab instructor's time is at a premium. What I'm looking for is the cmds to asm and link my source file to produce an executable. I can get it to asm O.K., but can't get it to link with the externs to produce runnable code. Any input welcome!!! (gotta use the HP until my MM/1 arrives!) ..Jim There is 1 Reply. #: 9251 S3/Languages 23-Jan-91 03:41:31 Sb: #9245-ASM code Fm: Kevin Darling (UG Pres) 76703,4227 To: Jim Peasley 72726,1153 (X) Jim - I'd suggest a quick question in the HP forum (go hp)... luck! #: 9280 S3/Languages 25-Jan-91 21:59:14 Sb: #9273-#'C' help Fm: Steve Wegert 76703,4255 To: Jim Peasley 72726,1153 (X) Thanks for the tips, Jim. I'll try and diddle this weekend. Steve There are 2 Replies. #: 9284 S3/Languages 25-Jan-91 23:07:24 Sb: #9280-'C' help Fm: Jim Peasley 72726,1153 To: Steve Wegert 76703,4255 (X) I'll be interested to hear how it comes out. I'd try it myself, but it looks as though this wkend is already eaten up... Homework tonight, class tomorrow 8-1, & the rest of Sat. and Sun. I've gotta replace a patio door - frame and all. Then there's always the Superbowl, although I might miss it seeing as how the 49ers aren't playing! ...Jim #: 9301 S3/Languages 27-Jan-91 18:29:04 Sb: #9280-#'C' help Fm: Jim Peasley 72726,1153 To: Steve Wegert 76703,4255 (X) Steve; I got a chance to play around with the pgm. a bit today, and got it to print in a tabular fashion without using pos_cur. I eliminated the CURSOR calls in the print_event function, but haven't had a chance to remove them from the add_event function yet. Just uploaded the source to DL10, marked for you. Let me know if this solves your "garbaged-up" output on the WYSE. ...Jim There is 1 Reply. #: 9311 S3/Languages 28-Jan-91 22:00:36 Sb: #9301-#'C' help Fm: Steve Wegert 76703,4255 To: Jim Peasley 72726,1153 (X) Jim, Had a few minutes to test out the new source. Your changes did eliminate the cursor control characters I was seeing ... as well as your change to the path for dates.files again allows multiple users their own dates.file. However ... I'm now seeing a '1st' in the type of event field, if there's nothing normally there. For instance, a run of dateck brings up Ash Wednesday. There's nothing special suposed to be in the type of event field, yet I see a '1st'. I'm also seeing something wierd with todays date ... the year seems to be munged. Popping the source into my handy editor and searching for '1st', I get one hit. A comment line in some code testing for the 1st. Nowhere else. Can't for the life of me see how that's getting printed, tho. Thoughts? Today is February 28, 91 Searching 12/01 to 12/31 : 12/12 Hanukkah 1st 12/25 Christmas 1st 12/10 Steve's Birthday 34th Birthday There is 1 Reply. #: 9332 S3/Languages 29-Jan-91 23:23:14 Sb: #9311-#'C' help Fm: Jim Peasley 72726,1153 To: Steve Wegert 76703,4255 (X) Steve; Glad to hear that we can do away with the pos_cur(x,y) stuff... now all I need to do is figure out how to position the input fields in the add_event function! Maybe this weekend. > However ... I'm now seeing a '1st' in the type of event field, if there's > nothing normally there. For instance, a run of dateck brings up Ash > Wednesday. There's nothing special suposed to be in the type of event > field, yet I see a '1st'. > I'm also seeing something wierd with todays date ... the year seems to > be munged. The 1st that you're seeing is due to the fact that I changed the logic a bit to not display a year span for annually recurring events like Christmas, etc. By setting the year field for such dates to 00, no year span gets printed. However... for events such as Ash Wednesday, Easter, Thanksgiving, etc. that do not fall on the same date each year, it's necessary to manually edit the dates.file to re-set these dates to the current day/year. At some point, I'd like ts incorporate a way to dynamically calculate these dates, but I don't remember how most of them are calculated. Labor Day I know, but not the rest of them! Anyone??? > I'm also seeing something wierd with ttdays date ... the year seems to > be munged. What version of the Kreider libs do you have? I remember a message from someone saying that the localtime() function was fixed? in the 12/10/90 release - that's what I'm using. ...Jim p.s. You share the same B'day as our oldest daughter. (19 this year) There is 1 Reply. #: 9334 S3/Languages 30-Jan-91 08:00:39 Sb: #9332-'C' help Fm: Steve Wegert 76703,4255 To: Jim Peasley 72726,1153 Ahh ... editing the date's file is an easy task. I might be a release behind on the Kreider libs ... I'll go fetch and recompile. Steve #: 9283 S3/Languages 25-Jan-91 23:07:20 Sb: #9275-'C' help Fm: Jim Peasley 72726,1153 To: Pete Lyall 76703,4230 (X) Pete; .. I guess you're right - mumble,mumble. Still, I had never heard of termcaps until STERM v1.3, and can't think of any other OS-9 pgms that use them. I DO see the value tho. Guess I'm just going thru an input overload at the present time! Got your 2 files from DL3 last night, but after printing out CLIBDOC, I need to get some more ribbons before getting into them. ...Jim #: 9495 S3/Languages 14-Feb-91 01:13:52 Sb: #'C' fopen help Fm: SCOTT HOWELL 70270,641 To: all Why does'nt Microware 'C' have a binary attribute for opening files. For example Turbo 'C' has ...fopen("scott","wb") while Microware 'C' has only ...fopen("scott","w"). There are 3 Replies. #: 9497 S3/Languages 14-Feb-91 05:13:10 Sb: #9495-'C' fopen help Fm: James Jones 76257,562 To: SCOTT HOWELL 70270,641 (X) It doesn't have it because the binary attribute is an ANSIism more recent than the version of fopen() in the library. You won't find it in many Unix versions of fopen(), for that matter, because the main reason it's there is to let systems that have CRLF as line terminator do appropriate translation so that to C programs, lines appear to end with the single character represented by '\n'. #: 9500 S3/Languages 14-Feb-91 10:04:50 Sb: #9495-'C' fopen help Fm: Pete Lyall 76703,4230 To: SCOTT HOWELL 70270,641 (X) Scott - All files in OS9 are inherently opened in 'binary' mode. That 'wb', 'rb' stuff is a DOS'ism. Pete #: 9512 S3/Languages 15-Feb-91 05:35:37 Sb: #9495-'C' fopen help Fm: Bill Dickhaus 70325,523 To: SCOTT HOWELL 70270,641 (X) Microware 'C' was written to follow the K&R "standard", which doesn't include the "wb" mode. Even so, with OS9 the two modes would be equivalent. What really differentiates between "text" and "binary" mode is the type of read and/or the path options, not the open. Bill #: 9498 S3/Languages 14-Feb-91 06:38:28 Sb: #R.S.B. Query Fm: Ches Looney 73016,1336 To: R.S.B. Users A question for users of R.S.B. Should I be able to use binary programs with R.S.B.? I have been able to transfer RS basic programs to OS9 files and use them with R.S.B. successfully; however, I have been unable to use machine language (binary) programs. Such programs may get to a first screen and lock up or may not even get to a visible first step before locking up OS9 so that a cold start is required. I have sent electronic mail to Chris Burke; does he still check in to CIS? Any ideas?? Thanks, Ches. There is 1 Reply. #: 9501 S3/Languages 14-Feb-91 13:15:27 Sb: #9498-#R.S.B. Query Fm: Kevin Darling 76703,4227 To: Ches Looney 73016,1336 (X) Ches - almost all binary programs would probably fail to run, I should think. They may depend upon ROM routines being at a certain place, or diddle the GIME directly (very likely), and so on. Someone did claim that they'd run Mikeyterm under RSB tho. There is 1 Reply. #: 9502 S3/Languages 14-Feb-91 14:35:27 Sb: #9501-R.S.B. Query Fm: Ches Looney 73016,1336 To: Kevin Darling 76703,4227 (X) Interesting, Les said that the current release of LYRA had been coded to work on a hard disk with R.S.B. Maybe he can point me in the right direction next time he checks in - I've left him a message on CoCo Forum. Your comments on ROM routine location dependency seconded my intuitive suspicion; however, LYRA and Shanghai load and run OK on Owlware Basic buggered to work thru OS9 files on the hard disk. But thats still operating from RS Basic as the home-base where I gather R.S.B. is totally moved into RAM in non-specific locations. Maybe LYRA runs under some very specific arrangements of modules with R.S.B. Thanks for the response. Ches. #: 9534 S3/Languages 16-Feb-91 17:33:10 Sb: #the **p syntax in 'C' Fm: SCOTT HOWELL 70270,641 To: all I have seen this syntax infrequently in college 'C' text and in source code, but I have yet found a good explaination. It is in reference to pointers and I beleieve it is called 'double indirection'??? the syntax is char **p = & dummy or char **match(p,name) What does the ** actually say There are 2 Replies. #: 9538 S3/Languages 17-Feb-91 00:35:53 Sb: #9534-the **p syntax in 'C' Fm: Sandy Tipper 72060,76 To: SCOTT HOWELL 70270,641 (X) Actually, it means two different but related things, depending on where you find it. In both of your examples, it was in a declaration statement, (the first was complicated bu the fact that it included an initialization, and the second was the declaration of a function). the simplest example of this type is : char **p; This is a declaration of the variable p. The first (RIGHTmost) asterisk means that p is a pointer. Fair enough, but a pointer to what? The second asterisk tells us that the what is a pointer itself. So p is a pointer to a pointer. But what is the pointer that p is pointing to pointing at? A char. So p is a pointer to a pointer to char. In your example, the initialization is of p, setting up p to contain the address of a variable (p points to that variable). That variable had better be a pointer to char. Later in the code, after the definitions and declarations have been all done, the asterisk has a different meaning altogether: instead of explaining what the variable being declared is, it is an operator, "doing" something to the expression it is operating on. If i is an int, and p is a pointer to int, and pp is a pointer to pointer to int, then follow this: i = 4; p = &i; pp = &p; Question: what is **pp ? First, read it as *(*pp) So pp is pointing to p, so *pp evaluates as equivalent to p. And p is pointing to i, so *p evaluates as equivalent to i. So **pp is equivalent to i. So **pp is 4. See? Sandy #: 9539 S3/Languages 17-Feb-91 11:44:39 Sb: #9534-the **p syntax in 'C' Fm: Pete Lyall 76703,4230 To: SCOTT HOWELL 70270,641 (X) Scott - char **p = &dummy; Says: p is a pointer to a pointer that points to a char type. The &dummy says assign the address of dummy (i.e. a pointer) to that slot. Typically double indirects are used with arrays of pointer, like **argv for instance. The 'char **match(p,name) says that match is a function that returns a pointer to a pointer to a type of char. Pete #: 9837 S3/Languages 17-Mar-91 10:51:59 Sb: #termcap.l docs? Fm: Ken Drexler 75126,3427 To: Pete Lyall Pete, I am trying to write a terminal independent clearscreen function in c and want to use your termcap library from Mark Griffith's sterm package. I have grabbed the unix termcap manual posted here but it does not have the special functions you added to get around the lack of an environment under 6809/OS9. Also from reading sterm.c, the parameters for each function do not seem to correspond to the unix manual page. Have you posted the documents for your version of the tercap.l or a header file for use with it? If so, where should I look? Thanks for the help. Ken There is 1 Reply. #: 9855 S3/Languages 18-Mar-91 11:23:49 Sb: #9837-termcap.l docs? Fm: Pete Lyall 76703,4230 To: Ken Drexler 75126,3427 Ken - As far as the termcap.l stuff, the biggest thing that changes is that if you don't allocate a buffer for the tgetent() function, you may use a NULL and a buffer will be auto-allocated for you. I used it this way for convenience, but there may be some memory allocation bugs. Simmy Turner took to just allocating the buffers manually. As far as the ttytype file, see the 'update' command, if it's here. My 6809 stuff is offline, but I could get to it if you have no other paths. Essentially, the ttytype file looks like this: [+|-|@]devname crttype There may be multiple lines, one per device. The syntax is: + = enabled local terminal @ = enabled modem based terminal - = disabled terminal ..WHOOPS! I just realized I'm combining two descriptions here! One is the 'ttylist' file associated with Mtsmon, and the other is ttytype.. sorry! The layout is just: /devname crt_type /t2 vt100 /w1 coco3 /t3 wyse50 etc. The file may be in /dd/sys or /r0/sys (latter is faster), and is manipulated with a utility I called 'ttyset', which should be in DL9. Sorry about the confusion, and toggle me if you need to be further confused! Pete #: 9902 S3/Languages 23-Mar-91 00:04:05 Sb: #C Problem Fm: Robert DeBolt 76417,2225 To: ALL Hi! I have been tinkering with an experimental interpreter (written in C) of an object-oriented "Forth-like" language I call "XX". It now only handles longs and doubles. In checking out the arithmetic operators, I found the following anomaly: -100 / -5 = -20 ??? Here is a sample program to prove my point: /* Module: testlong.c */ #include main() { long x,y,q; x = -100L; y = -5L; q = x/y; pflinit(); printf("x/y=%ld/%ld=%ld\n",x,y,q); } The printed result is: x/y=-100/-5=-20 Is this a compiler bug, or am I missing something about integer division? What would be the best solution to work arounr it? if (x<0L && y<0L) q = -x/y; else q = x/y; Maybe? Thanks, Bob. list type There is 1 Reply. #: 9904 S3/Languages 23-Mar-91 00:50:40 Sb: #9902-#C Problem Fm: Pete Lyall 76703,4230 To: Robert DeBolt 76417,2225 (X) Bob - Hadn't seen that problem before..... are you using the Kreider libraries in DL3? If not, grab clib.l and clibt.l there, recompile, and let us know how you fare. Lots of bugs were fixed when Carl re-did the libraries. Pete There is 1 Reply. #: 9908 S3/Languages 23-Mar-91 08:46:21 Sb: #9904-C Problem Fm: Robert DeBolt 76417,2225 To: Pete Lyall 76703,4230 (X) Pete, Yup. DL'd clibt.ar dated 90/12/07. Problem is still there. Bob #: 9903 S3/Languages 23-Mar-91 00:27:16 Sb: #9855-#termcap.l docs? Fm: Ken Drexler 75126,3427 To: Pete Lyall 76703,4230 (X) Pete, Thanks for the information. It was the 0 for the buffer address in particular that had me confused. With that clarification, the termcap docs posted here may do the job. Ken There is 1 Reply. #: 9905 S3/Languages 23-Mar-91 00:51:29 Sb: #9903-#termcap.l docs? Fm: Pete Lyall 76703,4230 To: Ken Drexler 75126,3427 (X) Bueno.... the termcap docs were ..uh.. lifted directly from 4.3BSD. Pete There is 1 Reply. #: 10050 S3/Languages 30-Mar-91 00:23:54 Sb: #9905-termcap.l docs? Fm: Ken Drexler 75126,3427 To: Pete Lyall 76703,4230 (X) Pete, Thanks for the further note. Since getting on last weekend, I have written a manual page for your crtbypth and crtbynam functions and taken a shot at a termcap.h. I am not satisified with the latter (i.e. it does not lead to graceful compiles) and am reworking it. When I get them all smoothed out I will upload them for what ever use they might be. Ken #: 10123 S3/Languages 05-Apr-91 18:04:45 Sb: #CLIB.L Bug? Fm: Hugo Bueno 71211,3662 To: All I think I've found a bug in the latest Kreider library. Using the program below, I get a wrong result of Fri Mar 5 18:59:20 1991 even though today is April 5th. #include #include main() { long curr_time; curr_time = time((long *)0); puts(ctime(&curr_time)); } The version of the lib that I'm using is 30,575 bytes long and was created 12/7/90 (I think). Have there been any updates since then? There is 1 Reply. #: 10128 S3/Languages 05-Apr-91 23:51:12 Sb: #10123-CLIB.L Bug? Fm: Pete Lyall 76703,4230 To: Hugo Bueno 71211,3662 (X) There was a problem that Carl worked on regarding a month index being off by one. Perhaps when he fixed it, he broke other functions that used it (cringe). Try Carl directly at 71076,76. Pete #: 10132 S3/Languages 06-Apr-91 06:48:27 Sb: clib bug Fm: Hugo Bueno 71211,3662 To: 71076,76 Carl, Please see my message 10123 for a bug report on your latest clib.l. Hugo #: 10169 S3/Languages 08-Apr-91 14:34:12 Sb: #Unknown Procedures Fm: Erich Schulman 75140,3175 To: ALL I downloaded a Basic09 file from this forum using Mikeyterm 4.7 in the CAPT protocol. I TRSCOPYed it to OS-9 and set the attributes. The program loaded. When I ran it, I got ERROR 043. It didn't like SHELL "cls". From edit, I c*/cls/display c and retried. OK until the program asked me to confirm my inputs. I got another ERROR 043, this time for the RUN inkey(confirm).How do I make inkey available to Basic09? And for once I am able to writing Basic09, is there a way I can test for availability of a needed module so that my programs won't have to crash that way?a There is 1 Reply. #: 10172 S3/Languages 08-Apr-91 15:44:35 Sb: #10169-#Unknown Procedures Fm: Pete Lyall 76703,4230 To: Erich Schulman 75140,3175 (X) Erich - The ERROR 43 says 'cannot find the module' essentially. In the 1st case, you didn't have a CLS program. In the second case, it appears that it couldn't find the 'inkey' code in your execution directory. Is it there, and are the attributes set to allow its execution? Another easy (and somewhat speedier) technique is to merge a copy of the Inkey routine onto the end of the packed module (once you have packed it, that is). As far as availability, one method might be to use the SYSCALL module to effect a F$Link to see if a module were in memory. Proper methodology dictates that you'd also have to do a corresponding F$unlink to bring the link count back to normal. Pete There are 2 Replies. #: 10173 S3/Languages 08-Apr-91 15:44:58 Sb: #10172-Unknown Procedures Fm: Pete Lyall 76703,4230 To: Pete Lyall 76703,4230 (X) Hmmm... make MODULE = Procedure. #: 10181 S3/Languages 09-Apr-91 03:40:31 Sb: #10172-#Unknown Procedures Fm: Erich Schulman 75140,3175 To: Pete Lyall 76703,4230 (X) I know inkey was on the same disk. I think it was in the execution dir. I never set its attributes (I thought RS would make all their programs executable, but I have already found that to be not so). I'll see how that goes. Then I'll try again with merging. At least I've made it this far! There is 1 Reply. #: 10184 S3/Languages 09-Apr-91 08:57:14 Sb: #10181-#Unknown Procedures Fm: Pete Lyall 76703,4230 To: Erich Schulman 75140,3175 (X) Erich - Keep plugging... I'm sure you're almost there. Pete There is 1 Reply. #: 10206 S3/Languages 11-Apr-91 08:47:03 Sb: #10184-Unknown Procedures Fm: Erich Schulman 75140,3175 To: Pete Lyall 76703,4230 (X) inkey was executable already. Perhaps my biggest Basic09 problem is that all of my Basic09 disks have so little available space (26 free sectors each, I believe). #: 10223 S3/Languages 12-Apr-91 09:29:36 Sb: #9908-C Problem Fm: Carl Kreider 71076,76 To: Robert DeBolt 76417,2225 (X) The long divide bug you found is very old indeed. It exists in the origional Microware library. I will fix it in mine before I upload the next version of the library. In the meantime, at offset $617d is 6c 01 in clib.l or offset $7d02 is 6c 01 in clibt.l change that to 63 01 Carl #: 10224 S3/Languages 12-Apr-91 09:30:16 Sb: #10132-#clib bug Fm: Carl Kreider 71076,76 To: Hugo Bueno 71211,3662 (X) Ah, the fruits of haste.... I fixed an off by one bug in localtime() last December, which, since ctime() calls localtime() broke ctime(). I neither looked at it or thought about it. So, here is the deal.. at offset $14c5 is 83 00 01 in both clib.l and clibt.l change that to 12 12 12 and the problem will go away. Sorry to one and all. And tell anybody else you know. I will put up a fresh copy when I look at the math problem Bob DeBolt found. Carl There are 2 Replies. #: 10227 S3/Languages 12-Apr-91 17:23:56 Sb: #10224-clib bug Fm: Hugo Bueno 71211,3662 To: Carl Kreider 71076,76 (X) Thanks very much for your reply and bugfix for clib.l. Your work is much appreciated! Hugo #: 10276 S3/Languages 15-Apr-91 02:42:24 Sb: #10224-#clib bug Fm: Paul K. Ward 73477,2004 To: Carl Kreider 71076,76 (X) Carl, Mike H. has an LHarc for your MM/1 -- if you need it, let me know. Paul IMS There is 1 Reply. #: 10278 S3/Languages 15-Apr-91 02:48:33 Sb: #10276-clib bug Fm: James Jones 76257,562 To: Paul K. Ward 73477,2004 (X) Actually, it can already be found in the 680xx DL area here, so Carl needn't hit you up for it. #: 10255 S3/Languages 14-Apr-91 08:44:28 Sb: #PACKing In Basic09 Fm: Erich Schulman 75140,3175 To: ALL I tried to PACK a Basic09 procedure, but every time I get ERROR 214 (no permission). The only permissions that are off are Directory and Single User. What does it take to PACk? There are 2 Replies. #: 10261 S3/Languages 14-Apr-91 17:28:49 Sb: #10255-PACKing In Basic09 Fm: Kevin Darling 76703,4227 To: Erich Schulman 75140,3175 (X) Erich - offhand, I might guess that you were swapping disks before doing the Pack, perhaps? Pack normally tries to go to the default exec dir disk. You can also force it: pack* >/d0/cmds/myprogram or the like. #: 10314 S3/Languages 16-Apr-91 22:39:34 Sb: #10255-#PACKing In Basic09 Fm: Jim Peasley 72726,1153 To: Erich Schulman 75140,3175 (X) Erich; Sounds like you're trying to 'PACK' a source file from the OS9> prompt. To pack a file, all one need do is 'load' it into BASIC09, and type pack a the B: prompt. This places an executable of the source in /dd/cmds with the execute permissions already set. Is this what's happening?? ...Jim There is 1 Reply. #: 10325 S3/Languages 17-Apr-91 16:32:15 Sb: #10314-#PACKing In Basic09 Fm: Erich Schulman 75140,3175 To: Jim Peasley 72726,1153 (X) I was in Basic09. The first reply (disk switching) seems to have the answer. Under OS-9, I have to do a ***lot*** of disk switching. Just two OS-9 configurations and making MultiVue bootable alone required a total of 500-600 disk insertions. There are 2 Replies. #: 10326 S3/Languages 17-Apr-91 20:48:27 Sb: #10325-#PACKing In Basic09 Fm: Robert A. Hengstebeck 76417,2751 To: Erich Schulman 75140,3175 (X) You might want to consider getting a second drive. If you have either the FD501 or FD502 drive from Tandy, you can put a used $25 - $45 360K 1/2 height IBM compatable drive in there. I have a FD501 setup in which I removed the original single sided drive, and replaced it with a 720K and a 360K disk drives. I use the 360K drive as drive /d0, and the 720K as drive /d1. This in combination with the LR Tech 40Meg HD as /H0 makes for a beautiful set. This sure beats disk swapping anytime. There is 1 Reply. #: 10330 S3/Languages 17-Apr-91 21:56:47 Sb: #10326-#PACKing In Basic09 Fm: Erich Schulman 75140,3175 To: Robert A. Hengstebeck 76417,2751 (X) I am not going to =consider= getting a second drive: I am **going** to get a second drive! I wasn't on OS-9 for 10 minutes before realizing the need for it. It is at the top of my hardware purchase list. I have been wondering about using a IBM PC drive, it would sure save $$$. I have the FD-502. For a PC's drive, would any advance preparation be needed to make it work on the COCO3? And how would I need to (if at all) modify the instructions for installing a 2nd drive that appear in the manual that accompanied the FD502? How about a 1.2Mb 5.25" PC drive? I have more than a few such PC disks, and I would like to transfer their data to DECB and/or OS-9 once I have a transfer utility. If I got a dime for every time I've had to switch disks I could pay off the national debt:-). I know I will miss diskswapping as much as I miss CLOADing/CSAVEing and now reading 80 columns on a regular TV set. There are 3 Replies. #: 10333 S3/Languages 17-Apr-91 23:45:30 Sb: #10330-#PACKing In Basic09 Fm: Stephen Hamilton 71570,1546 To: Erich Schulman 75140,3175 (X) Erich, I have another bit of help for you also that may be of some intrest. Depending on your set up, you should be able to use you 502 as a double sided drive under OS9. Although this wont solve all your problems, it will allow you to at least have BASIC09 on the same disk as your other OS9 directories, ie. CMDS, SYS, OS9BOOT. If you have DMODE, it's a big help in pulling this off As far as adding an IBM drive, it shouldn't be any problem, make sure the jumpers in the drive are set right. Also, be sure and check the controler ribbon conectors. These may have to be changed as TANDY decided to leave out a few pins on some of them making accessing side two immpossible. Back to the original subject. DMODE will change your drive configuration for you while using that drive. The easiest way to do this is to type DMODE /d0 sid=2. Then FORMAT /d1 a new disk. It will be double sided. Put your original disk back in and run CONFIG. Your new boot that will be on your new disk will cointain the double sided drive module. Then DSAVE /d0 /d0 ! SHELL. This will copy the filess from your single sided disk to your double sided one. Do the same DSAVE again with the BASIC09 disk. All you OS9 directories are now on one disk, this should help out with BASIC09 problem as well as saving some trouble. Give me a call back and let me know how it turns out. Steve Hamilton 71570,1546 There is 1 Reply. #: 10381 S3/Languages 21-Apr-91 22:17:34 Sb: #10333-#PACKing In Basic09 Fm: Erich Schulman 75140,3175 To: Stephen Hamilton 71570,1546 (X) I tried to get the source code in DMODE.ASM into rma for assembly. What I got was a *long* list of errors scrolling up my screen which was eventually ended by ERROR 001 (unconditional abort). I used rma dmode.asm to load the assembler and the source code. Should I have added certain options? Or am I doing something else wrong? This was my first time trying to load downloaded source code. There is 1 Reply. #: 10406 S3/Languages 22-Apr-91 23:10:20 Sb: #10381-PACKing In Basic09 Fm: Stephen Hamilton 71570,1546 To: Erich Schulman 75140,3175 (X) Erich, I'm having some trouble with my RS232 right now, left amessage asking for a temporary serial OS9 Term prog on here earlier about it, so I having trouble with my uploading capability. Here's what I'll do though. If yo like, leave me your address in the E-Mail section, private, and I'll send you a disk with DMODE, WMODE, and a couple of other items thqat should help you, can probably get it to you before the weekend. Steve 71570,1546 #: 10340 S3/Languages 18-Apr-91 12:10:32 Sb: #10330-PACKing In Basic09 Fm: Robert A. Hengstebeck 76417,2751 To: Erich Schulman 75140,3175 (X) As Stephan stated, the FD502 is a 360K disk drive. Check your connectors in the case to make sure that the pins are not pulled. If they are you can make another cable using the standard connectors and 36 wire ribbon. You will have to remove two wires from one side of the ribbon. The controller for the disk drive as far as I know can only support double density disks, that is 360K or 720K. I accidently bought a 1.2 Meg disk drive and used it in my configuration, and found out that it wouldn't work. Fortunately I found another person who had a 720K drive, and swapped with him. The problem, was that the 1.2 Meg drive has a data transfer rate that is higher than the controller could handle. Maybe that problem has been resolved by now, but check here before you do it. #: 10345 S3/Languages 18-Apr-91 23:53:39 Sb: #10330-#PACKing In Basic09 Fm: Stephen Hamilton 71570,1546 To: Erich Schulman 75140,3175 (X) Erich, Just a note to my note. Try using COBBLER insted of CONFIG. COBBLER makes an exact duplicate of your OS9BOOT with any changes that you have made while online, ie. DMODE sid=2, XMODE, TMODE, etc. Then use DSAVE as previously stated. Another reason to use it is you don't have to go through all that trouble you would for CONFIG, switching disks, selecting modules, etc. If you need DMODE, I can get it for you, I'm not sure if it's in this DataBase or not (I think it's Freeware, hope I didn't just offer the wrong thing in fornt of God and the whole world .) To get the correct syntax for DMODE, just type DMODE /D1 and it will list the parameters. Hope this is some help to you, Talk to you later. Steve 71570,1546 There are 2 Replies. #: 10347 S3/Languages 19-Apr-91 14:14:26 Sb: #10345-PACKing In Basic09 Fm: Erich Schulman 75140,3175 To: Stephen Hamilton 71570,1546 (X) Ohhhhhhhh. DMODE is in a SIG. No wonder I couldn't find it in my Lvl2 manual. I was getting ready to ask you if you had the command right or if you're using Level 1, 3 or 4. I'll see if I can find it in a LIB here. As long as it is not ar'ed I can get to my OS-9 disk. I have a copy of Sterm I will use to get ar et.al. later, but I have to re-reconfig to be able to use that (cf. CoCo Forum, sec. 9). I plan on doing that tonight. #: 10348 S3/Languages 19-Apr-91 14:28:41 Sb: #10345-#PACKing In Basic09 Fm: Erich Schulman 75140,3175 To: Stephen Hamilton 71570,1546 (X) I found an ar'ed dmode which, as I said, is not usbale at present. I did find DMODE/ASM. This I did d'load since I do have the Lvl2 Dev Kit and I ought to be able to assemble the source code. There is 1 Reply. #: 10350 S3/Languages 19-Apr-91 19:12:20 Sb: #10348-#PACKing In Basic09 Fm: Stephen Hamilton 71570,1546 To: Erich Schulman 75140,3175 (X) Erich, If you have any problem with the DMODE.ASM, I'll be happy to upload my DMODE without the AR, it's fairly short so it shoudn't be too much to down load fo you. Another good one to usee is WMODE, does the same thing to your screen settings. You would be able to boot up with an 80 or 40 column screen if you desire. If I can be of any further help, just call. Steve 71570,1546 There is 1 Reply. #: 10353 S3/Languages 19-Apr-91 22:48:30 Sb: #10350-#PACKing In Basic09 Fm: Erich Schulman 75140,3175 To: Stephen Hamilton 71570,1546 (X) I found WMODE in Lib10. But it's ar'ed :-c There is 1 Reply. #: 10362 S3/Languages 20-Apr-91 10:02:10 Sb: #10353-PACKing In Basic09 Fm: Stephen Hamilton 71570,1546 To: Erich Schulman 75140,3175 (X) Erich, OK, I'll try and upload them myself here in an unarked format, get back to you in a little while. Steve 71570,1546 #: 10346 S3/Languages 19-Apr-91 00:07:00 Sb: #10325-PACKing In Basic09 Fm: Jim Peasley 72726,1153 To: Erich Schulman 75140,3175 (X) Erich; Glad to hear you got it figgered out. Yep, OS-9 and especially MV _really_ needs to be run from a Hard -isk to make it pleasurable. Might consider saving the $ towards one... they're becoming very cheap -- at least the MFM and RLL ones under 40 Meg. ...Jim #: 10467 S3/Languages 26-Apr-91 00:21:29 Sb: #Packing in Basic09 Fm: Stephen Hamilton 71570,1546 To: 75140,3175 (X) Erich, ok, your disk is on the waay to you, should get there in a couple of days, hope it helps you out some. Steve 71570,1546 There is 1 Reply. #: 10470 S3/Languages 26-Apr-91 01:00:16 Sb: #10467-Packing in Basic09 Fm: Erich Schulman 75140,3175 To: Stephen Hamilton 71570,1546 (X) Great: via these threads I am finally starting to get OS-9LII to work for me rather than the other way around. I may be getting a PC drive to add to this system as early as Tuesday. How do I get the drive connected inside the case (horizontal FD-502 system)? I want to be sure I get it right. This is not in my immediate plans, but can I support a third floppy drive? I think it would be useful for me, but I am giving higher priorities to more RAM, a faster modem, more programs, and a few other items. #: 10543 S3/Languages 01-May-91 21:30:22 Sb: #10470-Packing in Basic09 Fm: Kevin Darling 76703,4227 To: Erich Schulman 75140,3175 Erich - take apart the FD502 case, and I believe it has the second drive connector already there. The only caveat is that I believe Tandy installs a small fan when a 2nd drive is added, as the power supply in there is a little overloaded and will run very hot with both drives turning. You might consider adding an external fan on the back, or something. Oh. Tell us what jumpers are marked on the 2nd drive you get... will give us all a clue as to how you should set them. best - kev Press !> #: 10613 S3/Languages 07-May-91 22:30:16 Sb: #C-Help Fm: Brother Jeremy, CSJW 76477,142 To: All I am just starting to get into "C". I had downloaded Carl Kreiders's C Library and Mike Sweet's CGFX ver. 7. Do I replace the stock Tandy C stuff with these, or do I merge them, and if so, please tell me how. I am still at the learning point, so an Idiot's guide to C is probably what I should see, see what is I need to see for C. (I should be shot for that one.) --Thank you, Br. Jeremy, CSJW. There are 2 Replies. #: 10620 S3/Languages 08-May-91 06:14:15 Sb: #10613-C-Help Fm: Dan Robins 73007,2473 To: Brother Jeremy, CSJW 76477,142 (X) Brother, Carl's library DOES replace the current ones that came with the C Compiler. What I did, was make a backup of the original...delete Tandy's version and then pile Carl's libs in there. The CGFX library is an ADDITION (unless you have the Developer's Kit...then it would replace that version of the same type LIB). In either case....you'll make calls that the LIBs call for....and you'll utilize the LIBs when you go the LINK them in. Dan #: 10622 S3/Languages 08-May-91 09:19:39 Sb: #10613-#C-Help Fm: Pete Lyall 76703,4230 To: Brother Jeremy, CSJW 76477,142 (X) Br. J - You replace the Tandy/Microware clib.l with Carl's. Also, replace the T/MW cstart.r file as well. These will be in your ??/LIB directory. Next - run (don't walk) out and purchase a copy of the Waite Group's " "C Primer Plus". An absolutely fabulous book that is well written without being haughty or aloof, is loaded with examples to reinforce the text, and is sprinkled with humour to make the initial exposure to C bearable. After buying 6 or so other texts, it parted the clouds for me. Others have also raved about it, and I found out the local University uses it as their C text (of course, _they're_ Lutherans.. ). Pete P.S. It's worth the trauma. All of our previously 'assembler only' hacks who learned C never went back. Figure on about 30 days before the lightbulb gets to full wattage. P.P.S. A quick edit/compile/debug cycle is best for learning. Keeping as many of the compiler modules in memory, and using a RAMDISK or hard disk is optimal. We also have a replacement 'cc' command that helps facilitate this. There is 1 Reply. #: 10637 S3/Languages 09-May-91 23:02:12 Sb: #10622-C-Help Fm: Brother Jeremy, CSJW 76477,142 To: Pete Lyall 76703,4230 (X) Thank you for your advice. I know what you mean about the lightbulb. In the morning when Brother says rise and shine, I'm lucky if I can glow dimly. But I am having fun learning programming. Maybe soon I will have some good code too upload. -Br. Jeremy, CSJW. #: 10852 S3/Languages 27-May-91 19:04:20 Sb: Kreider clib Fm: Paul Rinear 73757,1413 To: Carl Kreider Carl, Here is a message you posted : #: 10869 S3/Languages 29-May-91 22:24:06 Sb: #C_Help Fm: Brother Jeremy, CSJW 76477,142 To: All OH SAY CAN YOU "C"...? Sorry I couldn't resist. I am in the process of working on a program called MVWORD. I recently uploaded a file (MVWORD.AR). I am currently working on the dialog boxes. While I am writing this in BASIC09, the current version of GFX2 does not easily allow for Dialog Boxes (radio buttons, etc..hint, hint KD?) I noted that on page 12 of ver 7 of Mike Sweets CFGX library reference, there is an example of some code for dialog box functions. At the moment I do not have access to a C compiler, but I was wondering if some one did, I you might be willing to make a small demo program using this code and upload it? In fact, if one of the C-programmer's out there would be willing to write some demo programs using the CGFX library and post both the source and the executable modules (I hope that's the correct terminology) it would be of great help to all of us struggling C programmers. Thank you for your help, Brother Jeremy, CSJW . CIS 76477,142 There are 2 Replies. #: 10876 S3/Languages 30-May-91 11:15:31 Sb: #10869-C_Help Fm: Mike Haaland 72300,1433 To: Brother Jeremy, CSJW 76477,142 (X) ~ There's quite a bit of source code (in C) in DL10 that uses CGFX.L. Grab EDPTR.AR, SKEL.AR, to name just a few... They'll get you started. Mike #: 10877 S3/Languages 30-May-91 11:15:37 Sb: #10869-#C_Help Fm: Mike Haaland 72300,1433 To: Brother Jeremy, CSJW 76477,142 (X) ~ Almost forgot, there's a good dialog box routine in EDCON.AR also. Mike There are 2 Replies. #: 10880 S3/Languages 30-May-91 23:07:29 Sb: #10877-#C_Help Fm: Brother Jeremy, CSJW 76477,142 To: Mike Haaland 72300,1433 (X) Mike it was so good to meet you at the "Fest". Thank you for your advice. I hope that before too long, I might have some real code to upload for MVWORD. --Br. Jeremy, CSJW There is 1 Reply. #: 10886 S3/Languages 31-May-91 11:11:06 Sb: #10880-#C_Help Fm: Mike Haaland 72300,1433 To: Brother Jeremy, CSJW 76477,142 (X) ~ You quite welcome! Nice to meet you at the Fest too! Did you get the C compiler yet? Or are you still looking for it? Maybe EDCON.AR is a revision without the source code? Anyway, a very simular routine IS in edptr.ar. I'm sure cause I uploaded it. Mike There is 1 Reply. #: 10888 S3/Languages 01-Jun-91 00:53:02 Sb: #10886-#C_Help Fm: Brother Jeremy, CSJW 76477,142 To: Mike Haaland 72300,1433 (X) I have the compiler. At the moment my system is set up with 2 40tr. ss drives, and 512k of memory. I have to just find a block of time when I can sit down and put a systems disk together. Of course if the Lord provides, a hard drive, 40tr. dobule sided drives, a onemeg upgrade, etc. my life would be easier. I have gathered together various hints on the compiler, so it is mainly a matter of choosing what would work best for me. Any suggestions? --Br. Jeremy, CSJW. There is 1 Reply. #: 10923 S3/Languages 03-Jun-91 19:03:53 Sb: #10888-#C_Help Fm: Mike Haaland 72300,1433 To: Brother Jeremy, CSJW 76477,142 (X) Well, Do you have Tandy Drives on your CoCo? If they are FD-502's they are double sided. You just need to make a boot with the dual sided descriptors in them and fix the drive cable. If they're FD-501's then they're single sided. Personally I like the CC.AR in DL 3 as a front end to the CoCo compiler. es /R0 for temporary files and really speeds up compiles. If you run into any Q's, just fire 'em this direction. Mike There is 1 Reply. #: 10996 S3/Languages 08-Jun-91 11:16:15 Sb: #10923-C_Help Fm: Brother Jeremy, CSJW 76477,142 To: Mike Haaland 72300,1433 (X) Unfortunately they are '501's. -Jeremy, CSJW. #: 10881 S3/Languages 31-May-91 00:24:46 Sb: #10877-C_Help Fm: Brother Jeremy, CSJW 76477,142 To: Mike Haaland 72300,1433 (X) I dl'd the EDCON program, but it does not include the C source, and there did not seem to be any dialog boxes within it. Is it possible that the older version 2.0 I think, had these. --Br. Jeremy, CSJW #: 10889 S3/Languages 01-Jun-91 01:06:29 Sb: #CCEnv Fm: Brother Jeremy, CSJW 76477,142 To: All Does anyone have any information on a company named FoxWare, or its owner Chris Fox. He had produced a program called CCEnv. It was reviewed by Dale Puckett in the Nov 88 issue of Rainbow. It was a graphic based driver for OS-9 compilers. If it is not available, does anyone have a legal copy with documentation that they would like to sell? --Br. Jeremy, CSJW There is 1 Reply. #: 10893 S3/Languages 01-Jun-91 08:07:45 Sb: #10889-#CCEnv Fm: Hugo Bueno 71211,3662 To: Brother Jeremy, CSJW 76477,142 (X) I think that the Foxware product was vaporware. As I remember it, the ad you mentioned was the only one ever printed. Now, I just recently saw a message on the bitnet coco list that members of the Australian os9 group have posted their own version of a CCenv which is modeled after the turbo c environment. It'll probably make its way here at some point. Hugo -------------------------------------->UUCP on a Color Computer 3<---- Hugo Bueno | Delphi: MRGOOD Fanwood, NJ | Compuserve: 71211,3662 | UUCP: ...!(rutgers,njin)!fdurt!kc2wz!bluehaus!hugo | or hugo@bluehaus.uucp ---------------------------------------------------------------------- There is 1 Reply. #: 10914 S3/Languages 02-Jun-91 23:52:02 Sb: #10893-CCEnv Fm: Brother Jeremy, CSJW 76477,142 To: Hugo Bueno 71211,3662 (X) Thank you, I will keep my eyes and ears open. -Br. Jeremy, CSJW #: 10992 S3/Languages 08-Jun-91 07:56:32 Sb: #Cobol Needed..... Fm: Steven Barlett 71635,1562 To: all work, 17142558151 I am interested in finding a Cobol Compiler for OS9> level 2. If anyone has information as to where I may purchase Cobol Please let me know. I am developing software in Cobol and would like to see more business software developed for the CoCo... 3 ... 4 and so on. Please leave me a mail message in this forum if you have any information for me. Thank you, Steven Barlett 71635,1562 There is 1 Reply. #: 11060 S3/Languages 13-Jun-91 21:52:06 Sb: #10992-Cobol Needed..... Fm: Bob Palmer 74646,2156 To: Steven Barlett 71635,1562 Have you tried a message on the Microware forum requesting pricing information? There is (maybe was?) an official Microware produced COBOL compiler which was available for level II. Advertizement was last seen in 68 micro magazine - now defunct. Sorry I cannot help more. edit #: 11429 S3/Languages 22-Jul-91 10:56:52 Sb: #C++ Fm: Mark Wuest 74030,332 To: all Does anyone know of a forum here in CI$ for C++ programmers (other than laguages under unixforum)? I am actually going to have to do our next project at work in C++ starting with almost no reusable class{}'es. Any ideas? Mark There is 1 Reply. #: 11433 S3/Languages 22-Jul-91 11:11:38 Sb: #11429-#C++ Fm: Pete Lyall 76703,4230 To: Mark Wuest 74030,332 (X) Mark - If you go to BPROGB (Borland B), they have a section set aside for C++'ers, as well as a download library. Pete There is 1 Reply. #: 11436 S3/Languages 22-Jul-91 13:51:41 Sb: #11433-C++ Fm: Mark Wuest 74030,332 To: Pete Lyall 76703,4230 (X) Pete: I'll go look - I didn't even think of looking in PC-type areas! Thanks mucho, Mark #: 11444 S3/Languages 22-Jul-91 22:24:29 Sb: #C Compiler Problem Fm: Jay Truesdale 72176,3565 To: all I'm using a coco 3 with OS9 level 2. Consider the following C code fragment: struct _mtable { char _mnem[8]; int _mvi; char _mvc; }; struct _mtable mtable[3] = { "!dummy", 0, 1, "abcd", 1, 2, "add", 18, 10, }; This will even compile. Now consider the following assembler code generated by the C Compiler: * *struct _mtable mtable[3] = { vsect mtable: * * "!dummy", 0, 1, fdb _1 fcb 0 fcb 1 * * "abcd", 1, 2, fdb _2 fcb 1 fcb 2 .....etc. On page 1-5 of my Tandy C manual is states that a data type of INT is two bytes in size. My question is why the field corresponding to the INT type in the above assembler code is generated in assembler by an FCB which means "fill constant BYTE" which is one byte not two! The problem comes up later when the values exceed 255, the assembler rightly complains. I'm baffled, anyone got a clue here??? Thanks, -J There are 3 Replies. #: 11451 S3/Languages 23-Jul-91 00:04:19 Sb: #11444-C Compiler Problem Fm: Pete Lyall 76703,4230 To: Jay Truesdale 72176,3565 (X) Jay - Looking over the code (the assembler output got munched a bit... next time use STORE UNFORMATTED), it looks as if you may have a compiler bug on your hands. The code looks rational. What happens if you declare the _mvi as a SHORT? Also, try allocating the structure without initializing it and see what happens. Pete #: 11456 S3/Languages 23-Jul-91 07:38:38 Sb: #11444-#C Compiler Problem Fm: Kevin Darling 76703,4227 To: Jay Truesdale 72176,3565 (X) Hi Jay - the C book I have says that you can't do that kind of initialization. What you have to do instead is this (and don't leave out the {}'s !!)... struct _mtable { char _mnen[8]; int _mvi; char _mvc; }; struct _mtable mtable[3] = { { {'!','d','u','m','m','y','\0'}, 0, 1}, { {'a','b','c','d','\0'}, 2, 3}, { {'a','d','d','\0'}, 1000, 4} }; But since that's a terrific pain, I finally recalled that we discussed this back in Jan 1990 (when I first was looking at C and began to take notes :-). One way to "get around" it is to do the init yourself: struct _mtable mtable[3] = { { {},0,1 }, { {},2,3 }, { {},4,5 }}; char *istring[] = {"!dummy","abcd","add"}; main() { int n; for (n=0;n<3;n++) strcopy(mtable[n]._mnen,istring[n]); } Hope this helps. best - kevin There are 2 Replies. #: 11458 S3/Languages 23-Jul-91 08:59:12 Sb: #11456-#C Compiler Problem Fm: Pete Lyall 76703,4230 To: Kevin Darling 76703,4227 (X) Kev - Good eye.... because of the late hour of my reply, I didn't catch the pointer assignment to declared string space. That still doesn't directly explain why his ints are FCB 1's instead of FDB 1's though.. Pete There is 1 Reply. #: 11472 S3/Languages 24-Jul-91 05:19:09 Sb: #11458-#C Compiler Problem Fm: Kevin Darling 76703,4227 To: Pete Lyall 76703,4230 (X) Pete - Thanks kindly, but no good eye here. Took silly me hours to figure out (partly because you said it looked okay at first :-). "That still doesn't directly explain why his ints are FCB 1's instead of FDB 1's though.." Yeah, that's pretty strange. Playing around, it appears that when it expects the string array parts, it counts up each item (anything inside quotes counts as one item) after that as _one_ char (to be put into the string array). In other words, using: * "abcdefgh",0,1, fdb _1 all items (even this line) counted as "one" char, and fcb 0 this continues until the end of the _entire_ array[3] fcb 1 at which time rzb's fill up any extra space to make 33 (11 bytes in each unit * 3 units in array) * { "abcdefgh",0,1}, fdb _1 fcb 0 using the {} around each full array unit here fcb 1 does slightly better... this forces the compiler rzb 5 to at least lump each unit's stuff together :-) rzb 2 rzb 1 = 11 bytes/unit = correct size, at least :-) * {{ "abcdefgh"},0,1}, fdb _1 rzb 7 more {}'s forced the compiler to try to fdb 0 add up the first [8] array, then the INT, fcb 1 then the CHAR. Almost correct! In other words, it was trying to fill up the "char _mnen[8]" unit first... and I think it was using ","s to find them. More {}'s forced it to lump things together better. Of course, the _mnen assignment source had to be changed to make it all perfect. kevin There is 1 Reply. #: 11477 S3/Languages 24-Jul-91 08:51:21 Sb: #11472-C Compiler Problem Fm: Pete Lyall 76703,4230 To: Kevin Darling 76703,4227 (X) Kev - See my remark to JJ about 6809 using the quoted strings as pointers to type char *. I believe that's the only thing MW/6809 C knows to do with a quoted string. The fdb _1 (as I'm sure you know) is just allocating a constant somewhere else (usually near the end of the .r file) that is: _1 fcb 'a','b','c','d','e','f','h' (or equivalent) And the 'fdb _1' is just a pointer to it. Pete #: 11462 S3/Languages 23-Jul-91 19:59:44 Sb: #11456-#C Compiler Problem Fm: James Jones 76257,562 To: Kevin Darling 76703,4227 (X) Hmmm...might better check that C book, Kevin. :-) Initializing an array of characters with a string constant *is* kosher C. Now, what might give a compiler that's not careful some trouble is if the field is a pointer to character, because in that case a less-than-careful compiler might emit the assembly language for the string right where the pointer should be--it has to save it up for later (possibly MUCH later, if there's an *array* of structures being initialized). There is 1 Reply. #: 11468 S3/Languages 24-Jul-91 00:39:47 Sb: #11462-#C Compiler Problem Fm: Pete Lyall 76703,4230 To: James Jones 76257,562 (X) JJ - I thought that in the MW 6809 compiler that all quoted strings were treated as char *'s to a string constant in the module's text area...? Pete There is 1 Reply. #: 11471 S3/Languages 24-Jul-91 03:34:58 Sb: #11468-#C Compiler Problem Fm: James Jones 76257,562 To: Pete Lyall 76703,4230 (X) You may be right, but a quoted string can appear as an initializer for an array of characters, as long as the array either has its size unspecified, in which case it can inherit it from the string (don't forget the \0 at the end), or its size is the length of the string (ditto about the \0, save that in ANSI C, you *can* forget about the \0 if you want to). I just tried an initializer for a structure of the sort under discussion here, and it looks like you are right, and I think it is a bug in the compiler. There is 1 Reply. #: 11476 S3/Languages 24-Jul-91 08:45:00 Sb: #11471-C Compiler Problem Fm: Pete Lyall 76703,4230 To: James Jones 76257,562 (X) Yup - have gotten the quoted string to initialize structure members on both the 4.3BSD box and on Turbo C on an AT, but never on an MW/6809 compile. Pete #: 11466 S3/Languages 23-Jul-91 23:27:48 Sb: #11444-#C Compiler Problem Fm: Bob van der Poel 76510,2203 To: Jay Truesdale 72176,3565 (X) Jay, don't know if this helps -- but it compiles properly on OSK. Could be a complier bug with 6809; but I DID NOT SAY THAT! You should've see the uproar around here the last time I suggested that there was a bug in that beastie.... There is 1 Reply. #: 11484 S3/Languages 24-Jul-91 17:44:52 Sb: #11466-C Compiler Problem Fm: Bruce MacKenzie 71725,376 To: Bob van der Poel 76510,2203 (X) Bob, This matter of string initialization with double quotes and the COCO compiler got hashed around here about a year ago. The gist of it is that except for one dimensional character arrays the COCO compiler hacks it up. For two dimensional arrays and structure initialization the COCO compiler erroneously loads in pointers to string litterals rather than copying out the strings as it should. You have to single quote each character for these applications. #: 11573 S3/Languages 01-Aug-91 19:02:40 Sb: #CENV.AR Fm: Lee Veal 74726,1752 To: All I recently downloaded the CENV.AR archive from Lib 3. When I de-ARchived it, there were three new files in the data directory. They were CENV (the program and support programs), CENVDOC (which I assumed was the docs file), and RELEASE.DOC (which was a small one page thank you note.) CENV seems to work, I've set up an AIF which I click on and the program starts. The problem is that some configuring needs to be done, but the docs file (CENVDOC) seems to be an archive of an archive. There appears to be some nested files within the CENVDOC file, but they don't seem correctly formatted so that a simple additional "AR -x CENVDOC" can extract them. I figured a few things without the docs, but having the docs would be extremely helpful (I hope!), but up to now the docs are defying extraction. Has anyone got a good set of docs out of CENV.AR? Lee There is 1 Reply. #: 11576 S3/Languages 02-Aug-91 00:12:50 Sb: #11573-#CENV.AR Fm: James Jones 76257,562 To: Lee Veal 74726,1752 (X) I have. To get them out, it looks like one needs the "cuts" utility that is used by folks on the BITNET CoCo mailing list to encode files for transmission. Cuts does have advantages, especially in the mixed ASCII/EBCDORK environment of BITNET...but anyway, do you have cuts? There is 1 Reply. #: 11582 S3/Languages 02-Aug-91 11:47:29 Sb: #11576-#CENV.AR Fm: Lee Veal 74726,1752 To: James Jones 76257,562 (X) I have bruises but no cuts!!! I wonder if some one could un-CUT the CENVDOC file that's got the CENV docs imbedded in there, and then put the un-CUT docs back up in the LIB? It sure would help if someone could cut loose the docs on CENV. Thanks, Lee There is 1 Reply. #: 11590 S3/Languages 02-Aug-91 21:53:41 Sb: #11582-#CENV.AR Fm: James Jones 76257,562 To: Lee Veal 74726,1752 (X) I think I could manage that...watch this space. There is 1 Reply. #: 11593 S3/Languages 03-Aug-91 01:25:04 Sb: #11590-CENV.AR Fm: Lee Veal 74726,1752 To: James Jones 76257,562 (X) Thanks, James. Lee #: 11599 S3/Languages 03-Aug-91 22:06:31 Sb: #Help with C compiler Fm: Keith H. March 70541,1413 To: All Hello: I thought if I deleted all of the c compiler off of /dd and then recopied it to /dd (hard drive) from /d2, it would get rid of the following: /* khm.c */ #include main() { printf"Keith March\n"; } CC1 VERSION RS 01.00.00 COPYRIGHT 1983 MICROWARE REPRODUCED UNDER LICENSE TO TANDY 'khm.c' c.prep: c.pass1: c.pass2: c.opt: c.asm: c.link: Unresolved references: main cstart_a in /dd/lib/cstart.r linker fatal: unresolved references OS9:rdump /dd/lib/cstart.r Module name: cstart_a TyLa/RvAt: 11/81 Asm valid: Yes Create date: Jul 18, 1983 12:23 Edition/ROF: 1/0 Section Init Uninit Code: 0168 DP: 01 00 Data: 0000 0050 Stack: 0380 Entry point: 0009 OS9:dir /dd/lib Directory of /dd/lib 22:54:36 cgfx.l clib.l cstart.r sys.l Every program I try to compile I end up with this error! HELP!! Keith H. March There is 1 Reply. #: 11620 S3/Languages 04-Aug-91 22:56:53 Sb: #11599-#Help with C compiler Fm: Pete Lyall 76703,4230 To: Keith H. March 70541,1413 (X) Keith - A few questions: Are you using Carl Kreider's stuff? If so, are you using HIS ctsart.r? Are you using his/my 'cc'? Is there adequate free space in whatever directory your temp files are being written? The compiler/linker deals with space problems in a very uncool manner. Pete #: 11633 S3/Languages 05-Aug-91 20:41:48 Sb: #11620-#Help with C compiler Fm: Keith H. March 70541,1413 To: Pete Lyall 76703,4230 (X) Hello Pete: I am using cgfx ver 7 of the lib. The SRC de i The SRC dir is on the hard drive The cc that I am using is the one from tandy. Also the cstart.r The only thing that I modifided with the cc was for it to look at /dd instead of /d0 (/dd = 40 Meg hard drive) Keith P.S. It did work a while (while] back. :> There is 1 Reply. #: 11636 S3/Languages 06-Aug-91 00:59:14 Sb: #11633-#Help with C compiler Fm: Pete Lyall 76703,4230 To: Keith H. March 70541,1413 (X) There's the problem.. I believe c.prep and possibly c.link also have hard references to /d0.... Browse the DL3 area for a definitive listing of patches. Pete There is 1 Reply. #: 11647 S3/Languages 06-Aug-91 15:27:38 Sb: #11636-#Help with C compiler Fm: Keith H. March 70541,1413 To: Pete Lyall 76703,4230 (X) Pete: I also changed them too. Any program I try to compile it says that error. Keith There is 1 Reply. #: 11680 S3/Languages 08-Aug-91 18:34:33 Sb: #11647-#Help with C compiler Fm: Pete Lyall 76703,4230 To: Keith H. March 70541,1413 (X) Keith - Pardon the lag... I'm bopping between San Fransisco, Oakland, and Tampa these days. Did you browse the DL3 and DL10 areas for CC1 patches? That's probably the best way to start this. Pete There is 1 Reply. #: 11687 S3/Languages 09-Aug-91 04:48:01 Sb: #11680-#Help with C compiler Fm: Keith H. March 70541,1413 To: Pete Lyall 76703,4230 (X) Pete: I figuered it out, I THINK. I had rma and rlink renamed as c.asm and c.link on the hard drive /dd but not the module. I THOUGH I DID THAT THOUGH. I used EZGEN to do the following: ezgen /dd/cmds/c.asm l rma r c.asm v q Any how it works now, as before this error. I must have copyed the NEW asm , rma to the hard disk after I got it and forgot to rename it interenally. Thanks for the HELP. Another question, How do you set up a graphics screen under C? As far as I have gotten is, I can clear the screen and write my name there. THANKS AGAIN. Keith There are 2 Replies. #: 11729 S3/Languages 12-Aug-91 06:50:41 Sb: #11687-Help with C compiler Fm: Pete Lyall 76703,4230 To: Keith H. March 70541,1413 Keith - While I'm a long time C fan, I haven't done much graphics work with it... you'd be better off tweaking either Kevin or Mike Haaland... Pete #: 11733 S3/Languages 12-Aug-91 18:19:40 Sb: #11687-Help with C compiler Fm: Bruce MacKenzie 71725,376 To: Keith H. March 70541,1413 Keith, Here's my standard code for opening up a graphics window from within a C program: #define PATH fileno(wout) main() { FILE *win,*wout; win=fopen("/w","r+"); wout=fdopen(fileno(win),"w"); DWSet(PATH,8,0,0,40,24,15,0,0); Select(PATH); } This should get you up and going. If you have any other questions about the graphics library give a yell. #: 11716 S3/Languages 11-Aug-91 13:00:47 Sb: #C Fm: PHIL SCHERER 71211,2545 To: ALL Does anyone know how to generate a tab in C using the Microware 6809 compiler? Also is there a statement that works like Basic09 inkey. getchar requires a CR! There is 1 Reply. #: 11719 S3/Languages 11-Aug-91 15:45:22 Sb: #11716-#C Fm: Scott t. Griepentrog 72427,335 To: PHIL SCHERER 71211,2545 (X) To output a tab: putchar('\t'); However, it will not display on a CoCo window because code 9, normally used for tabs, is instead cursor up. There is no 'tab' on CoCo windows. To get a key, try the following routine: inkey() { char c; read(0,&c,1); return(c); } That reads one character from STDIN direct, places it in c, and returns tha value to the caller. StG There is 1 Reply. #: 11720 S3/Languages 11-Aug-91 15:54:10 Sb: #11719-C Fm: PHIL SCHERER 71211,2545 To: Scott t. Griepentrog 72427,335 (X) Thanks Scott -- I'll try that routine. #: 11723 S3/Languages 11-Aug-91 18:51:15 Sb: C function Fm: PHIL SCHERER 71211,2545 To: Scott T. Griepentrog Thanks Scott -- the inkey function does just what I need it to! #: 11734 S3/Languages 12-Aug-91 18:31:07 Sb: #inkey Fm: PHIL SCHERER 71211,2545 To: Scott t Griepentrog Hi Scott--I started using the function inkey and it does the job buttttt. The program will not execute the previous printf statement until the function returns. printf("this will not print"); ch=inkey(); printf("next statement"); If I enter the letter 'x' then what I will get is: xthis will not print next statement It will sit and wait down in the inkey function and after an entry, it will execute the previous printf and immediately the next printf ?????? There is 1 Reply. #: 11739 S3/Languages 12-Aug-91 21:08:11 Sb: #11734-inkey Fm: Bruce MacKenzie 71725,376 To: PHIL SCHERER 71211,2545 Phil, I think I can help you out here. First, all FILE I/O is buffered. C doesn't send anything to the screen until either a charage return is encountered or until its buffer is full ( 256 characters by default). If you want your first string to be sent to the screen before the inkey you either have to put a /n at the end of it or fflush(stdout). Second, the program hangs in inkey because it does its read system call without checking for data available. The os9 read call sits around waiting for a keypress if there is no data in the device driver buffer to send. You need to do something like: If(getstat(1,fileno(stdin))==0) read(fileno(stdin),&ch,1); Hope this makes sense. Buffering does make keyboard/screen I/O a bit clumsy at times. #: 11735 S3/Languages 12-Aug-91 18:46:54 Sb: #11471-#C Compiler Problem Fm: Jay Truesdale 72176,3565 To: James Jones 76257,562 (X) I'm just getting back to this C Compiler problem that I mentioned a couple of weeks ago, I've been pretty busy lately. Anyway, it appears that it is a compiler bug. Great. I've got this good sized structure that I need to initialize and I REALLY don't want to retype several hundred lines of initialization if I don't have to. Is there anyway to get around this problem? Something that I could do with a global change in an editor? I'll mess around with this myself a bit but I B no C guru.... I suppose that there no chance of getting Tandy to fix this? Grumble grumble... -J There is 1 Reply. #: 11744 S3/Languages 12-Aug-91 22:15:52 Sb: #11735-C Compiler Problem Fm: James Jones 76257,562 To: Jay Truesdale 72176,3565 I'd say there's minimal chance of getting Tandy to fix it. About the best one could do, at some expense in data space, is separately declare some pointers to the strings you have in the structure initializers, and--no, that wouldn't do it. Unfortunately, there's not a good way to do it, and even the least bad way would double the storage requirements for the strings. #: 11754 S3/Languages 13-Aug-91 01:42:25 Sb: #11720-#C Fm: Scott t. Griepentrog 72427,335 To: PHIL SCHERER 71211,2545 (X) Yikes, I didn't realize this stupid editor mangled my code. Gotta remember that. Normally, braces go in column 1... StG There is 1 Reply. #: 11760 S3/Languages 13-Aug-91 18:28:44 Sb: #11754-#C Fm: PHIL SCHERER 71211,2545 To: Scott t. Griepentrog 72427,335 (X) Hi Scott--Does it matter which column the braces go?? There is 1 Reply. #: 11854 S3/Languages 20-Aug-91 11:39:38 Sb: #11760-#C Fm: Jim Sutemeier 70673,1754 To: PHIL SCHERER 71211,2545 (X) No, Phil...doesn't matter where the braces go. This line is also acceptable (but less readable) in C --> inkey() {char c; read(0,&c,1); return(c);} You might have probs reading that line 6 months later if you do it that way, but it's legal. Jim Sutemeier SysOp BBS StG International Network Node 818:772-8890 There is 1 Reply. #: 11857 S3/Languages 20-Aug-91 20:03:06 Sb: #11854-C Fm: PHIL SCHERER 71211,2545 To: Jim Sutemeier 70673,1754 Thanks for the help Jim!! #: 11755 S3/Languages 13-Aug-91 01:48:41 Sb: #11734-#inkey Fm: Scott t. Griepentrog 72427,335 To: PHIL SCHERER 71211,2545 (X) Yup, It won't. There is two fixes: 1) put a \n on the first string. If you don't want to do that, 2) do a fflush(stdout); before the inkey. Actually, there's four. 3) use writeln() or write() instead (I highly suggest this - check out the difference in code size if you don't use any printf's!!) 4) there's a way to tell printf to use read/write calls intead of readln/writeln. I think it's doc'd somewhere under fopen (?). Personally, I do everything with read/write/readln/writeln. Everything. Even code I write on PC's - I have written a readln/writeln function for use there. The bottom line is - you're going direct to the system i/o. But the disadvantage is you have to put everything together into one string (or make multiple calls) and you don't have %d and %x. But then, I've written routines to do conversion to decimal and hex for printing too. It all depends on how much of what you are going to do. I hate mixing reads/writes and printf's, and I prefer not to use printf's at all if I can help it, but sometimes there's no better way. StG There is 1 Reply. #: 11761 S3/Languages 13-Aug-91 18:33:15 Sb: #11755-#inkey Fm: PHIL SCHERER 71211,2545 To: Scott t. Griepentrog 72427,335 (X) Hi Scott--What I dont understand is that when the program executes line after line it should have already finished the line before inkey. I need to understand whats going on. Please remember I'm about five weeks old in C!! There is 1 Reply. #: 11765 S3/Languages 13-Aug-91 21:24:55 Sb: #11761-#inkey Fm: Bill Dickhaus 70325,523 To: PHIL SCHERER 71211,2545 (X) Phil, The statement _is_ executed, but the output generated by the statement is "buffered". This means that the data is placed in a buffer, but not actually output to the path (in this case its not displayed on the screen) until one of several things happens: the buffer fills up, an end of line sequence (\n or a CR on the CoCo), or the buffer is "flushed" using the fflush() function. Bill There is 1 Reply. #: 11776 S3/Languages 14-Aug-91 17:39:39 Sb: #11765-#inkey Fm: PHIL SCHERER 71211,2545 To: Bill Dickhaus 70325,523 (X) Hi Bill--I think you're referring to the statement before the call to inkey? The thing I dont understand is why it isn't buffered if I dont have the call to inkey! There is 1 Reply. #: 11787 S3/Languages 15-Aug-91 07:21:00 Sb: #11776-#inkey Fm: Bill Dickhaus 70325,523 To: PHIL SCHERER 71211,2545 (X) Phil, Since you didn't include the whole program in your original message, I can't say for sure, but if those were the only statements in your program, then the buffer will get flushed when the path is closed (which I realize now I left out of my last reply) when the program ends. Bill There is 1 Reply. #: 11795 S3/Languages 15-Aug-91 18:03:13 Sb: #11787-inkey Fm: PHIL SCHERER 71211,2545 To: Bill Dickhaus 70325,523 (X) Thanks for your help Bill !! #: 11759 S3/Languages 13-Aug-91 18:27:25 Sb: #11739-#inkey Fm: PHIL SCHERER 71211,2545 To: Bruce MacKenzie 71725,376 (X) Hi Bruce--what inkey looks like is: inkey() { char c; read(0,&c,1) return c; } What I'm looking for is something to work like Basic09 inkey. I'm very new in C and I only understand simple stuff so far. I'm working from an ANSI C book and trying to bridge between the two. Thanks for any help!! There is 1 Reply. #: 11762 S3/Languages 13-Aug-91 19:05:11 Sb: #11759-#inkey Fm: Bruce MacKenzie 71725,376 To: PHIL SCHERER 71211,2545 (X) Phil, Your function can easily be modified so as not to hang in the read: inkey() { char c; if(getstat(1,0)==0) { read(0,&c,1); return c; } else return -1; } Here a returned value of -1 indicates that no key has been pressed. There is 1 Reply. #: 11775 S3/Languages 14-Aug-91 17:36:14 Sb: #11762-inkey Fm: PHIL SCHERER 71211,2545 To: Bruce MacKenzie 71725,376 (X) Thanks Bruce--I'll try it in a program! #: 11777 S3/Languages 14-Aug-91 17:55:28 Sb: #inkey Fm: PHIL SCHERER 71211,2545 To: BRUCE MACKENZIE 71725,376 (X) Hi Bruce--when I put in the extra lines, the program acted like: inkey() { return ; } It didn't wait to pickup a keyboard entry. There is 1 Reply. #: 11778 S3/Languages 14-Aug-91 18:57:47 Sb: #11777-#inkey Fm: Bruce MacKenzie 71725,376 To: PHIL SCHERER 71211,2545 (X) Oh, I thought you didn't want your inkey to hang up if no key had been pressed. If you want it to stop and wait for the next keypress then your original function should work adequately. Very often I need to check for a keypress and if no key is pressed continue with some action. In such a case having the program hang in the inkey can cause problems. So really, whats still troubling you is that printf() doesn't imediately output your string to the screen. Again, this is because all the standard library I/O functions are buffered. What this means is that rather than outputing the data imediately to the device driver the functions store the data in memory first. They wait until the buffer is full or until a charage return occurs in the data stream and then dump the data to the device driver in one block. If you want your data to go to the screen before the inkey you can force C to dump all the data in the file buffer to the output device by giving a fflush() command. There is 1 Reply. #: 11794 S3/Languages 15-Aug-91 18:02:03 Sb: #11778-inkey Fm: PHIL SCHERER 71211,2545 To: Bruce MacKenzie 71725,376 (X) Thanks Bruce--I'll look into fflush() ! #: 11823 S3/Languages 18-Aug-91 08:33:18 Sb: #11735-#C Compiler Problem Fm: Bruce MacKenzie 71725,376 To: Jay Truesdale 72176,3565 (X) Jay, I've run up against the same problem. It's a real pain having to type in string inializers in single character format. So I got to thinking why not write a conversion utility to expand the string notation to single character notation automatically. I did and I just uploaded the program to lib 3 where it will appear as soon as the sysop enables it. Have a look at 'strchar.ar' and see if it can help you out. There is 1 Reply. #: 11831 S3/Languages 18-Aug-91 21:28:53 Sb: #11823-C Compiler Problem Fm: Jay Truesdale 72176,3565 To: Bruce MacKenzie 71725,376 (X) EXCELLENT! Thanks for cranking out that program, I'll get a copy of it when it's available! I've been rackin' the ol' noggin trying to figure out some way to get tis thing to work, I never thought to just change the string specification format around.... Thanks again! -J #: 11863 S3/Languages 20-Aug-91 21:52:17 Sb: #Fixin' C Compiler Bug Fm: Jay Truesdale 72176,3565 To: all Well, here we go again! Consider the following C code with the character initialization changed by Bruce Makenzie's program. I added the terminating null character to each string myself. struct _mtable { char _mnem[8]; int _mvi; char _mvc; }; static struct _mtable mtable[3] = { {'!','d','u','m','m','y',0}, 1, 2, {'a','b','c','d',0}, 3, 4, {'a','d','d',0}, 5, 6 }; This looks fine to me but the C Compiler says: test4.c : line 10 **** } expected **** {'a','b','c','d',0}, 3, 4, ^ test4.c : line 10 **** ; expected **** {'a','b','c','d',0}, 3, 4, ^ test4.c : line 11 **** too many brackets **** {'a','d','d',0}, 5, 6 ^ test4.c : line 11 **** identifier missing **** {'a','d','d',0}, 5, 6 ^ test4.c : line 11 **** identifier missing **** {'a','d','d',0}, 5, 6 ^ test4.c : line 11 **** ; expected **** {'a','d','d',0}, 5, 6 ^ The C code looks OK to me according to my main reference, I'm going to dig out my other C books and have a look. It kinda looks to me like only the first chatacter is being assigned to the string variable. (?) In the meantime can anyone see what's going on here? This has to be a simple syntax problem. (I hope) Thanks, -J There is 1 Reply. #: 11868 S3/Languages 21-Aug-91 06:37:10 Sb: #11863-Fixin' C Compiler Bug Fm: Mike Haaland 72300,1433 To: Jay Truesdale 72176,3565 Try the following to initialize your structs: struct _mtable { char _nmen[8]; int _nmi; char _mvc; }; static strict _mtable mtable[3] = { {{'!','d','u','m','m','y','\0'}, 1, '\2'}, {{'a','b','c','d','\0'}, 3, '\4'}, {{'a','d','d','\0'}, 5, '\6'} }; That's the way you initialize Menu arrays under Multi-Vue. Let me know if it works for you! Mike #: 11962 S3/Languages 26-Aug-91 08:49:53 Sb: #Copyright? Fm: John Semler 70324,633 To: Sysop (X) I have a "copyright" question. My program "Scientific Calculator" uses some of the library routines from Carl Kreider "CLIBT.L" (OS9/6809 version) . Is his library copyrighted? Any conditions for using "CLIBT.L"? May I display a copyright message at the start of execution of my program? Are there any issues to be aware of when using the Microware C Library? I only want copyright protection for the concept "Scientific Calculator". A vastly improved version of Scientific Calculator will be uploaded soon! John There is 1 Reply. #: 11973 S3/Languages 26-Aug-91 19:31:22 Sb: #11962-Copyright? Fm: James Jones 76257,562 To: John Semler 70324,633 (X) I know of no license requirements on programs compiled using Microware's libraries. (It's not like GNU, though it looks like they may be changing their copyleft so that linking with their libraries does not make your compiled program a "derived work" and hence subject to their imposition of copyleft on your code.) One can't copyright concepts, just particular works. (Otherwise, someone would have copyrighted, say, 12-bar blues, and have LOTS of $$$. :-) #: 11975 S3/Languages 26-Aug-91 21:56:48 Sb: #Copyright? continued Fm: John Semler 70324,633 To: James Jones It sounds like you know alot about copyrights so I ask a few questions. Is a "copyleft" legally binding? Was there any court cases where GNU went after people violating this so called "copyleft"? Does the international community recognize the term "copyleft"? Is there a book on how to copyleft software? I got the book "How to Copyright Software" by M. J. Salone, and it said nothing about copyleft. I personally suspect GNU is trying to intimidate people from protecting their intellectual property. The book says nothing about incorporating routines from a library (I am most worried when it is public domain, i.e. "CLIBT.L"). Instead it makes the claim that the copyright office doesn't make a distinction between compiled program and source code. (medium independence?) I just want to display my copyright to remind people not to exploit my work for commercial purposes. (BTW I am unemployed) Re: "copyrighting concepts": Your right, I only want to copyright my work! John P.S. Sorry I can't thread the message. This message was uploaded using B+ protocol but CompuServe doesn't let on on how to chain it into the thread. Seems like most of the bucks is spent in fighting the system! There are 2 Replies. #: 11976 S3/Languages 26-Aug-91 22:02:55 Sb: #11975-Copyright? continued Fm: James Jones 76257,562 To: John Semler 70324,633 (X) To the best of my knowledge, "copyleft" has yet to be tested legally. It is an attempt to further Richard Stallman's notions of intellectual property (he thinks there's no such thing), and is typically accompanied with derogatory labels applied to those who disagree (e.g. "software hoarders"). I'm not a lawyer, though, nor do I play one on TV. :-) If you really want good advice, ask a lawyer. #: 11985 S3/Languages 27-Aug-91 08:23:26 Sb: #11975-Copyright? continued Fm: Bill Dickhaus 70325,523 To: John Semler 70324,633 (X) John, Assuming that you are using the COMpose command, then using /UPL to invoke B+, all you need to do is use REPly #, instead of COMpose, where # is the message number you are replying to. The rest is the same, and all you'll have to do at the Post Action prompt is enter POSt. The Subject: and To: fields will be filled in for you. If you want to fool around with learning the system, GO PRACTICE, this is a _free_ forum (except for network charges) . Bill #: 12044 S3/Languages 01-Sep-91 22:48:09 Sb: copyrignt Fm: Carl Kreider 71076,76 To: 70324,633 John, No there are no conditions for using my library. I have a bit of RMS in me, I guess. I am not as radical as he, so I don't hold with his copyleft. But I do believe that the community of users can benefit from the work of others and it is useful to share. So I have shared and I don't expect something in return ... I got help to start too. My sharing is my way of paying back the community. - Carl #: 12054 S3/Languages 02-Sep-91 22:02:57 Sb: #C fun Fm: Bob van der Poel 76510,2203 To: all I ran into an interesting problem the other night. I code the following line: if(a==b==3)... Of course, what I meant was: if(a==3 && b==3)... Interesting thing is that the compiler accepted the code with no errors or warnings. Looking at the assembler output it seems that the statement was converted to if(a==3). I would think that if anything it should have converted to: if(b==3){ if(a==TRUE)... } or something like that? Does anyone know what the legit conversion should be? Might be a nice bit of triva... There is 1 Reply. #: 12056 S3/Languages 03-Sep-91 01:13:54 Sb: #12054-#C fun Fm: James Jones 76257,562 To: Bob van der Poel 76510,2203 (X) This is one of many places in which C's sloppy type system trips one up. The relational operators have a result of type int, and, oddly enough for a descendant of BCPL, relationals don't elide in the way you were hoping for (BCPL itself would have done what you wanted, I believe). So... if (a == b == 3) compares a with b, and then compares 1 with 3 if they are equal, 0 with 3 if they are not. Since neither 1 nor 0 are equal to 3, the condition will never be true, and the then clause of the if will never be reached. There are 2 Replies. #: 12057 S3/Languages 03-Sep-91 01:51:17 Sb: #12056-#C fun Fm: Kevin Darling 76703,4227 To: James Jones 76257,562 (X) Holy vocabulary, Batman! "...relationals don't elide..." ????! I sure had to look up "elide"! Say, you don't happen to write manuals, do you... :-) There are 2 Replies. #: 12058 S3/Languages 03-Sep-91 07:17:45 Sb: #12057-C fun Fm: James Jones 76257,562 To: Kevin Darling 76703,4227 (X) Heck, no; there are professionals that do that. One of their jobs, I'm sure, is to avoid phrases like that. :-) #: 12060 S3/Languages 03-Sep-91 21:02:18 Sb: #12057-C fun Fm: Bob van der Poel 76510,2203 To: Kevin Darling 76703,4227 (X) Hey, even after I looked up "elide" I still didn't know what that line meant . But I've make a note of it--maybe I can use it in a future manual. BTW, did you get my comments on the ss_size call I emailed? #: 12059 S3/Languages 03-Sep-91 21:01:57 Sb: #12056-C fun Fm: Bob van der Poel 76510,2203 To: James Jones 76257,562 (X) Thanks for the explanation. Actually, I figured that it would end up doing the comparison with TRUE to 3. I just compiled to assembler and sure enough, that's what's happening. When I got the error (and it was not with a,b and 3) I did the compile to assembler too, and I'm sure I got a different result at the time. I must have been tired. Actually, most Basics do the same type of evaluation (even though some use -1 instead of 1). One can write real impossible to figure out code using the results! #: 12261 S3/Languages 16-Sep-91 00:22:10 Sb: #Basic-09 + RunB vs. C Fm: Erich Schulman 75140,3175 To: ALL Why is it that compiled/PACKed Basic09 programs rely on RunB for execution but compiled C and Pascal programs seem to be able to stand on their own? Is there any way to "reduce" Basic-09 I-code to even closer to true assembler-generated code? There is 1 Reply. #: 12263 S3/Languages 16-Sep-91 02:49:06 Sb: #12261-#Basic-09 + RunB vs. C Fm: Kevin Darling 76703,4227 To: Erich Schulman 75140,3175 (X) Packed basic09 programs aren't compiled, you see... but crunched down to a tokenized form (more or less). To save space on systems, RunB is used to execute the info. 68K systems are the same, and even go further... the math and I/O functions of C and other compiled languages are usually handled by shared modules. All of this, of course, helps save room. I'm not sure if any company has ever done a basic09-compatible compiler, altho I believe there have been other such Basic(s). Anyone know for sure? There is 1 Reply. #: 12265 S3/Languages 16-Sep-91 03:16:42 Sb: #12263-#Basic-09 + RunB vs. C Fm: James Jones 76257,562 To: Kevin Darling 76703,4227 (X) Shudder--you said the T-word (tokenized). I-code is like Pascal P-code, in a way; it's code for an abstract machine. If one really wanted to, one could create a chip that ran it directly, as someone did for P-code. (Of course, one could claim that the tokenized form of generic Microsoft BASIC is code for an abstract machine, too, but the transformation done to get from what one types to that form is pretty trivial, and the abstract machine would be quite ugly and inefficient.) There is 1 Reply. #: 12266 S3/Languages 16-Sep-91 20:53:42 Sb: #12265-#Basic-09 + RunB vs. C Fm: SCOTT HOWELL 70270,641 To: James Jones 76257,562 (X) You have mentioned a term frequenlty used but rarely defined. What is an abstract machine anyway!! There is 1 Reply. #: 12273 S3/Languages 17-Sep-91 06:50:58 Sb: #12266-#Basic-09 + RunB vs. C Fm: James Jones 76257,562 To: SCOTT HOWELL 70270,641 (X) An abstract or virtual machine is one that doesn't exist on silicon (or gallium arsenide if you have the bucks, or whatever--any physical implementation). Suppose nobody had ever actually made a 6809. One could still write an assembler for it, or compilers that generate 6809 instructions, but to run any of the resulting programs would require an interpreter (maybe emulator is the right term). There is 1 Reply. #: 12288 S3/Languages 19-Sep-91 13:59:49 Sb: #12273-Basic-09 + RunB vs. C Fm: SCOTT HOWELL 70270,641 To: James Jones 76257,562 (X) good explanation,thanks. exit #: 12525 S3/Languages 07-Oct-91 03:12:03 Sb: #Logo and MASM Fm: REX GOODE 73777,3663 To: Pete Lyall 76703,4230 (X) Pete, I don't know if you've seen my other messages about trying to get Logo to work on a CM-8, but I think I've come up with something that will work. Problem is, I'm so green in OS9, that I don't quite know what to do. I stumbled on MASM.BIN in the libs and thought, "Hey, that's just what I need." I haven't got Deskmate working yet and still don't have a smooth way of getting files from CIS to OS9, so I tried the following: 1. I downloaded MASM.BIN to my IBM AT. (also DEMO1.TXT) 2. I used AS9TOOLS to copy MASM.BIN to RS-DOS diskette. I tried two versions: [TOC MASM.BIN p b] & [TOC MASM.BIN d b]. If you aren't familiar with AS9TOOLS, "p b" is program file/binary and "d b" is data file/binary. (also DEMO1.TXT) 3. I then tried to use DOSOR9 to make an OS9 disk out of it, but TOC must write the files to track 0, therefore DOSOR9 wouldn't work. 4. Then I use RSDOS' copy to get a new RSDOS diskette with MASM.BIN. 5. Then I use DOSOR9 successfully to make an OS9 disk. 6. Then I used OS9 to copy to a regular OS9 disk. (just to be safe) 7. I had a few problems with write permission on the files but I seemed to have solved them. [More] There is 1 Reply. #: 12526 S3/Languages 07-Oct-91 03:12:13 Sb: #12525-#Logo and MASM Fm: REX GOODE 73777,3663 To: REX GOODE 73777,3663 (X) [Continued] 8. When I do the following commands, I get a #215 error. OS9: chx /d0 OS9: chd /d0 OS9: MASM demo1.txt Both MASM and demo1.txt are on the root directory. I've tried more specific versions of that last command, like: /D0/MASM /D0/DEMO1.TXT, always with the same result. I've never, ever, in my whole life, run anything on OS9 that I didn't buy a whole disk for, meaning, I don't really even know how to get an executable binary file to work. Where did I go wrong? Rex There is 1 Reply. #: 12527 S3/Languages 07-Oct-91 08:37:03 Sb: #12526-#Logo and MASM Fm: Pete Lyall 76703,4230 To: REX GOODE 73777,3663 (X) REx - Did you set MASM's file attributes so that they allow execution? Try this (assumes you have only 1 disk drive): 1. Load attr 2. Insert MASM disk 3 chx /d0;chd /d0 4. attr /d0/masm e pe Now it should execute. Pete There is 1 Reply. #: 12530 S3/Languages 07-Oct-91 09:49:36 Sb: #12527-#Logo and MASM Fm: REX GOODE 73777,3663 To: Pete Lyall 76703,4230 (X) Pete, Thanks, that works. I'll check out BOILER.ASM. DEMO1.TXT didn't work so well. Got tons of errors. I can almost taste that hi-res LOGO. Rex There is 1 Reply. #: 12531 S3/Languages 07-Oct-91 17:12:08 Sb: #12530-Logo and MASM Fm: Pete Lyall 76703,4230 To: REX GOODE 73777,3663 Rex - Bear in mind that BOILER.ASM was written with OS9's ASM in mind. If using MASM, it may have a different MACRO for header generation, etc. Also - if you're getting errors, it may be because you don't have the files or path specified in the USE nnnnnn... directives. Essentially,, USE is just saying 'include file nnnnn at this point'. Frequently used for specifying EQUATES, RMBs, etc. Pete #: 12636 S3/Languages 18-Oct-91 11:29:29 Sb: Basic/Term Libaries Fm: SCOTT HOWELL 70270,641 To: ALL Would it be possible for termcap routines to be written for Microware Basic (68k). I know with 'C' I can use the /h0/lib/termlib.l termcap routines and I remember that under the CoCo I could call machine language graphics routines (remember GFX2). So, could there be some equivelent routines written to be called by Basic's RUN statement? Press !>c? Is it Static? BTW, Is the mail in offer still in effect for VED/68k. The letter dated July 8 ,1991 stated there were some bugs found in the first Version of VED/68k. One thing I niticed with Ved that may be a bug or may be my terthte fle E trsakto the top of the file. Ved should go to the next line on the next page. There is 1 Reply. #: 12642 S3/Languages 19-Oct-91 22:52:05 Sb: #12640-#Basic/Term Libaries Fm: Bob van der Poel 76510,2203 To: SCOTT HOWELL 70270,641 (X) The DIM statement reserves variable space only as long as the particular procedure is active. If you DIM WOOF:INTEGER in proc1 the storage will stay around when you call proc2. However, in proc2 all the variables will disappear after you return to proc1. This creates some problems (yes, you can work around them) when a 'subroutine' like termcap i/o needs to initialize a bunch of stuff early on and then access it later. What you typically do is to have the basic startup code pass a variable where the stuff can be stored. Then you have to pass that variable around to all the other procs so that if you need to call the termcap stuff it will know where the data is. One other way around this is to have the termcap functions save its stuff in a data module. I've been thinking about this while raking leaves--might just give a go myself and see what comes out. I think that if folks could access termcap from Basic you might see more quickie utils, etc. written. The only thing I have to resolve in my own mind is what output routine to use (should termcap assume stdout, or should basic pass it a path, or perhaps have termcap call back to basic?? gotta rake some more leaves for this one). Hold on to your VED for a few more days. I'm sending out a letter (hopefully by the end of next week) with a new upgrade announcement (1.3) as well as special deal on a product. Don't know if the bug you mentioned is a version 1.0 thing or termcap. If the cursor _actually_ goes back to the top of file then I suspect a bug (even though it works fine here), if it just gets positioned wrong I'd have a look at the termcap entry. There is 1 Reply. #: 12643 S3/Languages 20-Oct-91 13:46:07 Sb: #12642-#Basic/Term Libaries Fm: SCOTT HOWELL 70270,641 To: Bob van der Poel 76510,2203 (X) Yea your right. About the Termcap stuff, I added the 'sf' and the 'al' in Termcap and every thing works fine now. I even have one line scroll now, Nice.. How hard would it be to write an interactive editor/compiler for 'C' and Basic?? could interface directly to Umacs?? Scott Howell There is 1 Reply. #: 12644 S3/Languages 20-Oct-91 18:14:14 Sb: #12643-#Basic/Term Libaries Fm: Bob van der Poel 76510,2203 To: SCOTT HOWELL 70270,641 (X) Scott, glad that the termcap stuff is working good now. An interactive editor for C and Basic -- sounds like a tall order. And please, don't use words like Umacs in messages to me . Actually, when I do basic stuff I have Ved running in one window and basic in another. I use Ved to do the editing and just keep re-loading the file from Basic. A bit tedious, but much better than fooling with the Basic editor. BTW, where have all the users on this forum gone? A real lack of messages the last few days. Don't tell me I'm going to have to sign up on that other system to keep informed... There is 1 Reply. #: 12645 S3/Languages 20-Oct-91 18:54:12 Sb: #12644-#Basic/Term Libaries Fm: SCOTT HOWELL 70270,641 To: Bob van der Poel 76510,2203 Ved, thats right . Right now I am in the process of learning Ved. Since keys are user definable, learning is pretty easy! What is nice about Ved is the Ved_env.file so I can use REAL UP/DN keys on my IBM instead of the cntl chars. Where did all the people go! Seems most of the activity is us!!. Kinda feels lonely dos'nt it?? There is 1 Reply. #: 12650 S3/Languages 20-Oct-91 21:38:51 Sb: #12645-Basic/Term Libaries Fm: Kevin Darling 76703,4227 To: SCOTT HOWELL 70270,641 GRIN. Actually everyone must be busy writing programs or something :-) Or, at least, reading about what y'all are up to! #: 12655 S3/Languages 20-Oct-91 23:49:40 Sb: #OS9 Assembly Fm: Brother Jeremy, CSJW 76477,142 To: All Dear Friends: I am looking for copies of the following books: 6809 Assembly Language Programming by Lance Leventhal The MC6809 Cookbook by Carl Warren. I understand that both of these are out of print. If you have a copy which you would be willing to sell, please let my know as to price, etc. If there are any other book that you could recomend, please let me know. I have Bill Barden's and Laurence Telpolt's books already. This leads me to several questions which I would like to raise. These last two books were written for assembly language programming under RS-DOS. I know that RS-DOS assembly language programming is different from OS-9 assembly language programming. Why? I know that under OS9 Level 1 and 2 code must be position independent. Would a program written un RS-DOS work under OS-9 if it were written as position independent code? Finally is it possible, or worth it, to rewrite position dependent code to position independent code? Or would you have to take each section of position dependent code and convert to modules which could then be managed by some sort of 'skeleton program.' (I have absolutely no idea of what I am talking about, but it sure sounds impressive anyway.) I know that this is a lot to ask, but if anyone has some sort of bibliography which would help me learn this, perhaps a course outline or reading list, etc., which they would be willing to share, please let me know. I really would love to learn more about programming, but in my present obligations, I am not free to be able to take any college courses, so I have to do this on my own. I look foreward to your replies. With all best wishes, Br. Jeremy, CSJW There are 5 Replies. #: 12656 S3/Languages 21-Oct-91 00:19:34 Sb: #12655-#OS9 Assembly Fm: Kevin Darling 76703,4227 To: Brother Jeremy, CSJW 76477,142 (X) It's definitely possible to someone's position-dependent code and change it to position-independent (I had to do that for Kyum-Gai game which was written for RSDOS)... but I don't recommend it for fun . Basically, you have to look for anywhere that the programmer had hardcoded an address, and change it to position-independent code (PIC). And wherever he used the jump instruction (JMP) had to be changed to branch (LBRA). Same for subroutine calls, of course. Some of that can be done with an editor in global-replace mode. Some is harder to find. I was about to say that I'd donate a copy of Leventhal's 6809 book, but looking at my shelf, I must have loaned it out long ago :-) kev There is 1 Reply. #: 12662 S3/Languages 21-Oct-91 22:41:41 Sb: #12656-OS9 Assembly Fm: Brother Jeremy, CSJW 76477,142 To: Kevin Darling 76703,4227 (X) Thank Kevin, it's a start. --Br. Jeremy, CSJW #: 12657 S3/Languages 21-Oct-91 12:53:44 Sb: #12655-#OS9 Assembly Fm: Erich Schulman 75140,3175 To: Brother Jeremy, CSJW 76477,142 (X) You might be interested in a book that is IN print, albeit not specifically geared toward the CoCo. The book is "Programming the 6809" by Rodnay Zaks and William Labiak (Sybex 078-4, $21.95). Since bookstores order by ISBN number, you might want to give them this book's number which is 0-89588-078-4. It took my local bookstore 3 months to get it so be prepared for a long wait. You may also be able to find more available books online. Books In Print is on CIS, tho I've never used the service. GO INDEX to find it. Be forewarned that this is a surcharged service. There is 1 Reply. #: 12663 S3/Languages 21-Oct-91 22:42:45 Sb: #12657-OS9 Assembly Fm: Brother Jeremy, CSJW 76477,142 To: Erich Schulman 75140,3175 (X) Thank you for your reply. I will let you know if I can locate a copy. --Br. Jeremy, CSJW #: 12660 S3/Languages 21-Oct-91 21:32:18 Sb: #12655-#OS9 Assembly Fm: Bob van der Poel 76510,2203 To: Brother Jeremy, CSJW 76477,142 (X) MaGraw-hill have an online ordering thingie here on CIS. Have you checked there for the Leventhal book? This book has been my programming bible for a long time (and no, it's not for sale!). (BTW, the 6809 one is much better than the 68000 version I bought--the 68000 book is almost totally useless due to the poor index, I believe there are better choice around for this). The only other book I've used is one written by Bill Barden and published by Radio Shack. You might get lucky and find a dusty one at a Shack store, but it has been out of print for quite some time. The thing that I wonder about is: what happens to all those old computer books. I'm quite a used book store prowler, and I never see them there. Maybe someone should set up a mail order used computer book store-or is there already one around? There is 1 Reply. #: 12664 S3/Languages 21-Oct-91 22:45:45 Sb: #12660-#OS9 Assembly Fm: Brother Jeremy, CSJW 76477,142 To: Bob van der Poel 76510,2203 (X) Dear Bob, I have Bill Barden's book. I am looking for things which might be a little more COCO3 specific. If I remember, I believe that I saw your assembly library. I will be downloading a copy. Someone said that you sell the source for it. I will be ordering that as soon as my resources allow. --Br. Jeremy, CSJW There is 1 Reply. #: 12673 S3/Languages 22-Oct-91 21:25:04 Sb: #12664-OS9 Assembly Fm: Bob van der Poel 76510,2203 To: Brother Jeremy, CSJW 76477,142 (X) I would not waste too much time looking for coco3 specific assembler stuff. The best way to start is to have a look at short assembler programs avail here and start to figure out how things work, and then start making changes. Yes, the source for my assembler library is avail. I don't sell it, but I ask people to send in a donation to compensate for my time, etc. I suggest $20.00 in something or other I wrote, but it's really up to the individual (more or less $$, it's up to you). #: 12676 S3/Languages 22-Oct-91 22:21:48 Sb: #12655-#OS9 Assembly Fm: Paul Tesch 73500,3703 To: Brother Jeremy, CSJW 76477,142 (X) I have a copy of Leventhal's "6809 Assembly Language Programming" and "Programming the 6809" by Zaks and Labiak. I'd be willing to let you have one or the other (but definitely not both) for the cost of postage. Let me know which one you'd prefer and where I should send it. Paul There is 1 Reply. #: 12677 S3/Languages 22-Oct-91 23:11:40 Sb: #12676-OS9 Assembly Fm: Brother Jeremy, CSJW 76477,142 To: Paul Tesch 73500,3703 Dear Paul, I would be most interested in Leventhal's book. My mailing address is: Br. Jeremy, CSJW Box 1903 Racine, WI 53401 Thank you for your time and kind offer. With all best wishes, Br. Jeremy, CSJW #: 12680 S3/Languages 23-Oct-91 21:17:28 Sb: #12655-#OS9 Assembly Fm: John R. Wainwright 72517,676 To: Brother Jeremy, CSJW 76477,142 (X) Hi Br. Jeremy, (I'm the bald-headed character you met at the door as you were leaving the COCOFest in Chicago last April). I finally got that MM/1. I will keep MOST of my COCO stuff, but I do have a copy of "The MC6809 Cookbook" by Carl Warren that I don't really need. Send me your address - no charge for the book, it needs to belong to someone who will use it. John Wainwright There is 1 Reply. #: 12681 S3/Languages 23-Oct-91 21:56:57 Sb: #12680-OS9 Assembly Fm: Brother Jeremy, CSJW 76477,142 To: John R. Wainwright 72517,676 Dear John: First let me correct you, you were the fellow with the high-forehead (Hey my head is now the "land which knows no parting". Thank you for your kind offer. My address is: Br. Jeremy, CSJW Box 1903 Racine, WI 53401 ps. You might want to try Rogaine. With all best wishes, Br. Jeremy ,CSJW #: 12691 S3/Languages 25-Oct-91 19:56:44 Sb: #12681-#OS9 Assembly Fm: John R. Wainwright 72517,676 To: Brother Jeremy, CSJW 76477,142 (X) I'll get the book in the mail this weekend - it's a good (very good) tech reference on the 6809. I'm sure you must have heard: "The Lord made only a very few perfect heads - he covered the others with hair". My head has been just about "perfect" since I was 18. I'm kinda used to it. :) John Wainwright There is 1 Reply. #: 12693 S3/Languages 25-Oct-91 22:56:46 Sb: #12691-#OS9 Assembly Fm: Brother Jeremy, CSJW 76477,142 To: John R. Wainwright 72517,676 Dear John: You might enjoy reading 2Kings 2:23-24. Thank you for your kindness. --Br. Jeremy, CSJW There is 1 Reply. #: 12697 S3/Languages 26-Oct-91 08:28:02 Sb: #12693-OS9 Assembly Fm: Mike Haaland 72300,1433 To: Brother Jeremy, CSJW 76477,142 Hehehehe! 2Kings 2:23-24. If memory serves, that's, a group of youths were saying to Elisia, "Go on up, you Baldhead!" So he cursed 'em and a bear came and maulded 42 of the youths. Is that the passage? Lemme run a check.... Yup! Anyway, It's nice to know that John, you and I have a Prophet that had the same condition. &8^) or is it (8^) Mike #: 12692 S3/Languages 25-Oct-91 22:50:11 Sb: #12677-#OS9 Assembly Fm: Paul Tesch 73500,3703 To: Brother Jeremy, CSJW 76477,142 (X) The book is now in the hands of the U.S. Postal Service. Hopefully you'll see it in the not too distant future. The postage was little enough that I think I'll just write off the whole thing as an investment in potential OS9 software. There is 1 Reply. #: 12694 S3/Languages 25-Oct-91 22:58:08 Sb: #12692-OS9 Assembly Fm: Brother Jeremy, CSJW 76477,142 To: Paul Tesch 73500,3703 Dear Paul: Thank you for your kindness. I only hope that I am able to produce some programs which will be of use to the OS9/COCO community. With all best wishes, Br. Jeremy, CSJW Press !> #: 12707 S3/Languages 26-Oct-91 19:07:57 Sb: #12697-#OS9 Assembly Fm: Brother Jeremy, CSJW 76477,142 To: Mike Haaland 72300,1433 (X) One of my favorite passages of scripture. -Br. Jeremy, CSJW There is 1 Reply. #: 12709 S3/Languages 26-Oct-91 20:43:17 Sb: #12707-#OS9 Assembly Fm: John R. Wainwright 72517,676 To: Brother Jeremy, CSJW 76477,142 (X) I knew there was something I liked about bears. There is 1 Reply. #: 12728 S3/Languages 27-Oct-91 22:45:12 Sb: #12709-OS9 Assembly Fm: Brother Jeremy, CSJW 76477,142 To: John R. Wainwright 72517,676 (X) Dear John: When I was in seminary, and more worried about hair loss, I remembered reading about an Old Folk cure of massaging Vicks Vap-O-Rub into the scalp. I can't say that it did anything for the hair, but my sinuses were great. Well I guess this Forum Thread is wearing thin, (at least my hair is)... With all best wishes, Br. Jeremy, CSJW #: 12710 S3/Languages 26-Oct-91 20:50:55 Sb: #12693-OS9 Assembly Fm: John R. Wainwright 72517,676 To: Brother Jeremy, CSJW 76477,142 (X) Whew! Just checked. Two bears and they were she-bears yet. Gonna have to show that one to a couple nephews. #: 12749 S3/Languages 28-Oct-91 20:10:44 Sb: #12660-OS9 Assembly Fm: Bert Schneider 70244,427 To: Bob van der Poel 76510,2203 You can also call Motorola and ask for their free 6809 software book! #: 12756 S3/Languages 28-Oct-91 23:03:38 Sb: Old Computer Books Fm: Paul Rinear 73757,1413 To: Brother Jeremy Caught the thread on 6809 assembler books and someone asked "where do all the old computer books go". I don't usually plug stores but this one is pretty interesting: Business & Computer Bookstore BBS: 215-657-6130 2400/1200/300 Voice: 215-657-8300 or 800-233-0233 213 N. Easton Rd. Willow Grove, Pa. 19090 They show up at the local hamfests out here and have a fairly large selection. Paul R. #: 12770 S3/Languages 30-Oct-91 04:58:52 Sb: #12756-#Old Computer Books Fm: Ed Gresick 76576,3312 To: Paul Rinear 73757,1413 (X) Paul, From your message to Brother Jeremy may I assume you live in the Phila. area? Are you a member of PACS? And do you know we have a very active OS-9 group? We meet the first Saturday of the month (next meeting this coming Saturday) in Horsham. If you're interested, give me a call at 302-378-2555. Ed Gresick - DELMAR CO There is 1 Reply. #: 12786 S3/Languages 31-Oct-91 16:55:03 Sb: #12770-Old Computer Books Fm: Paul Rinear 73757,1413 To: Ed Gresick 76576,3312 (X) Actually I live in Aberdeen NJ which is about an hour from Philly. #: 12775 S3/Languages 30-Oct-91 23:33:38 Sb: Thank you Fm: Brother Jeremy, CSJW 76477,142 To: Paul Tesch 73500,3703 (X) Dear Paul: I received the book "6809 Assembly Language Programming By Leventhal" which you so kindly sent. I was so thrilled when I opened the package. I must confess it looks a bit overwhelming, but it is nice to know that if I need help, there are so many wonderful people out there who are willing to help. With all best wishes, Br. Jeremy, CSJW #: 12787 S3/Languages 31-Oct-91 19:25:34 Sb: #12749-#OS9 Assembly Fm: Bob van der Poel 76510,2203 To: Bert Schneider 70244,427 (X) >> You can also call Motorola and ask for their free 6809 software book! Do you happen to know if they have a 680x0 book too (and maybe a phone #?). Also, does anyone know if Synetics has literature avail on the 68070 and how one might get a hold of it? There are 2 Replies. #: 12793 S3/Languages 01-Nov-91 10:04:47 Sb: #12787-OS9 Assembly Fm: Jim Sutemeier 70673,1754 To: Bob van der Poel 76510,2203 (X) Can't remember the phone number of Signetics, but it is in the 408 area code. If you call them, and request data sheets and specs on the 68070 and the VSC chip, they'll priority mail to you some really good booklets on the chips. Also, contact Microware, and for $10 (for S&H, I assume), they'll send you out the OS9 source book, a couple of issues of their Pipelines Magazine, and some other stuff about OS9. Both what Signetics sends, and what Microware sends, are excellent reading material - well worth the phone-call-investment, and S&H charges that MW charges. jim Sutemeier #: 12812 S3/Languages 02-Nov-91 10:47:57 Sb: #12787-OS9 Assembly Fm: Bert Schneider 70244,427 To: Bob van der Poel 76510,2203 Yes Motorola should, and as far as Signetics goes, here is their number: (408) 991-2000 Just ask for the User Manual for the 68070 (it is two parts). Part 1 is for Hardware and Part 2 is for Software. They are free!!!! Take care. Bert Schneider #: 12820 S3/Languages 02-Nov-91 19:37:50 Sb: #12812-OS9 Assembly Fm: Bob van der Poel 76510,2203 To: Bert Schneider 70244,427 Thanks for the number. I'll give them a call first think monday. #: 12833 S3/Languages 03-Nov-91 10:21:50 Sb: #12787-OS9 Assembly Fm: Jim Peasley 72726,1153 To: Bob van der Poel 76510,2203 Bob; Signetics has lots of literature that they'd like to send you! :-) I asked for info on the 68070, 66470 (VSC), and the I^C interface and they sent me about 4 lbs. of manuals and brochures. 68070 User manual part I - hardware : everything you always wanted to know about the CPU chip. 68070 User manual part II - software : Instructions, timings, I^C data, DMA specs, MMU stuff, and more. 66470 Video/System Controller : programming examples, PIXAC data, etc. Signetics 811 E. Arques Ave. P.O. Box 3409 Sunnyvale, CA. 94088-3409 (408) 991-2000 I talked to an Application Engineer named Bill Houghton (X 3560) who was very helpful when I told him what I wanted to do. They have offices all over the world - you may want to contact the one in Ontario - Signetics Canada Ltd. 1 Eva Road Suite 411 Etobicoke, Ontario M9C 4Z5 (416) 626-6676 Hope this helps, ...Jim #: 12920 S3/Languages 06-Nov-91 18:13:54 Sb: #12820-OS9 Assembly Fm: Bert Schneider 70244,427 To: Bob van der Poel 76510,2203 No problem! I hope they can help you! Most places will go out of their way to do so. Best of luck! (o) (o) U \___/ Bert Schneider Press !> #: 12925 S3/Languages 06-Nov-91 23:23:30 Sb: 6809 Book Fm: Brother Jeremy, CSJW 76477,142 To: John Wainwright, 72517,676 Dear John: Please forgive me for not thanking you sooner. The book arrived last week. I have been pouring through it, and I am actually understanding some of it. Thank you again for your kindness. With all best wishes, Br. Jeremy, CSJW #: 13683 S3/Languages 25-Dec-91 23:38:27 Sb: #13272-OS-9/68000 Assembler Fm: Mike Knudsen 72467,1111 To: Bud Hamblen 72466,256 (X) Must be some kinda mistake. There are lots of "complete idiot" books for 80x86 series CPUs, and MessyDOG. Your being on this forum disqualifies you from being a Cokmkplete Idiot. Sorrry :-) #: 13691 S3/Languages 26-Dec-91 09:37:42 Sb: #13337-OS-9/68000 Assembler Fm: Kevin Darling 76703,4227 To: Bud Hamblen 72466,256 (X) Hi again... a reminder: if you get an error or can't figure out which library to link in, etc... just post the info and question here. That should save some hair-tearing, and it won't take long from that point to where you'll find it all second-nature! cheers - kev