Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. zBuilder

    PIC 16f84 Assembly Language Programming questions

    I'm familiar with MPlab & MPASM, and have done a little bit of programming with the PIC. The only way, except using the eeprom, to do a lookup table in with a PIC MCU is to do something like this: Put the number to be "looked up" in W and then, call getdigit ;code below is a...
  2. zBuilder

    Strange Memory Problem!!!!!!!!!

    I have no idea how your my_malloc functions, but it could be due to segment wrap around. What value does the cohesion pointer start out at? Kim_Christensen@telus.net http://www3.bc.sympatico.ca/Kim_Christensen/index.html
  3. zBuilder

    Setting system variables on Win 2000

    I'm assuming you are writing win32 console applications and not DOS programs. You may be able to use the keybd_event() win32 API function call to do this. I haven't tried it. I do know that the API function SetKeyboardState() won't change the caps lock key in Win32... Win2000 may not allow an...
  4. zBuilder

    How to get fresh copy of #include "myconf.h" ??

    #include directives just "paste" the contents of the file named as is where the #include is placed. There is no magic here. Yes.... You have to re-compile everytime you change your source code if you want the changes to be relected in the EXE What you may want to do instead, is place...
  5. zBuilder

    Is it possible to run wave files (.wav) thru' C? Urgent.....

    In Windows it is different. I haven't done any wave playback in Win32. In Win16 you could just use sndPlaySound(lpszSoundName, wFlags) where lpszSoundName is a string depicting the wavefile name and wFlags is either SND_SYNC or SND_ASYNC. Other options, such as playing a WAV file from a resource...
  6. zBuilder

    Is it possible to run wave files (.wav) thru' C? Urgent.....

    Ok... As per your e-mail here's code of how to do it in DOS: Note: The commands to access IO ports may be different on your compiler. /* Code to playback an 8bit *.wav file */ #include <stdio.h> #define PORT 0x220 /* Soundblaster Base Port, change to 0x240 or whatever */ /* for...
  7. zBuilder

    Converting a VC++ .rc file to a CB Form

    Another idea is to compile the EXE using VC++ and then load the EXE into the Borland resource compiler and resave it as an RC file. Used to work with older Borland resource editors... Kim_Christensen@telus.net http://www3.bc.sympatico.ca/Kim_Christensen/index.html
  8. zBuilder

    to get date and time....

    For the date use strrchr() to find the last / in the string datebuf and replace it with a NULL or 0 For the time use strrchr() to find the last : in the string timebuf and replace it with a NULL or 0 Then do your printf(&quot;Date: %s Time: %s\n&quot;,datebuf,timebuf)...
  9. zBuilder

    Is it possible to run wave files (.wav) thru' C? Urgent.....

    Yes it is.... But this is OS specific. What OS is the target? Kim_Christensen@telus.net http://www3.bc.sympatico.ca/Kim_Christensen/index.html
  10. zBuilder

    problem when accessing COM1 with &quot;Peek&quot; &amp; &quot;out&quot; statemen

    My next question would be; Are you able to use another program such as ProCom+ for DOS on Com 3&4 successfully? Also, when you boot up the computer, does the BIOS indicate that it sees all four COM ports? I ask this because the BIOS may not be recognizing those ports and your PEEK method is...
  11. zBuilder

    problem when accessing COM1 with &quot;Peek&quot; &amp; &quot;out&quot; statemen

    Hmmmm... You may not have posted all your code, because I don't see where you are setting up the baud rate, stop bits, etc for the COM port. Missmatched baud rates between the computer and the PINpad may be your problem. Kim_Christensen@telus.net...
  12. zBuilder

    interactive character input

    Like rbobbitt mentioned, kbhit() can be used to wait for a keypress and perform background processing. Then all you gotta do is call getch() to retrieve the key. As mentioned, this is OS / compiler specific and not ANSI code. Untested code follows: #include <stdio.h> #include <conio.h> int...
  13. zBuilder

    Graphics in C

    The following link has some usefull, though dated, info on using directx under Windoze. Can't help you with Unix.. http://www.loirak.com/prog/directx/basics.htm You won't be able to make anything portable between Unix and MS Windows platforms as there are no standard C functions for graphics...
  14. zBuilder

    Graphics in C

    Like CCTC1 says, graphics are very operating system dependant. I don't know about UNIX, but Windows will NOT allow you to do direct screen writes without an API layer like directx. However, for small simple graphics and just kicking around learning programming, you can call Windows API functions...
  15. zBuilder

    SERIAL COMMUNICATION WITH &quot;c&quot;

    First, check your capslock key!!! Second, the serial port usually puts out voltages in the range of + or - 9 to 15 volts. You cannot change the voltage down to 3 to 5 volts using ANY type of software. This is strictly a hardware issue. Maybe you should try the parallel port instead...
  16. zBuilder

    floating point problems

    Check your compiler options and see if under code generation you have the option for &quot;floating point emulation&quot; checked. Then recompile your program. This may solve your problem. Kim_Christensen@telus.net http://www3.bc.sympatico.ca/Kim_Christensen/index.html
  17. zBuilder

    sound(x)

    sound() is neither a C or C++ function or keyword. Your example probably is older DOS code written for a compiler that supported this compiler specific function call. You are most likely compiling Win32 console programs with Borland C++ 5.5.1 which are only simular to DOS programs in looks. You...
  18. zBuilder

    input

    It sounds like you may be writing a game... For more flexable control of the keyboard, you would need to write your own keyboard handler: ie hooking the keyboard interrupt INT 9 and reading the scan codes. This will allow the user to press two or more keys at once etc... There may be a way to...
  19. zBuilder

    input

    Assuming your compiler supports it, try something like this: #include <conio.h> int key; if (kbhit()) key = getch(); Kim_Christensen@telus.net http://www3.bc.sympatico.ca/Kim_Christensen/index.html
  20. zBuilder

    A question about strings... (Beginner)

    #include <stdio.h> char YourString[] = &quot;Hello there, and how are you today?&quot;; printf( &quot;%s&quot;, YourString ); Kim_Christensen@telus.net http://www3.bc.sympatico.ca/Kim_Christensen/index.html

Part and Inventory Search

Back
Top