Assembly Guy 72 Posting Whiz

or the old school trucker's trick, sunflower seeds. Just the act of taking them one at a time and breaking it open and eating it is enough to keep your minnd from getting bored and putting you to sleep.

I see, that's clever because you won't be looking at the road as much as you should, and that one tightest corner on the mountain road you're driving comes up quicker than you realise, and you have to take evasive action to make the corner. Because of your high speed around the corner, some of your not-so-well-secured load topples out of your truck and down off the montain, crossing an eagle's flight path causing it to over-compensate and veer high into the sky into the path of a light plane over the airport for a training flight. The eagle hits (and gets caught in) the prop, stalling the engine and causing the plane to drop out of the sky, where it and its passengers plummet to their doom onto the wing of a jetliner on the taxi-way (full of fuel of course), causing an unreal, physically impossible Hollywood-style explosion. The massive ball of flames you see in your mirror serves as a further distraction to your sunflower seeds, causing you to veer out of your lane and have a close call with an oncoming vehicle. This shit-pants-worthy near-miss is sobering and you come to the realisation that being alert on the job is highly important and you'll never fall …

Assembly Guy 72 Posting Whiz

I have been told that when entering the US, customs officials can insist that you reveal the password for an engrypted file or partition.

Surely that can't be legal... I mean it is the US, but come on... it can't be legal, can it? Sure they can ask and insist all they want, you're never legally obliged, are you?

However, never underestimate the power of computer forensic tools.

By the same token, computer forensic experts should never underestimate the advanced computer user ;)

Assembly Guy 72 Posting Whiz

I've read through your code a few times, and nothing's standing out to me yet. One technique that tends to help me is to take the code off-screen, get a pen and paper, then make a flowchart of what the code has to do, then write bits of the code over again. This tends to eliminate silly human errors that were made the first time around.
In the mean time, I'll read your code more closely.

Assembly Guy 72 Posting Whiz

From the command line:

php -a

assuming you've set your path variable correctly

Assembly Guy 72 Posting Whiz

Could you disassemble your elf64 with objdump -d test.o? Also, try installing gdb, the GNU Debugger. I think you said you're using Ubuntu, so sudo apt-get install gdb should work. GDB provides you with the ability to run your program in such a way that you can perform debugging techniques such as stack traces.

Assembly Guy 72 Posting Whiz

I forgot to declare an apple

That sounds like our border's Bio Security Policy here in New Zealand ;)

I've heard of people buying a 1TB HDD and making an innocent 500GB Windows partition on it, then making a TrueCrypt (or even just Linux) partition which occupying the remaining space. They store all of the files they don't want Border Security to find in the non-Windows partition. If Border Security takes your laptop, it'll boot up into Windows, and the only partition Windows will show will be the innocent one, so they find nothing you don't want them to. I've even heard of people using a similar technique on external HDDs, but putting 500GB decals and labels onto a 1TB drive so it's really authentic. The things some people will do...

Nothing wrong with techniques like these - perhaps you have fully legal files, but just want privacy - interlectual property for example.

Assembly Guy 72 Posting Whiz

*nix and Unix is so cryptic in both filenames and parameters

Yeah, that's true. I suppose it's just one of the changes that you have to get used to if you are going to use a POSIX system. I accept that as one of it's flaws (until you learn enough) and admit that I was confused with the more in-depth areas of Linux when I was a newbie, but now that I'm used to it, I find myself somewhat uncomfortable when dealing with some aspects of a Windows environment. I guess it's just what you get used to.

No one in 1969 imagined there would be computers in people's bedrooms that have more processing power and operating systems than the mainframes of 1969. And most certainly it was not originally intended that Unix would be used by every person over 5 years old in the world.

Indeed that is true, I remember a quote from a 1949 Popular Mechanics Magazine (yes, I realise this was 20 years prior to 1969) that read "In the future, computers may weigh no more than five tonnes." Due to people's thinking and mindset back then, Unix (and thus Linux) was only really written for Techy Sysadmins, but if you take into account the tools and utilities which people have written (Gnome, Dolphin and so on) Linux can be used by people as young as five.

