For those interested in operating system development, this snippet tests status of A20. It is the line that allows memory beyond 1 meg to be addressed, otherwise it will just wrap around which some applications and versions of DOS depend on. My bootloader **MBR1_44** has switched system to protected (*32 bit*) mode at this point. Written for FASM 1.71.17

Member Avatar
+0 forum 0

This is a special purpose boot loader for a system I've called Proto-Sys. Eventually it is going to become a 64 bit application that will encompass all the resources to hook into drivers, benchmark code and optomize algorithms. Synopsis: * Preserve registers as they were passed by BIOS * Create a 64K stack frame just below BDA * Reserve 192 bytes for scratch area at top of frame pointed to by SS:BP * Load remainder of the lowest density disk (7 sectors) * Move that 4K image lower in memory. In this case 6A:0 * Build an E820 memory map …

Member Avatar
+0 forum 0

Floyd-Warshall(G) n=|V[G]| for (int i=1;i<=numNodes;i++) if connection weightmatrix[i][j]=weight; else weightmatrix[i][j] = infinite; if i=j weightmatrix [i][j]=0; for (int k=1; k<=numNodes; k++) for (int i=1; i<=numnodes; i++) for (int j=1; j<=numnodes; j++) a=weightmatrix[i][k]+weightmatrix[k][j]; if(a<weightmatrix[i][j]){ weightmatrix[i][j]=a;} return weightmatrix, matrixintnode;

Member Avatar
Member Avatar
+0 forum 2

Hi every one, I'm a newbie here to daniweb. My computer project is creating an 32-bit/64-bit operating system with x86-64 assembly language and with the (or C++98) C-89 language. This is an interesting hobby, and the plan of my project is to create a simple customizible operating system.

Member Avatar
Member Avatar
+0 forum 3

Basically I have to **copy array X to the stack frame and dump the stack frame on the screen before return from the procedure.** The problem is I have no idea how to do that. Also I am not even sure my program is right. I was wondering if someone could help me fix this program to working order. Thanks! include irvine32.inc .data X sdword 10, -10, 20, -20, 30, -30, 40, -40 .code begin: mov ecx, offset x push ecx call StackProcedure StackProcedure PROC push ebp mov ebp, esp sub esp, 32 lea esi, [ebp-32] mov ecx, 32 L1: …

Member Avatar
+0 forum 0

Hello guys, i'm trying to compute the area of a triangle using the Floating-Point stack (FPU87), but i'm having an issue outputting my value. I'm computing the area using Heron's formula: T = sqrt{s * (s - a ) * (s - b) * (s - c) } Note: s = (a+b+c) / 2 I'm outputting: s * (s - a ) * (s - b) * (s - c), from the FPU87 stack just to make sure it did the calculations correctly, but i'm getting "-nan". I know it means "not a number", but as a test I inputted …

Member Avatar
Member Avatar
+0 forum 2

I am stuck on trying to figure out a few questions. The questions are listed below. 1: Given the data below, design IA-32 instructions to find the octal string for X and save it in Y. .data X word 200 Y byte 6 dup (' ') 2: Given the data below, design IA-32 instructions to calculate the Greatest Common Divisor of numbers in X and save it in Y. .data X dword -12000, 30000 Y dword ? 3: Given the same data below, design IA-32 instructions to replace the first occurrence of string Y in string X with string Z. …

Member Avatar
Member Avatar
+0 forum 1

Hey guys, I'm fairly new to assembly & i'm having trouble iterating through an array; i.e. increasing the index as I loop. I'm working under x86-64 in Linux using NASM. There doesn't seem to be much documentation on the 64-bit architecture. Also, the book i'm using seems to code all the examples in C, then disassembles the code into AT&T syntax assembly. Doesn't really help. Description of my code: After taking in the first input & moving it into slot 0 of the array, I ask if there's more input. If there is, I move into the loop. I think …

Member Avatar
Member Avatar
+0 forum 2

