Don't know how to use PS. I use an ancient version of PhotoImpact. Added a 150% sized orange-coloured drop shadow around the text.
Printable View
Don't know how to use PS. I use an ancient version of PhotoImpact. Added a 150% sized orange-coloured drop shadow around the text.
Ohhhh drop shadow. I saw different kinds of things like glow and other related functions that I thought would make it glow, but I'll see if they got anything on drop shadows.
[EDIT] Nope. But there might be one under a different name.
Um, yes. In PS its a drop shadow aswell. Its in Layer > Layer Options > Blending Options or something similar. Haven't used photoshop in yonks.
In the dialog that appears there should be an option for a drop shadow.
chem
Layer->Layer Style->Drop Shadow in Photoshop CS.
Instructions take more than one cycle, but due to pipelining, most appear to use one cycle (that is, that's their effective speed).
That reminds me, to optimising ASM well you have to make it pretty CPU-specific. What works well on one CPU might not work so well on another. So we have to think about whether we want compiler optimisations for specific CPUs.
In photoshop 6.0 here is how how I did the "glow" around the word Light:
1) Put the text on its own layer
2) Double click that layer (Brings you to Layer Style)
3) Select the checkbox that says outglow
Let me know if that works for you?
Chem, are you still interested in joining the project? If so, how do you want to help? Do you know C++.NET to help with the IDE?
I'm still working on the IDE window itself. Right now, I'm on the step where I have to add menus and such.
Should the compiled programs automatically be multithreaded for a good kick in speed?
How much extra work does it take to multithread an app? If its not too much then yes, otherwise no.
I attached some more logos. They are smaller this time. I also need to add the ™. What colo should I make the ™? The 5th logo has more spikes in the flare and the 4th logo has a totally different flare (more blue). Logo 2 and 3 are the same flare, but positioned differently.
Jake, how is the syntax.doc coming? I'm guessing you book came and you have just been reading that. Once you make syntax.doc we need to make an organized format for it so other people can add to it if they wish. Either that or you will have to keep ontop of all suggestions made.
Is there still nothing I can do as far as development? Maybe I could help with the library if I learned a little ASM? Are we still using MASM through and calling it via C++? Does artofassembly.com have good beginners tutorials?
Yes www.artofassembly.com has some killer tutorials for beginners. Use the Dos 16 bit section though. They got 32 bit stuff in there as well, but it gives you a feel of the x86 instruction set, and you can use it in C++. The Windows 32 bit stuff is too high level and will only work for MASM.
I haven't started on the doc just yet cause I was working on the LightFusion program itself. The book has not been shipped to Barnes & Noble just yet. I called them this morning and they said that they will call me when it arrives.
I'm thinking since it's called LightFusion, you should have two lens flares and have the lights fuse into each other across the logo, by having one flare on the left side and another on the right. A black background with it would be awesome as well.
I could teach you a little assembly right here if you like as well. :)
Cool. Aren't the 16bit instructions diff fromt he 32bit ones?
Could you explain (in detail) how I execute MASM from VC++ (I have Visual Studio 6). I saw you guys do it a few times, but I have never even opened VC++.
Should the lights fuse in the center of the image? Should they be the same size? If the background is black what color should Fusion and ™ be?
I couldn't find the 16 bit section. All I saw was this: http://webster.cs.ucr.edu/Page_win32/index.html
You have to click on this button ;)
http://www.vbforums.com/attachment.p...id=40601&stc=1
And when you are in there, either click on the HTML version of the tutorial or download the PDF files that are all in one zip file.
You will see the 32 bit instructions in there. For the 4 main 16 bit registers ax, bx, cx, and dx, all you would need is an e before them to make them eax, ebx, ecx, and edx, which are 32 bit registers.
Ok. You missed my other 2 questions. Aren't the 16bit instructions different fromt he 32bit instructions? And how do I put it all into C++? I have never used VC++ before.
EDIT: Nevermind. You answered one as I was typing this. Can you clear up the C++ part?
To use asm in C++ it's as easy as this:
And this, for example, can fill a cetain number of elements in an array with a value instantaniously without the reliance of a loop. It's like the Fillmemory API only done on 32 bit integers rather than bytes.Code:inline void Mem_Set_QUAD(void *dest, unsigned int data, int count)
{
_asm
{
mov edi, dest ;edi points to destination memory
mov ecx, count ;number of 32-bit words to move
mov eax, data ;32-bit data
rep stosd ;move data
}
}
Here are some more logos. What color should I make the ™?
Make the lights futher apart.
This should be a C++ source file right? I get this error when building, but none when compiling.
Code:--------------------Configuration: Cpp1 - Win32 Debug--------------------
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/Cpp1.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Cpp1.exe - 2 error(s), 0 warning(s)
A little farther apart or a lot farther apart?Quote:
Originally Posted by Jacob Roman
Post the code you have.
A lot.Quote:
Originally Posted by eyeRmonkey
I copy pasted the code you posted above.
More logos.
You need an actual entry point for your application. You cannot compile a lonely function into a whole program.
I figured it was something like that. But I still don't know how to go about that. Could you help?
Put that in:
Of course, the resulting app won't do anything.Code:int main()
{
}
This is how, eyeRmonkey:
This will fill the whole array a[] with the value 100.Code:
#include <stdio.h>
inline void Mem_Set_QUAD(void *dest, unsigned int data, int count)
{
_asm
{
mov edi, dest ;edi points to destination memory
mov ecx, count ;number of 32-bit words to move
mov eax, data ;32-bit data
rep stosd ;move data
}
}
int main(void)
{
int a[5] = {0};
Mem_Set_QUAD(a, 100, sizeof(int) * 5);
for (int i = 0; i<5; i++)
printf("%d\n", a[i]);
return 0;
}
Jake, any thoughts on the last 3 logos I posted? I like the blue background better. But I can make the final version with a black background and "Fusion" in a different color for you if you want.
BTW, in the first post, under "Help Support LightFusion" shoud I make link on the images automatically goto the first new post (&goto=newpost) or the first post?
Well, they used to be bigger. Now it's just too tiny. Plus you may wanna get rid of the boarder and the _ [] X buttons.
It's best to make it direct to the first page of this thread. Did you test the code snippet I gave you?
Ok, I'll make the flare bigger.
What do you mean border? What _ [] X buttons? Ahhh. I get it. That is just windows. I took a screen shot of the MDI windows in Photoshop instead of posting 3 individual pictures. Thats what I have been doing the whole time. Ignore the border and stuff. Although, if you want me to post any of those as actualy pictures (in .PNG format) let me know.
Ok, I'll make it to the first page.
Yes, I tested the code snippit. It works, but I still don't understand what it does at all. Well I understand the C++ stuff well enough. The ASM stuff doesn't make sense to me though. I'm too used to OOP to catch on quickly. I am sure I will catch on eventually though.
Well lets make it easy. This function alone will help you understand it better. This is an exponential function:
Ok before I explain what the code does, I'll talk about the registers.Code:
inline int Exponent(int n, int exp)
{
__asm {
mov eax, n ; num
mov ebx, n ; exp
mov ecx, exp ; counter
cmp ecx, 0
je retOne
cmp ecx, 1
je retVal
loopstart:
imul eax, ebx
dec ecx
cmp ecx, 1
jg loopstart
jmp retVal
retOne:
mov eax, 1
retVal:
}
}
eax - accumulator register (commonly used for arithmetic and is the fastest)
ebx - base address register
ecx - counter register
edx - data register
And as you may already know, these are 32 bit registers. You can actually store the data in any register you want pretty much.
Now here is what the code does:
VB Code:
inline int Exponent(int n, int exp) 'an inlined C++ function called Exponent with two 32 bit integer arguments n and exp. __asm { 'asm code starts here. mov eax, n 'Stores n (32 bit integer) in eax (32 bit register). Similar to eax = n if done in VB. mov ebx, n 'Stores n (32 bit integer) in ebx (32 bit register). Similar to ebx = n if done in VB. 'And the reason why we are storing n again is because later we are gonna want to multiply 'n = n * n in a loop so we can get an exponent going. mov ecx, exp 'Stores exp in ecx. Similar to ecx = exp. This will be used as a counter. 'This is like an if statement. cmp stands for compare, and je stand for jump if the cmp 'statement equals. If the data in the ecx register equals 0 then jump to the retOne sub. cmp ecx, 0 je retOne 'Similar to above only it checks if it's equal to 1 and jumps to retVal. cmp ecx, 1 je retVal 'Here comes the loopstart sub loopstart: imul eax, ebx 'Multiplys the contents of eax and ebx. imul only multiplies integers. Similar to eax = eax * ebx. dec ecx 'decrements the contents of ecx. Similar to ecx = ecx - 1. This is counting down. 'Another if statement, only this time jg stands for jump if greater than. If ecx > 1 then jump to the loopstart sub. cmp ecx, 1 jg loopstart 'Of course if the if statement ends up false, it will skip the jg command and go on to the next line, which is this: jmp retVal 'An unconditional jump. Similar to the Goto statement in VB and C++. 'This is the retOne sub. retOne: mov eax, 1 'Puts the value 1 in the eax register. Similar to eax = 1. 'This is the retVal sub. Used to help skip the above sub routine. retVal: }'asm code ends here } 'And the function written in C++ automatically returns the value of eax.
If you wanted to see a VB version of it to help you understand better, then here ya go:
VB Code:
Option Explicit Private eax As Long, ebx As Long, ecx As Long Private Function Exponent(n As Long, exp As Long) As Long eax = n ebx = n ecx = exp If ecx = 0 Then Goto retOne If ecx = 1 Then Goto retVal loopstart: eax = eax * ebx ecx = ecx - 1 If ecx > 1 Then Goto loopstart Goto retVal retOne: eax = 1 retVal: Exponent = eax End Function Private Sub Form_Load() MsgBox Exponent(2, 5) 'Returns 32 End Sub
That helped a lot. Thanks Jake!
I started reading 1 .pdf turoial on ASM (for linux - but its almost all the same) the first day we started this before I realized I wouldn't be able to help all that much. That turorial helped me understand processor architecture a little bit and just enough to grasp the register stuff.
Comparing the asm stuff to VB helped a ton. Thanks. :thumb:
PS - :lol: 2^5 = 32 = 32bit :D
Start on chapter 3 in the PDF files in the 16 Bit Dos section to start learning the x86 instruction set. It'll be later on in the chapter. The later chapters will introduce more instructions and some more registers. ;)
I have a few more questions:
1) How are we doing the library again?
2) Is our language interpreted? Or the other way of doing it (native i think)?
3) If it is interpreted then will it be in MASM? If so, then how will we compile it? What I'm getting at is how will we make our IDE/compiler self sufficient if the user has to have visual studio to use it? Or am I missing something?
IDEA: I had a great idea while I was out and about earlier. If the language is interpreted into MASM then I think it would be awesome to give the user an oppourtunity to edit the ASM that we generate before it is sent to the MASM compiler. That way they don't have to do _asm{} every time they want to use ASM. They can let out language do most of the work and they can make any small optimizations they want. This will work especially well if we do eveything inline.
I haven't gotten the book yet so I dunno how it's gonna get compiled. And it's definitely gonna be native, although it would be nice to give the users an option to choose native or p-code, with native as default. The library I was thinking of having built into the exe so we don't to include anything. Kinda what VB has done with it's built in functions, only we are gonna have a hell of a lot more than that.
Ok.
How does native code work. I can't stretch to think of a way it could POSSIBLY work unless interpreted. As you can see, I am new to this area of things.
So am I :(
Give me about a couple days till that darn book finally arrives. In the meantime lets do some research on it on the internet like from Google or something.