Assembly Guy 72 Posting Whiz

Okay, that's fair enough.

Assembly Guy 72 Posting Whiz

I just noticed that Perl and Python are under the Software Development category, but not Web Development, while Ruby is under Web Dev and not under Software Dev category. Don't get me wrong, they do belong where they currently rest, but perhaps a link to Perl, Python and Ruby could be put under both Web Dev and Software Dev; Perl and Python are still widely used for Web Dev, and I was thinking that maybe someone may go looking for Perl under Web Dev. Plus Ruby's not exclusively used for Web Dev. I don't mean duplication of forums or anything, just a link to each forum under both categories...

Just a thought, what do you guys think?

Assembly Guy 72 Posting Whiz

Nothing is virus safe...

Whilst that is true, 99.999% of attackers just don't write viruses for Linux because:
a) Most computer users use Windows
b) A lot of Linux users are highly paranoid about security ;)
c) A lot of Linux distros tend to be more secure than Windows; for example Windows has (had?) the autorun feature which a lot of viruses explited to spread easily, but with most (all?) Linux distros, there was no such thing
d) Linux setups are all different - different distros, different configuration etc. so one virus may not work on all Linux installations.

So while you are very true in saying that nothing is virus safe, Linux and Mac are just far less prone to viruses, mainly because of the lak of people writing viruses for them :)

90% of questions are answered with a rude "read the f*ing manpage, idiot"...

Perhaps if you mentioned that you read the manpage as well? Besides which, people have put a lot of time and effort into writing manpages only to have them ignored, so of course they're going to tell you to read the manpage first, if you already haven't.

including questions on how to use man to read manpages.

Did you try man man? ;) No I'm kidding, fair enough about that point.

Of course half those manpages either don't exist or are years out of date...

I don't know what distro you're …

Assembly Guy 72 Posting Whiz

ALL computers are no more than logic circuits linked together :)

Well, yes, of course, but my point was that this guy used nothing but 74LS00s apart from a few peripherals like the serial interface etc.

Assembly Guy 72 Posting Whiz

which

Assembly Guy 72 Posting Whiz

I gave up on trying to learn web design -- too boring. I like something that gives me a challenge, like c and c++.

I've always enjoyed web design; personally it offers me challenges which I like, but I also enjoy the type of challenges that programming offers too. Perhaps you weren't pushing yourself enough with web desing? ;) Oh well, each to their own I guess.

Assembly Guy 72 Posting Whiz

Just for those of you who may think that logic gates are worthless by themselves: http://blog.kevtris.org/?p=62

This nutter made a functional computer out of NAND gates... It's crazy - I would like to see his schematic diagrams to try and start to fathom how it works...

ddanbe commented: He man,thanks for the link! +14
Assembly Guy 72 Posting Whiz

If you're just starting HTML/CSS/MySQL/AJAX/Perl/ASP/Javascript, then http://www.tizag.com/ covers the basics.

Assembly Guy 72 Posting Whiz

This is for my special project and to be submitted on monday.

So what you're asking is basically

Can you do my work for me?

Assembly Guy 72 Posting Whiz

No problem! Please mark the thread as being solved if your question's answered.

Assembly Guy 72 Posting Whiz

Looks nice, but there's not enough contrast between the main page title and the background. Maybe pick the shadow colour up a tiny bit or something? I'm no professional designer, just a gut feeling.

Or perhaps change the title colour to the same pink that you're using for borders elsewhere on the page.

Or maybe add a partially opaque div (maybe 30%-50%) behind all of the page content which stretches the same width as the content, and 100% of the window height.

Assembly Guy 72 Posting Whiz

Indeed, you are welcome here :)

Assembly Guy 72 Posting Whiz

We'll take all we can get this year after last year's drought.

We had a drought here over the summer, which is very unusual for Wellington. We're normally a wet/windy city with beautiful days here and there.

Assembly Guy 72 Posting Whiz