I am creating a simple Operating System called OneFileOS, and I am wondering if I must use a special version of assembler, or if I can use the regular x86 version. Thank You.

Member Avatar
Member Avatar
+0 forum 1

Hi guys. so i wanna code my own Simple Dos-like OS that boots to a prompt with the simple command of "Hello" which should load a message that says "Hello, World!". Would someone be generous enough to give me some source code that just boots and has the command "Hello". I can do everything else from there. all i need is basically the bootloader and the prompt. Thanks!

Member Avatar
Member Avatar
+0 forum 9

Hello! To get straight to the point, I can't seem to get division to work. I haven't been programming in Assembly long, and I've been trying to get this to work for a couple of days now with no success. Anyway, here's my code: [CODE=assembly] section .text global _main extern _write _main: mov al, 5h mov bl, 2h div bl xor bh, bh mov bl, al push 1 push bx push 1 call _write add esp, 12 mov eax, 0 ret [/CODE] It compiles fine, but when I try to run it, all it does is spew out a lot …

Member Avatar
Member Avatar
+0 forum 3

I am studying viruses and trying to figure out how the FLEX module works for C++. I have taken classes before on regular languages, context free, etc. Is FLEX dealing with regular languages or regular expressions, and also what is the difference exactly? Could you give an example of how a flex program works and or point me to a link that does? How it integrates with C++? I am trying to use it to scan for particular code in viruses as a parser.

Member Avatar
Member Avatar
+0 forum 1

So I am taking a class in Viruses and Defense against Viruses. As such there entails much x86 programming. I do know how to program in x86 and the calling conventions and so forth. But that is only because I learned it from my instructor. However, I am not sure how the stack [I]actually[/I] works. Only that you need to preserve the eax, and the pointers. And then you need to push and pop, etc. So I was wondering if I could get a thorough enough explanation that is easier to understand. From what I know so far besides the …

Member Avatar
Member Avatar
+0 forum 1

Help! I need to write some code for SIMD, 64-bit Intel X86. I am fluent with Masm; Where can I get a Masm version for 64-bit, and some documentation as to the changes in registers, changes in instructions set, etc? Anybody here has some experience with AVX ? any usefule sources and tips? Thanks

Member Avatar
Member Avatar
+0 forum 5

Here's the deal. I'm going to explain it in full so you get a good idea of what's happened. Damn Windows Update started installing a video card driver. My system is a Dell Vostro 430 and has an ATI HD 4350 (I think), but however, for some stupid reason it can only work with Dell's video driver. So when Windows Update installed the official driver for me, by the time I realised what it was doing it was too late. My screens went black; an incompatible driver screwed everything up. Worse yet, it was still installing updates, so I was …

Member Avatar
Member Avatar
+0 forum 3

hi everyone! this is my encryption routine (using standard call) in x86 Assembler __ASM{ encrypt: push ebp mov ebp,esp mov eax, [ebp+8] mov ecx, [ebp+12] push eax and eax,0xAA not al mov edx,eax pop eax and eax,0x55 xor ecx,edx xor ecx,eax rol cl,1 rol cl,1 mov eax,ecx sub al,0x20 pop ebp ret } all im trying to do now is Reverse the "encrypt" Algorithms Effect (need to create a DECRYPT routine) if anyone can help me, it would be much appreciated! thanks x ps..if you need any more information, let me know .

Member Avatar
Member Avatar
+0 forum 2

please help with a c program for the following ASM.. [CODE] x is at %ebp + 8, y is at %ebp + 12 movl 8(%ebp), %ebx movl $0, %eax movl $0, %ecx .L13: leal (%eax, %eax), %edx movl %ebx, %eax andl $1, %eax orl %edx, %eax shrl %ebx Shift right by 1 addl $1, %ecx cmpl $32, %ecx jne .L13 [/CODE]

Member Avatar
+0 forum 0

