The only way to know the line number is by counting the carriage returns in the file.
I suggest you use the code you have written to count the carriage returns, and when it finds a CR, output the counter value to the second file before the rest of the line is output to the second file.
I hope...
The best way is writing code to interface with the Soundblaster. I've tried it once, though not in assembly, in C code. Look for documentation on the soundblaster - but it will not be as easy as you would probably want...
Here is a good place to start...
Why don't you try using the 'Get Keyb. Flags' BIOS function (ah=02h, int 16h). The return byte in AL gives keyboard flags...
AL: bit description
00h r. shift
01h l. shift
02h CTRL
03h ALT
04h SCROLL LK
05h NUM LK
06h CAPS LK
07h INSERT
As an example of...
I've got some of michael abrash's work: 'the black book' and 'zen of' graphics programming. They are very good, but mainly look at using mode 13h (as a 320x400) and mode X, but these concentrate on having 256 colours (which I'm not to bothered about...) and not resolution. If colours were the...
Hi people.
I'm trying to figure out how the memory for screen mode 12h for BIOS screen-set call (ah=00h, int 10h) is organised.
It would seem that the first block of memory is a bitmap for whether the pixel is on or off - but how do you change the colour of that pixel?
I'm trying to rewrite...
Just a Note...
CTRL + ALT + Del combination is filtered out before message is sent to active window. The code for this is in a system library (I think GINA.DLL which is to do with I/O routines).
Don't hate the player - hate the game
There are no readily available functions for using the mouse in the C standard libraries. Butit is not to difficult to incorporate some assembly into your programs specifically for dealing with the mouse. Take a look at the code I wrote...
#include <stdlib.h>
#include <stdio.h>
#include...
Using fgets() to get lines of file into buffer, and then using sscanf() to search the buffer is less error prone than just using fscanf(). But I suppose it does depend on what data you want to pass, as xwb pointed out...
Don't hate the player - hate the game
Salem is right. The best thing is to do dynamic memory allocation. Try looking up 'malloc()' in your help files.
:-)
Don't hate the player - hate the game
You could easily write your own code to do this:
#include <stdio.h>
#include <time.h>
int main (void)
{
time_t tme;
struct tm *today;
char months[12][10] = { "January",
"February",
"March",
"April"...
Janet,
I reckon the "positive going pulse" just means a binary '1' in this context, i.e. bit 4 of port A is '0' when it is not ready, but rises to '1' when it 'guess' is given:
/------1 (ready)
/
(busy) 0------/ <- rising edge.
What needs to be done...
kidrocks,
Firstly, Zeit is right. It is more helpful if you give code to work with, or at least the operating system you are using. (It would not be any help to you if I posted the answer in 8086 intel code when you have a UNIX box with a Sparc chip...)
However, I am going to make some...
A more sophisticated way of disabling ctrl+alt+del on Windows XP is by using a Low Level Keyboard Hook function, and just filtering out the key strokes. A little more complicated to program, but can be done... :-)
If you are using some other Windows, like 95/98, I believe you can cheat a little...
The following code shows how to make full screen window. Basically a POPUP style window, so no 'x' button because no title bar. The style CS_NOCLOSE means that Alt+F4 doesn't work either.
#include <windows.h>
int InitWindow (HINSTANCE);
long CALLBACK wndproc (HWND,UINT,WPARAM,LPARAM);
int...
I answered a similar query in another thread. You could use LoadLibrary, but it is harder to use functions this way. I suggest using _cdecl(dllimport) to import the functions.
See the other thread link below:
thread713-744050
Don't hate the player - hate the game
I agree Esquared.
Programs like ad-aware are good to run every now and again, as well as virus checkers like sophos. :-)
Don't hate the player - hate the game
You could instead of trying inline assembly write the assembly in a separate file. You can assemble this using TASM, MASM or whatever to get the object file and then link this object file together with your C file.
The assembly code should be written as a function you can call from the C...
It is an adware file that was supposed to be downloaded to your computer, but was not. You can get rid of it by editing your win.ini file. Look at the following link for more info:
http://securityresponse.symantec.com/avcenter/venc/data/adware.searchcounter.html
:-)
Try looking up Remote Procedure Calls (RPC) in the C++ documentation. I have never tried this before - usually its easier to comunicate with client-server models, i.e. get the server program to send the command-string and the client upon recieving the message to execute that string.
The RPC...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.