That's nice code, but I think it'll replace the character after the space with an underscore; you increment BX before you store the underscore. Also, you're comparing words (cmp AX, [bx]), not bytes, so your code will never find any spaces.

To simplify your code, you might want to make use of the lodsb and loop instructions. See http://faydoc.tripod.com/cpu/lodsb.htm and http://faydoc.tripod.com/cpu/loop.htm for details. Basically, lodsb will load a byte from the segment:offset pair DS:SI into al and increment SI all in one. loop will decrement CX and jump to the specified label if CX != 0. You could also try storing a null character just after the string to denote the end of the string. While it uses up one extra byte in memory, it makes code much tidier and smaller, for example:

array db "imaginary input",0
    mov si, array

.checkloop:
    lodsb           ; Load next byte into AL and increment SI
    cmp al, 0       ; End of string?
    jz .quit        ; If so, quit the loop
    cmp al, ' '     ; Is the character a space?
    jnz .checkloop  ; If not, load the next byte
    dec si          ; Move back to the address of the space
    mov al, '_'     ; Put character to store in AL
    stosb           ; Store the underscore over the space
    jmp .checkloop  ; Loop
.quit:
    ; do something else...

You could use loop with lodsb like this:

    mov si, array
    mov cx, actlen
.checkloop:
    lodsb           ; Load next byte into …
Assembly Guy 72 Posting Whiz

No. Take a look at the and eax,0xAA. Let's use the example that ax = 123d which is 01111011 in binary. With encryption using just the aforementioned and line, ax would undergo the following changes:

ax = 01111011 & 10101010
   = 00101010

...and with 'decryption' using the same and operation:

ax = 00101010 & 10101010
   = 00101010

So as you can see, with the example of ax = 123d, an and operation cannot be undone with an identical and operation, thus at least that part of your code wouldn't work. There are more parts which won't work, but you're on the right track with flipping your ror to rol and add to sub etc.

So to answer your question, no the decryption does not decrypt the encryption. Also, when you post code, please use the Code button at the top of the post text box.

Assembly Guy 72 Posting Whiz

You would have to load the first byte from your string and check to see if it is a space. If it is, then replace that byte with '_'. Otherwise, just check the next byte. You'd repeat this in a loop until you find the end-of-string character.

Which assembly syntax are you using? If you don't know, then are you compiling on DOS, Linux or what?

Assembly Guy 72 Posting Whiz

Morning coffee at 10:30am

Assembly Guy 72 Posting Whiz

It's a cool autumn morning here, about 13 degrees celsius. It's supposed to reach about 18 degrees celsius, but it's a nice, clear sunny day here in Wellington, New Zealand.

Assembly Guy 72 Posting Whiz

...downgrade from Windows 7 to Windows 8.

Haha, that's very nicely put! :D

Me? I love Linux. Only one of the computers in my household runs Windows, and that's because it's the one that everyone has to be able to use, and let's face it - Linux isn't for the non-tech-savvy (one exception maybe being Ubuntu). All the other computers run Arch Linux.

Personally, I really dislike Ubuntu. It comes across to me as the distro for people who want to be elitist or stand out from the crowd and brag about using Linux, when deep down, they still love Windows. It's the sort of OS where (much like Windows) you don't really need to know what you're doing, and that takes the fun out of using Linux a little bit. Don't get me wrong, I'm not saying that people who use Ubuntu are trying to be different, that's just who the distro appears to be aimed at to me. Plus, there are some situations which do call for a linux distro that everyone can use; for example at my brother's work, they use Ubuntu for security reasons, but not all of the people there are the type of people who can use Linux with ease.

Anyway, from my perspective, Arch Linux is the best. Once installed, you have just a terminal, development tools, a package manager and core utilities installed. This is perfect for me because I like a small distro that you build-up and personalise. You …

<M/> commented: ok +0
Assembly Guy 72 Posting Whiz

Could you temorarily insert print_r($_POST); onto line 1 so we can see all of the contents of $_POST?

Assembly Guy 72 Posting Whiz