Hi folks! :) I'm here with a problem of Assembly 8086 (x86) (NASM). I´m trying calculate the sum of all numbers, which are odd, lowers than X (X = number defined by user) Already solved the problem in C # and C + +, but i need the Assembly Code. In C#: [CODE="C#"] int num = 0; int res = 0; int all = 0; int soma = 0; num = Convert.ToInt32(Console.ReadLine()); while (all < num) { all++; res = all % 2; if (res == 1) { soma += all; } else { continue; } } Console.WriteLine(soma);[/CODE] In C++: …

Member Avatar
Member Avatar
+0 forum 1

I know many assembly languages so my question isn't anything assembly related it's C++ related, I understand what __asm does and I've used it before but where's where I'm hung up on __asm drops down to the assembly level for programming although it's not advisable to use it because it's not cross-platform compatible... How then is C++ compiled? It's got to be compiled to assembly as well, I've been hung up on this for a while. What does the compiler do that I can't do, not use specific processor features and just stick to general commands/opcodes. Help would be appreciated …

Member Avatar
Member Avatar
+0 forum 1

Ok so i have this floppy image that just prints a message now the problem that i am running into is that i have to jump to memory location 0x1000 and then jump back to the original place but have no clue how to do it this is what mbr looks like on the floppy: (i am using nasm) [CODE]org 0x7c00 xor ax,ax mov es,ax mov ah,0 mov al,3 int 10h mov ah,13h mov al,1 mov bh,0 mov bl,0ah mov cx,mlen mov dh,0 mov dl,0 mov bp, msg int 10h [B][COLOR="Red"];jump to 0x1000 here ;print '$' here[/COLOR][/B] mov dh,1 msg …

Member Avatar
Member Avatar
+0 forum 6

Ok I have been looking for this for a while it is the ultimate list of repositories for the Ubuntu 6.06 Dapper Drake distro. It will give you so many program choices you wont know what to do. simply goto your terminal and type sudo gedit /etc/apt/sources.list (I chose gedit for this because im assuming it is the easiest for people try kate for kde, also nano,vi, and emacs should work) and then add this to the file # Treviño’s Ubuntu Dapper Sources list # http://italy.copybase.ch/blog/?page_id=13 # # Based on source-o-matic (http://www.ubuntulinux.nl/source-o-matic) list # Added extra repository # # If …

Member Avatar
Member Avatar
+0 forum 3

IBM has today announced the availability of an [URL="http://ibm.com/systems/p/Linux/systempave.html"]open beta version[/URL] of its virtual Linux environment to enable x86 Linux applications to run without modification on POWER processor-based IBM System p servers. Designed to reduce power, cooling and space by consolidating x86 Linux workloads on System p servers, it will eventually be released as the roles off the tongue ‘IBM System p Application Virtual Environment (System p AVE).’ With a 31.5% global revenue share during 2006, IBM hopes to build on System p UNIX success and extend firmly into the Linux marketplace. Considering there are almost 2,800 applications that already …

Member Avatar
+0 forum 0

For those who may not have heard, former network leader Novell (who owns SuSE Linux) made a deal with Microsoft exchanging some intellectual property rights. Those in the business-end of IT know that Microsoft is busy applying for thousands of patents concerning Intellectual Property -- have a look at Network Computing and Information Week for all the good details. From Groklaw: Under the Patent Cooperation Agreement, Microsoft commits to a covenant not to assert its patents against Novell's end-user customers for their use of Novell products and services for which Novell receives revenue directly or indirectly from such customers, with …

Member Avatar
Member Avatar
+0 forum 1

What Caused Microsoft to Create DirectX10? It all started with the Windows Error Reporting Tool. Microsoft was collecting hundreds of Bugs per day only for its Operating System. Microsft Found out that 70% of all errors and bad user Experience in Windows XP comes from Graphic Display drivers. First, Microsft saw that most of the Drivers used are not certified (WHQL). Secondly, Microsoft also saw that due to the fact that the Graphic Driver runs in Kernel Mode, if it crashes, it brings the entire Operating System Down. So Microsoft said: “Heck! If we solve the only problem that is …

Member Avatar
Member Avatar
+0 forum 1

