Evenbit 52

[url]http://homepage.mac.com/randyhyde/webster.cs.ucr.edu/www.artofasm.com/Windows/HTML/AoATOC.html[/url]

Scroll down that page to the "Volumn 2" section. Gives lots of information about the architecture side.

Also, research Compilers, Linkers, and Loaders -- lots of learning involved in that. These should be a good start:
[url]http://www.diku.dk/hjemmesider/ansatte/torbenm/Basics/[/url]
[url]http://en.wikipedia.org/wiki/Compiler[/url]

And this should give you a start on conceptualizing what an Interpreter does:
[url]http://en.wikipedia.org/wiki/Shunting-yard_algorithm[/url]

You may also want to look-up "small C", "miniBasic", and Forth.

Happy Learning!!

Evenbit 52 Junior Poster

It is my understanding that with over 115,000 signed-up, it constitutes the largest MOOC [ [url]http://en.wikipedia.org/wiki/Massive_open_online_course[/url] ] ever. Certainly an historical experiment with possible future changes in delivery of University-level education: [url]http://www.reddit.com/r/aiclass/comments/kp1wb/amazing_we_can_probably_offer_a_masters_degree_of/[/url]

I've decided to take the Basic track so that I only take the quizzes, but get to miss those frightening exams. :)

Thankfully, all of the pre-reqs are available as videos on Khan Academy.

[url]http://www.ai-class.com/[/url]

Evenbit 52

[QUOTE=ddanbe;1624483]because as everyone knows, roman numerals are too hot of a topic these days[/QUOTE]
Actually, Roman Numerals are quite common in industrial settings. For instance, "25L" would mean 25 stacks of 50 items. You probably run into them quite often on a daily basis without realising it because you are simply not looking for them or simply unaware that that is what the letter means in that particular context.

Evenbit 52

At one time (not sure if they're still in the current version), Randall Hyde had highly-efficient 'Roman Numeral' output/conversion functions in the Standard Library for his HLA compiler. You might find it interesting to dig through his source.

[url]http://hla-stdlib.svn.sourceforge.net/viewvc/hla-stdlib/[/url]
[url]http://hla-stdlib.sourceforge.net/[/url]

Evenbit 52

Evenbit 52

Your test page must also have 'session_start()' at the top before any output. For compatibility with old versions of IE, you'll also want to add the P3P header.

[I]index.php[/I][CODE]<?php header('P3P CP="CAO PSA OUR"');
session_start();
$_SESSION['gallery'] = 42;
?>
<!DOCTYPE html>

Setting cookie!
test
[/CODE] [I]test.php[/I][CODE]

Evenbit 52

Okay, Ancient Dragon, try this one: [url]http://ismyipv6working.com/[/url]

I see a bear. Guess that means I can't surf to any IPv6-only sites, if any existed.

Evenbit 52

Found a more detailed test: [url]http://test-ipv6.com/[/url]

Evenbit 52

[QUOTE=Ancient Dragon;1577218]Your first link said I do not have IPV6 but I should not have any problems either.[/QUOTE]

Well, true... that IS a good result. But, if you gander at the page source, you'll discover that it isn't the best result of the test.

[CODE]

Sorry, we were unable to test your connection. Please try again, or see the Google Help Center for more information about how to prepare for IPv6.

</div>
<div class="test" id="ipv6test-test-testing">
  <p>
    <strong>Just a moment, we’re testing your readiness for IPv6…</strong>
  </p>
</div>
<div class="test" id="ipv6test-test-passedipv6">
  <p>

    <strong>Yes, looks like you’re using IPv6 already.</strong>
  </p>
  <p>
    Welcome to the future of the Internet!
  </p>
</div>
<div class="test" id="ipv6test-test-passed">
  <p>
    <strong>No problems detected.</strong>

  </p>
  <p>
    You don’t have IPv6, but you shouldn’t have problems on websites that add IPv6 support.
  </p>
</div>
<div class="test" id="ipv6test-test-failed">
  <p>
    <strong>Looks like your connection isn’t ready for IPv6.</strong>
  </p>

  <p>
    This may be due to problems with your home router, operating system, or ISP. For help
    resolving these issues, visit the <a href=
    "http://ipv4.google.com/support/websearch/bin/answer.py?answer=1299266&amp;topic=8995&amp;hl=en">
    Google Help Center</a>.
  </p>
</div>

[/CODE]
A little piece of Javascript picks which one of those you see.

Evenbit 52 Junior Poster

You can test your connection here: [url]http://ipv6test.google.com/[/url]

Apparently, Wednesday, June 8th is "World IPv6 Day" when major websites and CDNs will be sending their content over IPv6. For instance, if you cannot connect to Google on that day, you will need to surf to [url]http://ipv4.google.com[/url] to do your searches.

My best guess is that most people will not experience any problems. Almost any computer / router purchased within the last 5 years should either be compatible / or easily upgradable. Most Internet Service Providers (ISPs) should already be compatible. In fact, you can obtain detailed information about your internet connection here: [url]http://netalyzr.icsi.berkeley.edu/[/url]

Please let me know your thoughts on this. Is the current Internet infrastructure ready for the switch??

skilly commented: neat +0

Evenbit 52

I happen to have a good memory for odd things, so, in the interest of holiday fun, allow me to add another log onto this conspiracy fire. Clever use of the Wayback Machine netted me this pseudo-confession: "I also enjoy studying interpersonal relations among online personalities, which is probably why I like to chat and spend so much time on forums. I experiment with various perspectives and try new things when interacting with others. As such, for each forum I visit, I tend to have a wildly different personality, which seems strange at first."

Happy sleuthing! :)

mvmalderen commented: Heavy stuff :P +0
sknake commented: zomg +0

Evenbit 52

[QUOTE=nateuni;1042622]Hi,

I am just finishing up a semester at Uni that touched on Assembly with the LC-3 (Limited to around 16 instructions).

I would like to look more into assembly. Specifically getting a better grasp on assembly opcodes (their purpose), and how they map to HL processes. As opcodes like ROR etc (any many many more) were not covered in my studies.

I am interested in the Intel chips and also the ARM chips that are in iPhones.

My Question - Out of all the books out there, which ones do you guys recommend?

Ok,.. thanks in advance for the advice.

Nate[/QUOTE]

[url]http://www.duntemann.com/assembly.htm[/url]

[url]http://nostarch.com/assembly2.htm[/url]
[url]http://webster.cs.ucr.edu/AsmTools/HLA/index.html[/url]

Also, see these forum stickies:

[url]http://www.daniweb.com/forums/thread41309.html[/url]

[url]http://www.daniweb.com/forums/thread67183.html[/url]

Nathan.

Evenbit 52

Yes, DWORD alignment is always preferred. But check with the standard literature on optimization:

[url]http://www.agner.org/optimize/[/url]

Evenbit 52

Use: [msg]

Evenbit 52

Try this:[CODE]MOV AL, DAY
CBW
DIV DIVISOR[/CODE]

Evenbit 52

[QUOTE=The Mad Hatter;1017833]Now, I didn't argue about posting the link - I shouldn't have done that without first checking to see what the rules were. The discussion about modifying Windows was a side thought, and I think a legitimate topic of discussion. Can you legally hex edit your own copy?[/QUOTE]

As to where Daniweb is located, a little 'net searching can shed light on that. For instance, I found this Frugal Friday interview which is very interesting to listen to:
[url]http://www.blogtalkradio.com/frugaltechshow/2009/01/16/Frugal-Friday-with-guest-Dani-Horowitz-from-DaniWebcom[/url]

[QUOTE]Can you legally hex edit your own copy?[/QUOTE]

I'm sure that there exist attorneys who will point to recent [b]reverse-engineering[/b] legislation as proof that it is illegal to do something like that in the country that I reside in. Same goes for most of the Daniweb participating audience. This is why such subjects are not considered "a legitimate topic of discussion" on most technical forums -- it is a safety precaution to protect all participants... including you.

Nathan.

Evenbit 52

Just a quick note about this "unaurthaurised distribution" of a protected product: Microsoft [b]has[/b] provided an authorized download (including a valid install key) of its OSs in certain instances.

For instance, for enterprise clients who purchase licenses in bulk, they provided a CD ISO of Windows XP at their website so that clients would not have to wait for the product to be shipped to them. The legal purchase of the license was handled separately from the actual attainment of the product.

Another example involves early versions of the Acer AspireOne netbook which were factory loaded with Linux. Enough users expressed an interest in running Windows that Acer negotiated with Microsoft to provide an official release of WinXP SP3 that has been tailored and tested to run on AspireOne machines. The only way to obtain a copy is via the link on the Acer blog post about the subject.

Just my 2-cents worth as a quick FYI. Back to your fun Windows vs. Linux discussion. Pretend I wasn't here... carry on...

Nathan.

Evenbit 52

Processor manuals are your best choice.

Intel --
[url]http://www.sandpile.org/docs/intel/ia-32.htm[/url]

AMD --
[url]http://www.sandpile.org/docs/amd/k6.htm[/url]

Evenbit 52 Junior Poster

[i]Taking the "fright" out of Opcodes and Hex-numbers.[/i]

High Level Assembly (HLA) is a modern [b]assembler[/b] + [b]standard library[/b] package that allows a programmer to ease his way toward ASM coding by leveraging concepts already learned from typical high-level languages. By using HLA, one can investigate and play with a few ASM instructions at a time while coding the remainder of the application using built-in functions and flow-control constructs that one should already be accustomed to. As one gains confidence with traditional assembly coding, they can begin to eliminate the high-level parts of the application by re-coding them in straight ASM.

Here is an example to demonstrate how an HLA application looks very close to how one might write the same program in C or other traditional language.

[code]
// cross-platform: Linux & Windows now; others in the works...
// get HLA here: http://www.artofasm.com

program demo;

include( "stdlib.hhf" )

const

ITERATIONS      :uns32  :=  10000;
MAX_VALUE       :uns32  :=  100;

static

items   :uns32[ITERATIONS];
freq        :uns32[MAX_VALUE+1];
mixed   :file;
sorted  :file;

begin demo;

/* initialization
*/
rand.randomize();
mixed.create();  // these are file objects
mixed.openNew( "sfalse.txt" );
sorted.create();
sorted.openNew( "strue.txt" );

/* create the unsorted array
*/
mov( 0, ecx );
repeat

    rand.range( 0, MAX_VALUE );  // returns value in 'eax'
    mov( eax, items[ecx*4] );  // puts value into array
    mixed.put( (type uns32 ecx):5, ": ", (type uns32 eax), nl );
    // mirror to file
    add( 1, ecx );

until ( ecx = ITERATIONS );

/* record the frequencies of the numbers
*/    
for( mov( ...

Evenbit 52

{responding to Infarction's comments}

  1. Why do you believe Microsoft would ever aim for standards compliance?? It has always been in their best interest to keep everything proprietary.

  2. Many different versions of the Linux kernel exist, so if you are compiling your own, you get to choose the kernel that best suits your needs. Likewise, the 'distros' show a good deal of variance. Small distros like DSL and Puppy tend to use the older, smaller kernels to save space. Other distros try to keep more current. Also, why is it that Microsoft's embedded versions (Windows CE and the like) are SO different from the regular Windows that it is like programming for an entirely different OS? With Linux, you don't have that problem -- your existing products just work.

I don't "paint" the fanboys, those are simply the colors they show me.

Nathan.
PS - See also the comments here:
[url]http://www.desktoplinux.com/cgi-bin/board/UltraBoard.pl?Action=ShowPost&Board=linvswin&Post=846&Idle=0&Sort=0&Order=Descend&Page=0&Session=[/url]

Evenbit 52 Junior Poster

[CODE]Using 'common sense' to clear the Microsoft fog of illusion.[/CODE]
[[ ...Continued from previous post [url]http://www.daniweb.com/blogs/entry1527.html[/url] ]]

  1. Unable to comprehend security issues.

Even when the United States government warns people to avoid using specific software for personal security reasons, the Microsoft sheep act like they don't understand the reasons. The U.S. Computer Emergency Readiness Team (CERT) [ [url]www.kb.cert.org[/url] ] recommended that people stop using Internet Explorer. The advisory states that there are a "number of significant vulnerabilities in technologies relating to the Internet Explorer domain/zone security model, the DHTML object model, MIME type determination and ActiveX. It is possible to reduce exposure to these vulnerabilities by using a different Web browser, especially when browsing untrusted sites." In the eyes of CERT, Internet Explorer's architecture is at the heart of its security problem, not just that millions of copies are in use. The most compelling thing an alternative browser offers, therefore, is an alternative architecture, one less tightly integrated with Windows.

[url]http://www.redmondmag.com/features/article.asp?editorialsid=439[/url]

"With a regular Web browser, a security vulnerability might let someone crash the browser. With an integrated Web browser they can crash the whole operating system. The tight ties to Windows means that the slightest IE security issue becomes an OS-wide panic. It's not just IE, either: Windows Media Player, Outlook Express, and even DirectX, are all, in my opinion, overly integrated and give hackers too much access to core PC functions."

  1. Confuses commodity with quality.

Toothbrush, disposable razor, ballpoint pen, hotdog, fast-food hamburger -- these are ...

Evenbit 52

{responding to Infarction's comments}

  1. Okay, you are on to my "game" here... ignorance is not limited to "Microsoft" people - there are plenty of green penquins too.

  2. Well, I harped on the "standards" issue because the "fans" always claim they would NEVER be caught using non-standard languages like Java... that they use .NET because of its "certified standard" status -- of course, we all know that this isn't true.

  3. Do you not recall the time that Microsoft was caught shipping the exact same binary image of NT ( I do not recall which version ) to home users and to businesses -- the only difference was that the business version had the words "Enterprise Edition" stamped on it and they charged the firms 10 times the price of the home package?

"Just callin' the shots as I see 'em. Label me a fanboy if you will, you certainly won't be the first."

Nah... your responses are always insightful.. keep them coming...

Nathan.
PS - See also the responses in the forum thread here:
[url]http://www.desktoplinux.com/cgi-bin/board/UltraBoard.pl?Action=ShowPost&Board=linvswin&Post=845&Idle=0&Sort=0&Order=Descend&Page=0&Session=[/url][

Evenbit 52 Junior Poster

[CODE]Addressing some of the typical arguments we hear from the "Microsoft fanboy" crowd.[/CODE]

One can debate until you turn blue in the face. It never fails that some concepts and facts just fly right over the heads of some people. But when the person doing the arguing is supposedly well-educated and has 15 plus years of programming experience, you would think he'd have better arguments than these. Feel free to add your own favorite "stupidities" to the list.

  1. Claim that Buffer Overflows do not exist.

I start with the funniest one because when a Microsoft fanboy claims he "never read any reports from MS about 'buffer overflow' problems" you know that he is entirely clueless -- and probably entirely helpless too. Believe it or not, I have even been accused of "trying to sound technical" on this one. In this age of extensive media coverage and the ability to just "Google" a subject, one wonders why a programmer would deny the existence of "buffer overflows" when the subject is such a central component of the information security sector. One possibility is that the fanboy primarily programs in .NET (and other "managed code" environments) so he never needs to learn about or deal with "pointers" -- he is wrapped-up and laying in a baby crib. The other possibility is that to acknowledge the existence of "buffer overflows" entails admitting to a host of security issues involved with using Microsoft operating systems and software [just research the exploit holes used by ...

Evenbit 52

[QUOTE]to help one's neighbor by distributing copies as he wishes, and finally to distribute modified code as he wishes.[/QUOTE]

Do you ever do any research on the subject of your blog posts? The GPL license applies specific restrictions to how one may distribute the software.

[url]http://www.gnu.org/copyleft/gpl.html[/url]

Evenbit 52

wildgoose -

Please consult the Narue tutorial that tomtetlaw was talking about:

[url]http://www.daniweb.com/forums/thread41309.html[/url]

Pay attention to the discussion of the C calling convention.

Evenbit 52

wildgoose -

What you are thinking of is the old '.com' and '.exe' formats for DOS which had a segmented memory model. Yes, the '.com' files were restricted to the SMALL data model which combined all four segments into one -- so the author did* have to be careful where he place data.

However, modern 32-bit code for modern 32-bit Operating System's do not have support for segments because they all use Virtual Memory.

Evenbit 52

[QUOTE=wildgoose;951132]Assember is a two pass. If that doesn't work, move all the data in the .data section below the code in the .text section. In these simple configurations typically the Code Segment and Data Segment are shared and having data at the top of your code makes the data appear like opcodes (thus instructions) to the processor and it trys to run the data like code![/QUOTE]

No, wildgoose. What you are saying simply can not happen.

The sections are separated in the object file. The linker may even choose to re-order them when it creates the executable file. The Operating System's loader will likely scatter them into widely-separated areas of memory. In general, the order of .data and .text sections has no effect. The code will start executing at the '_main' label no matter where it appears within the .text section.

However, in a Linux environment, on certain old kernel versions, the order DOES matter. A '.data' section is expected as the last section due to security device implemented by that kernel.

Evenbit 52

Which gcc port are you using? If it is cygwin, then that might be your problem.

Try MingW -- I've always had success with it.

[url]http://www.mingw.org/[/url]

Evenbit 52

An alternative is to use the Alink downloads:

[url]http://alink.sourceforge.net/download.html[/url]

[CODE]; To assemble: nasm -f obj hw.asm
; To link: alink -oPE hw .obj win32.lib

extern MessageBoxA
extern ExitProcess

segment .data USE32

title db 'My First Win32 ASM Program', 0
message db 'Hello, World!', 0

segment .text USE32

..start
push dword 0Eh
push dword title
push dword message
push dword 0
call MessageBoxA
push dword 0
call ExitProcess[/CODE]

Evenbit 52

Here is a wonderful resource to help you understand the proper use of FPU instructions:

[url]http://webster.cs.ucr.edu/AoA/Windows/HTML/RealArithmetic.html#998833[/url]