Personally, I do equal amounts of markup and programming and I agree with those who are saying that HTML etc. isn't programming. Here's a wee analogy:

Markup languages like HTML can be likened to interior designing; you know what you're doing as far as how to lay out furniture, select colours, shapes and other such design elements which make the room functional for its purpose, but also be aesthetically pleasing and so on. It is a highly skilled profession.

Programming and scripting could sort of be likened to building the house itself; it provides the framework behind the rooms which makes it possible to have rooms that support people, keep rain and wind out and make it structurally sound.

You may have a house built, but it's ugly and nobody wants to even enter. On the other hand, you may have all of your rooms thought out and designed, but you don't actually have a house with empty rooms to make your designs a reality. So as far as web projects go, without HTML, the back-end is pointless, but without the back-end, the HTML is pointless.

That is, until you start putting Javascript into your front-end...

Assembly Guy 72 Posting Whiz

You do make a good point there, <M/>

<M/> commented: i can only wonder why i got downvoted... +0
Assembly Guy 72 Posting Whiz

I don't think children can feel TRUE love. I mean, yeah they feel love towards parents, friends, special friends, but I mean I just don't believe that they feel the same 'true' love that adults feel.

Assembly Guy 72 Posting Whiz

don't really consider myself to be a geek :)

Says the person with 4307 posts... ;)

Assembly Guy 72 Posting Whiz

Xbox Originals were powerful in their day.. One possible idea other than selling one is that you can put XBMC onto them, turning it into a streaming media center. Another thing you might like is to put Linux onto it (Xebian is Debian, ported to Xbox). You'd then end up with a server with a 700MHz processor, 100Mb/s NIC, 4 USB1.0 Ports and a GPU whose specs I can't remember. You can upgrade the HDD too (my xbox was upgraded from 8GB to 160GB). Anyway, that's far more than enough to run a web server, even with dynamic pages, with well over 1000 hits a day (probably somewhere closer to 10000, assuming a nice, even spread of hits). Cheap to set up, cheap to run, relatively small so it won't get in the way. Just a thought...

Assembly Guy 72 Posting Whiz

I'm not familiar with MIPS; I'm more of an Intel man myself, but in any case, you'd have to recersively multiply a number with the power, so now for some pseudo-ish code examples:

2^3

a = 2
b = 1
repeat 3 times: {b = b * a}

so for a^b:

repeat b-1 times: {a = a * b}
Assembly Guy 72 Posting Whiz

Meh, gaming PCs aren't my thing at all. I like games, sure, but 99.9% of what I do on my computer isn't gaming. Don't take that the wrong way, it's normally progamming or surfing the web do find solutions to programming problems and so on. Games barely ever come into my life these days.

Assembly Guy 72 Posting Whiz

++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++.+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.

Oh god, is that brainf...udge? I was initially going to jokingly ask if you were using that godforsaken language, but it seems you already are...

Assembly Guy 72 Posting Whiz

You need to give more detail about what you want to do.
Do you want a GUI menu, or a text-based menu?
How does the user select an option - keyboard, mouse etc?
What have you done so far?

Our crystal balls have been playing up lately and we don't do your work for you.

Assembly Guy 72 Posting Whiz

I have never smoked tobacco. Take whatever meaning from that you want to ;) If I did ever smoke tocbacco (which I never will) then I'd so smoke a pipe. I know' it's worse than cigarettes because there's no filter, but come one! It's so classy!
The worst drug I've ever taken is alcohol.

Assembly Guy 72 Posting Whiz

I'm embarrased to say that it was Visual Basic Express (or whatever was build into MS Word). I was 9 at the time, and went on to get a standalone VB IDE, playing with VB for the next two or three years, at which point, I stated on HTML4.0 and Windows Batch Scripting Two years later. Perl came with a bit of overlap, then C++, C, PHP, XHTML, CSS, Python, Lua, Assembly were all part of an inevitable snowball...

Assembly Guy 72 Posting Whiz

erotic

Assembly Guy 72 Posting Whiz