Intel officially announced the introduction of 10 Core 2 Duo and Core Extreme microprocessors for desktops, workstations and notebooks. Intel said it has over 550 customer system designs underway, with the CPUs built on 65 nanometre technology. Machines using the desktop chips will be available in early August, while notebooks will become available at the end of that month. Five of the family are aimed for desktops, five for notebook and mobile users. The products were formally codenamed "Cointreau" and "Merom". The chips support 64-32 instructions, so called smart cache which shares L2 cache, wide dynamic execution, and instructions that …

Member Avatar
+0 forum 0

After months of possible merger information it finally happens and I am surprised at the amount of money that AMD had to spend on this. This is a huge step for both companies. Currently Intel is the lead manufacturer of microprocessors, semiconductors, and graphics chips with AMD being the second for microprocessors and Nvidia and Ati battling it out for second in the graphics chips. Now of course Intel graphics chips are like integrated graphics obviously if you need a high end graphics card you would go with a Nvidia, Ati, or some of the other card manufacturers. The only …

Member Avatar
+0 forum 0

The world of malware could be turned upon its head if the Blue Pill virtualization based rootkit due to be demonstrated at the [URL="http://syscan.org"]SyScan 06[/URL] Conference, Singapore, in a couple of weeks proves as undetectable as the security researcher who has created it claims. [URL="http://invisiblethings.org/"]Joanna Rutkowska[/URL] is a stealth malware researcher with a Singapore based IT security business, and specializes in rootkit technology. Using AMD's SVM/Pacifica virtualization technology, she has created a working prototype that not only takes complete control of the underlying operating system but also remains 100% undetectable while doing so. The demonstration will be on the Vista …

Member Avatar
+0 forum 0

I was recently working on a personal project to setup a PVR system for my living room. The first part of this project was relatively easy; I just bought another dell computer. The next step was a little bit complicated, see, personally I would typically like to use an OS that has a portage type system (Gentoo, FreeBSD, etc.), but I felt that I needed a little work on my [url="http://www.rpm.org/"]RedHat Package Management[/url] skills. This required that I use RedHat Enterprise 3 or 4, since the [url="http://fedora.redhat.com/"]Fedora[/url] code uses [url="http://linux.duke.edu/projects/yum/"]Yum[/url] (which I ended up installing anyway). When I first installed …

Member Avatar
Member Avatar
+0 forum 1

At [URL="http://www.supercomp.de/"]ISC2006[/URL], the 21st International Supercomputer Conference, in Dresden, Germany today an interesting announcement was made by [URL="http://www.tyan.com"]Tyan Computer[/URL]: the launch of the Personal Supercomputer. Not quite a desktop machine, it is being marketed as a deskside unit, the [URL="http://www.tyan.com/products/html/clusterservers.html"]Typhoon PSC[/URL] certainly promises to pack quite a punch. The 8 processors and 64Gb RAM delivering a hard hitting maximum 70 Gigaflop punch to be precise. All this in a device no bigger than a couple of standard desktop PCs and bringing low noise and power consumption to what we normally think of as the noisy, high power end of the …

Member Avatar
Member Avatar
+0 forum 6

According to just released research from Michigan based [URL="http://www.onlymyemail.com"]OnlyMyEmail [/URL]Inc it would appear that Sender ID is ineffective as an anti-spam solution. Despite the high profile, and frankly somewhat aggressive PR campaign by [URL="http://www.microsoft.com/mscorp/safety/technologies/senderid/default.mspx"]Microsoft[/URL], the 60 day statistical analysis certainly suggests that it isn’t the Holy Grail of anti-spam that Mr. Gates would have us believe. Across a 60 day period, OnlyMyEmail discovered that emails sent by a domain without a published [URL="http://en.wikipedia.org/wiki/Sender_Policy_Framework"]Sender Policy Framework[/URL] (SPF) record were only slightly less likely to be spam than those sent by domains that publish Sender ID information in their DNS records. But, …

Member Avatar
Member Avatar
+0 forum 1

The End.