Here's some nasm code. Tested and everything.
Couldn't understand why you would use jumps inside the loop when they're unecessary.
BITS 32
SEGMENT _TEXT ALIGN=4 PUBLIC USE32 CLASS=CODE
GLOBAL _HexToInt
align 4
_HexToInt:
; edx is string pointer
; eax is final integer
; ebx is used...
If you want direct access, you should read the ATA and/or ATAPI specs. Try reading sectors first, because writing to the wrong drive would cause disaster.
This requires polling or using interrupts. Not exactly noobie stuff. Especially if you've never done interrupts or I/O ports before.
If...
1. If the instruction being modified is already in the pipeline, the changed instruction won't get executed or there will be a hefty stall to reload the pipeline and cache. It'll all depend on how the processor is designed.
2. Most 32 bit CPUs now have protection mechanisms or paging that...
you have to do cmp sbb and das for each bit I think.
How about this:
mov bl, al
shr al, 4 ; get high order hex digit
xor ah, ah ; clear ah
add al, 48 ; add ascii code for '0'
cmp al, 58 ; check if ascii code is beyond '9'
cmc ; if it is beyond '9', carry will be clear, so...
it's because your label is in a different asm block. And I'm not sure taking it out of the block and making it a normal label would help.
You could compile to assembler and then cut&paste that function into its own .asm file assuming you have tasm or the pro or above version of builder.
A...
There are two things that I noticed about this algorithm.
1. It loads from 4 locations and stores into another one.
2. It calculates 4 vectors at a time.
These suggestions may not increase the run-time by much, but it's all I can offer without doing some tests.
1. Have you tried calculating...
What are these files anyways? I always assumed they were modifications of the vcl to include installed components or precompiled headers. I have hundreds of them and I occasionally delete them. I don't suggest being as destructive as I am. But I'd really like to know what these files are...
May I interject and offer some suggestions? Hope you don't mind.
When you open the second file for writing, if it fails, you may want to close the already open input file handle fhandle_in.
Inside your while loop, you check if fhandle_in!=NULL, but fhandle_in is never assigned anything after...
Yeah, sorry. You can't statically allocate a VCL component. I was thinking in terms of general class creation. Using operator overloading on components isn't something I've ever seen done and I'm not sure if it's advisable.
Yeah, dereferencing components would look ugly. But I think...
In the above, replace
char *line = bitmap->Scanline[y];
with
int *line = (int*)bitmap->ScanLine[y];
A programmer is a device for converting Coke into software.
Oh boy! I'll try to answer what I know, but component creation takes a lot of patience. And I'm no expert, but I do build components on a regular basis.
1) this one I'm not too sure on. It seems like you want to be able to do something like this:
comp1 = comp2+comp3;
If your components are...
You want to convert color images to monochrome?
Depends on how you access pixels. If you have a TBitmap, you can just set the bitmap->Monochrome = true. Then you can set it back to false and use whatever pixelformat you want.
With a TImage, it's image->Picture->Bitmap->Monochrome = true...
You have to know what format your object files are. If they're coff (very good chance that they are), you can use the borland tool coff2omf to convert the object files so that Borland can use them.
A programmer is a device for converting Coke into software.
butthead: What supernat03 meant is that if you have a string that DOESN'T have a nul terminator, you can't use strcpy() on it reliably.
In C, any string declared with double quotes automatically has a nul terminator, so your example is not valid.
Sherak: I'd listen to what itsgsd said. You...
Dunno about code, but you might be interested in rfc1459.
http://rfc.sunsite.dk/rfc/rfc1459.html
I think it's section 4 that describes the commands.
From the looks of it, you need these commands to start off:
USER
NICK
JOIN
When receiving, check for PRIVMSG, NOTICE and PING.
Then start...
Ok, I'll start again. I don't usually do this, so this'll be a one time deal. Plus, I'm really bored right now ;)
NOTE: As a previous post says, you can just call the code for Button3, but it wouldn't be the data from Button2. The Data would get overwritten.
So there are TWO ways to do...
You need to create another function that takes a pointer or an array. You can cast it to a two dimensional array afterwards if you want. Make sure that the final variable you use is called 'Data' and that it's a 2 dimensional array. In this function, put everything that's in the...
Couple other notes:
- C forces you to declare all your variables at the beginning of your functions. Very annoying once you're used to C++ and use scope (especially in for loops).
- In C, you cannot overload operators or functions.
- In C, you gotta use malloc() and free(). Can be cumbersome...
Thanks for the reply. However, I fail to understand how I'm supposed to retrieve only certain messages. If I synchronize Application->ProcessMessages(), won't it block my thread if it tries to pop up another modal dialog?
I really don't know how to check for certain messages and leave others...
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.