@rajhoq12, I'm not sure if you realise how irrelevant that is to the OP's question.

Assembly Guy 72 Posting Whiz

I once whipped-up a quick scripting language with its interpreter written in C... Like everyone else, I'm not quite sure what your question is, exactly, but if you can have a mess-around with C# or another language and make a program which is an interpreter (rather than a translater-compiler-type-thing) then you'll have started making your own language with a more traditional approach.

Assembly Guy 72 Posting Whiz

They aren't the only ones... there is also Wrox and headfirst... etc.

And then there's a library, or is that too old-school these days? ;)

Assembly Guy 72 Posting Whiz

ASP.NET

Right.. I'm not familiar with ASP and all of that, I just knew there was some sort of connection with .NET and ASP somwehere... I'd better have a read-up.

Personally, I'd use only html, css, php and mysql

I'm in the same boat... Quick and straight-forward to learn. Javascript can be useful, but I've only ever really needed it to hide and show some window-like elements on some of my pages.

Assembly Guy 72 Posting Whiz

Also double-checking the level of your problem solving and analytical skills can't be a bad idea.

First of all I would recommend you take courses on algorithms and flowcharts

Yes, flowcharts and other such diagrams are damned useful. Being able to code to fix a problem is just fine, but communicating or documenting the method by which you did so or how to prevent similar problems to non-coders are situations where diagrams are damned useful.
On top of that, sometimes you've written a program to solve a problem, but it's not doing what it should. This happens to me sometimes when writing my OS, and being able to get out pen and paper and collaborate with my programming mates, with fresh minds, who don't know Assembly is just so useful.

Assembly Guy 72 Posting Whiz

Has anyone made some really cool (or not so cool) 512-byte programs in assembly? I used to hear about people taking part in competitions where they'd try and make, say, a bootloader (or a program like a calculator, for example) and pack-in as many features as they could, the only constraints being that it must be bootable (ie. stuck onto a floppy as its boot sector) and must only occupy the 512-byte boot sector - ie. can't load code from files on the disk and run it.

I just thought that I'd put it out there. Anyone made something along these lines? Just curious to see what people may or may not have done.

Assembly Guy 72 Posting Whiz

Login should only ever be done server-side with something like PHP. Anyone know if C# can work with ASP?

Assembly Guy 72 Posting Whiz

Decaf instant coffee - it's 21:46 here and I don't plan on staying up all night, so yeah.

Assembly Guy 72 Posting Whiz

Also, do i have to use things like phpmyadmin? Or can i build my own?

You won't need PHPMyAdmin if you have access (SSH, remote desktop or physical access) to the computer you'll be running the MySQL server on. PHPMyAdmin just provides a web-based way to create tables, databases etc on a MySQL server, but if you can log into the server with a MySQL client program (ie you're sitting at the computer or SSH-ing/Remote Desktop-ing into it), then you can use that instead of PHPMyAdmin.

(sorry, but i may come up with a bunch of questions in thread.)

Questions = interest, curiosity and engagement = more learning :)

Assembly Guy 72 Posting Whiz

It should't be too bad if you understand what you're doing and why you're doing it. I've made quite a few things that I used to teach myself PHP and mysql - forum software and the like.
The great thing about blogs is that you can start out with it being simple - eg. you're the only person who can log in and post. Then you can expand it depending on your needs - be able to edit posts, have others log in and comment, but not post blog entries, or give your friends accounts so they can make blog posts... Anyway, awesome choice of project. Blogs are a really great project, being as simple or as complicated as you want them to be.
I'll re-iterate what others have said:
Learn PHP fairly well and also learn how to integrate MySQL with it (PHP makes it so easy for you). Set up a MySQL server, write some relatively simple code, profit.

Also, check out http://www.tizag.com/mysqlTutorial/ and http://http://www.tizag.com/phpT/ to learn PHP and MySQL.

Good luck!

Assembly Guy 72 Posting Whiz

Yelling an answer out in class, feeling certain that it's correct, but then everyone looks at you because it's so unbelievably wrong.