I have written a bootloader in ASM (I can post code if you like) and I plan to write a kernel in C /c++ because I don't want to have to deal with a Kernel written ENTIRELY in ASM. Is there any way (Got to keep this under or at 512 bytes) to allow the bootloader, written in ASM, to pass control (like call a method or something) to the C kernel? I'm a newbie to this kind of thing, and I thought I would ask the pros. Please be nice, this is my first post! :icon_cheesygrin:

Member Avatar
Member Avatar
+0 forum 9

My question is clear ^^ How to clear keyboard buffer?

Member Avatar
Member Avatar
+0 forum 3

I am using this lex program to analyze the usage of each register, whether they are used as a source, a destination, or used as an indirect addressing, these are my codes, i have to analyze all 12 registers...is there any other efficient way to do these as oppose to declaring 36 variables, and 36 rules? (I am a student). %{ #include <stdio.h> int q,w,e,r,t,y,u,i,o,p,a,s = 0; %} %% [push|dec]?+[ ]+(eax|EAX)+[,] q++ ; [,| ]+(eax|EAX)+[ ]? w++ ; ['[']+(eax|EAX)+[ ]? e++ ; [push|dec]?+[ ]+(ebx|EBX)+[,] r++ ; [,| ]+(ebx|EBX)+[ ]? t++ ; ['[']+(ebx|EBX)+[ ]? y++ ; [push|dec]?+[ ]+(ecx|ECX)+[,] u++ ; [,| …

Member Avatar
Member Avatar
+0 forum 1

Hey guys is there a funtion in python that enables to output values to a bin files? Just like storing strings in .txt files, can we store hexadecimal values directly into .bin files? I am working using Python 2.7.3

Member Avatar
Member Avatar
+0 forum 4

Hello guys, I'm using MapViewOfFile to map a file and try to edit its data and save it on the file. The problem I have extra data to the file required to expand its size. So, how to append data to the end of memory mapped file using CreateFileMapping and MapViewOfFile?

Member Avatar
Member Avatar
+0 forum 2

hey guys this c++ code which needed to convert to asm and when user enter 2000 the clock shoud show lest then 5 sec.... for (a=0; a<=y; a++) for (b=0; b<=y/2; b++) for (c=0; c<=y/3; c++) if ((a + 2*b + 3*c) == y) count++; this is the question -finds the solution for the equation a + 2b + 3c = y, where a, b, c, y are natural numbers (0,1,2,....). Given the value of y, the program find out all the possible cobinations of a, b and c. and after i convert to asm there is eror in divide.. …

Member Avatar
+0 forum 0

Dear all, i am soon entering 11th grade and will be studying c++ in full length. I want to learn another language to compliment it which can provide me the freedom to over a variety of devices and paltforms. I have chosen asm(assembly) as i think it very basic to all systems. I have had som difficulty in finding tutorials for it. Please suggest a language and also provide where can i have the detailed tutorials. Thanks in advance.

Member Avatar
Member Avatar
+0 forum 1

title Lab_Tutorial_1 .dosseg .model small .stack 100h .data input db 99 dup(0) msg1 db 0ah, "Enter a string (max of 99 characters) : " ,0ah,0dh, '$' msg2 db "Filtered result : " ,0ah,0dh, '$' msg3 db "Number of alphabets : $" msg4 db "Press any key to end.....$" blank db 0ah, 0dh,'$' .code main proc mov ax, @data mov ds, ax mov si, offset input mov dx, offset msg1 mov bh, 0 ;bh is used as a counter for alphabets mov ah, 9 int 21h mov dx, 1 ;dl is used as a counter for max characters again : mov …

Member Avatar
Member Avatar
+0 forum 2

Dear Friends, i need the code for Digital Clock using 8086 in assembly language.. please help me.. i know nothing about assembly.. Please help me somebody i have found a code but its not working properly. please let me know if you want to explain the code, i'll provide it.. please help me anybody..!!!! please please!!

Member Avatar
+0 forum 0

Hello all, I am writing assembly based off the following example paper: http://lestourtereaux.free.fr/papers/data/yuvrgb.pdf It is attempting to convert YUV values to RGB. It does this by using precomputed values in lookup tables for each possible Y,U,V value. Here is an example lookup table: static const unsigned short CoefficientsRGBU[256][4] = { {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, ... {14465, 62734, 0, 0}, {14465, 62734, 0, 0}, {14465, 62734, 0, 0}, {14465, 62734, 0, 0}, }; The problem I have is at the first offset to one of the look up tables …

Member Avatar
+0 forum 0

Hello all, I am having some trouble with my assembly code...still kind of new, but here it goes... The assignment is to desing an assembly program that uses a dialog box to prompt the user for a number. These numbers will be stored in an array. There will be an output message that shows the following: sum of numbers entered, how many numbers were entered(not counting the -9999 to end the program), the aerage of the numbers, and the count of array entries that are greater that or equal to the average value. All help is appreciated! Here is my …

Member Avatar
Member Avatar
+0 forum 2

I am having some problems with my "sum of numbers program," and cannot figure out why I am not getting the correct answers. This is my first Assembly programming class, so take it easy on me, please. The assignment is: Prompt a user for an integer n, compute the sum of the integers from 1 to n, and display the sum. ex: user inputs "5". 1+2+3+4+5=15. Output "The sum is: 15" Here is what I have so far: .586 .MODEL FLAT INCLUDE io.h ; header file for input/output .STACK 4096 .DATA sum DWORD 0 prompt BYTE "Enter a number: ", …

Member Avatar
Member Avatar
+0 forum 2

How do I do assembly code with the mingw-g++ compiler. All the websites I checked say that this should work: [CODE]int add(int a, int b) { int c=0; asm("mov %[aVal],%eax;add %[bVal],%eax;mov %eax,%[cVal]" : [cVal] "=i" (c) : [bVal] "i" (b) : [aVal] "i" (a)); return c; }[/CODE] But instead I get the following compiler errors: D:\Programming\C++\test\main.cpp||In function 'int add(int, int)':| D:\Programming\C++\test\main.cpp|10|error: expected string-literal before '[' token| D:\Programming\C++\test\main.cpp|10|error: expected ')' before '[' token| D:\Programming\C++\test\main.cpp|10|error: undefined named operand 'aVal'| D:\Programming\C++\test\main.cpp|4|warning: unused parameter 'a'| ||=== Build finished: 3 errors, 1 warnings ===| What is wrong with that code? How do I do assembly …

Member Avatar
Member Avatar
+0 forum 1

Earlier when I came here I had only a minimal set of utilities and a WinXP comp.. Now i'm here and serious, with kubuntu (and Internet!!!!) and willing to learn all of that dd, mov, eax, and bochs stuff. Here is my delemia: I have a C++ Program, have no idea how to make a simple bootloader for it. From other questions it boiled down to these: Initialize the FAT filesystem Start the program. How? I need to know what dd and asm commands to use in terminal too as I have had a bad history with bochs and dd …

Member Avatar
Member Avatar
+0 forum 4

Hi, in a given c program where you have [CODE]myvar = sumR(char * arg1, int arg2)[/CODE] sumR is a function in an assembly .s file. I have done all the calculations, but I have no idea how to return the value to the calling c program. Any ideas? Thanks so much.

Member Avatar
Member Avatar
+0 forum 3

ARM's ASM is a breed in it's own. AMD and Intel, although different, have more closely related assembler than most. Someone mentioned the other day that AMD is just an Intel repeat, basically copying engineering designs and repeating them with reduced cost (as they don't pay to have it designed, just built). Do you believe that there is any truth in that? Is Intel consistently ahead of the curve, or is it a more even balance? On a personal note, I've always used Intel.

Member Avatar
Member Avatar
+0 forum 2

Hi, I am tasked with writing selection sort in assembly. We are writing for the ARM processor. Currently, this is what I have: [CODE] sort2: 73 stmdb sp!, {v1-v5, lr} @ Copy registers to stack 74 ldrb r5, [a2] @ J = n 75 76 ldrb v2, [a1] 77 cmp a2, #1 78 beq skip_sorting 79 80 sub r5, r5, #1 @ j = N-1 81 outer_loop: 82 cmp r5, #0 @ j > 0 add j-- at the bottom 83 beq skip_sorting 84 85 inner_loop: 86 mov r6, r5 @ k = j 87 sub r6, r6, #1 @ …

Member Avatar
+0 forum 0

Ola! I'm still kind of new with the whole assembly language and just need some help with this program i'm writing. What I want it to do is to ask a question -like for a number and then store that inserted number in a variable. And then test whether its bigger than 14 which I declared as a variable already as shown below-and then there is a loop to ask again what is the number. So I want the loop to run as many time the number the user entered. [CODE]output db 10,13, "Enter your number: $" asq dw 10,13, …

Member Avatar
Member Avatar
+0 forum 5

Can someone help me with TASM? i need a simple shape like sun or anything that is not very basic but hard to do. please i need help. this is one of my gf's finals project requirement :(( please i really need help in this. (i dont know much about tasm and assembly at this time as i am just a first year college I.T student) and my gf is 2nd year I.T student. please help. i really need just one. :(( thanksss!

Member Avatar
Member Avatar
+0 forum 11

How much longer until I'm the king of typos and stupid questions? Ok well in a different thread of mine there was a reference to BIOS.h. Does anyone know where to download it (If I don't have it comp making tarball sooo slow) or/and what's in it. I want to know what's in it first.

Member Avatar
Member Avatar
+0 forum 3

Is it possible to use [URL="http://msdn.microsoft.com/en-us/library/45yd4tzz%28v=VS.80%29.aspx"]__asm blocks[/URL] with Code::Blocks IDE? And if so how??

Member Avatar
Member Avatar
+0 forum 1

Hello.. I've been trying to create a simple postfix calculator.. Can anyone please tell me how I can input a char in assembly? i tried using char as a data type but i found out that there's no such thing as char in assembly.. Please help me.. thanks!

Member Avatar
Member Avatar
+0 forum 7

I herd that some C++ compilers can use asembly languige in there programs along side C++, How would I do This? And is there any way to use a compiler as an assembler? <<two questions.

Member Avatar
Member Avatar
+0 forum 1

This is my OS that I've been working on for almost 3 months now (not all at once.. in periods of a few days each time). Would anyone skilled in NASM mind looking at parts of it and give me their opinion on my code? Note that there are many files; I'll do my best to organize it all right here. Anybody can use any of this code as long as my name is in the credits. :) [URL="http://pastebin.com/sEutJFwS"][COLOR="Red"]Boot.asm[/COLOR][/URL] [COLOR="Green"]--[/COLOR] [URL="http://pastebin.com/Ft5GSs3A"][COLOR="Red"]Kernel.asm[/COLOR][/URL] [URL="http://pastebin.com/DDdV4eer"][COLOR="Red"][COLOR="Red"]Includes.asm[/COLOR][/COLOR][/URL] [COLOR="Green"]--[Kernel][/COLOR] [URL="http://pastebin.com/QfrZn5iS"][COLOR="Red"]Calls.asm[/COLOR][/URL] [URL="http://pastebin.com/KSvrXCNv"][COLOR="Red"]Macros.asm[/COLOR][/URL] [COLOR="Green"]--[Kernel menu stuff][/COLOR] [URL="http://pastebin.com/NJsYVas4"][COLOR="Red"]Buttons.asm[/COLOR][/URL] [URL="http://pastebin.com/DK7Y1ugi"][COLOR="Red"]Core.asm[/COLOR][/URL] [URL="http://pastebin.com/n7T09QLe"][COLOR="Red"]Msgbox.asm[/COLOR][/URL] [URL="http://pastebin.com/w2LF2D4d"][COLOR="Red"]Textbox.asm[/COLOR][/URL] [COLOR="Green"]--[Kernel game engine][/COLOR] [URL="http://pastebin.com/4aG83ZRv"][COLOR="Red"]Engine.asm[/COLOR][/URL] [URL="http://pastebin.com/hTmQSp2m"][COLOR="Red"]#Macros.asm[/COLOR][/URL] [URL="http://pastebin.com/uYSbE2fd"][COLOR="Red"]Crate.asm[/COLOR][/URL] [URL="http://pastebin.com/XxSUrLCg"][COLOR="Red"]Fences.asm[/COLOR][/URL] [URL="http://pastebin.com/X40Csavm"][COLOR="Red"]Player.asm[/COLOR][/URL] …

Member Avatar
Member Avatar
+1 forum 2

Hi everyone, I'm new to this site and hope you might be able to help me out? So I've been given an assignment to produce this output [CODE]% ./hw4b foo here foo and foo there % ./hw4b ABC123 here ABC123 and ABC123 there % ./hw4b 'where is' here where is and where is there[/CODE] using asm to insert the word/phrase, and only these libraries: stdlib.h, stdio.h, & string.h. I've already done most of the the C coding (shown below) I think, but I'm stuck on the asm assembler code insertion. [CODE]#include <stdlib.h> #include <stdio.h> #include <string.h> char word[] = "here …

Member Avatar
Member Avatar
+0 forum 5

Hi I am beginner in assembly and was wondering how the program works below follow the images CheatEngine Pointer: [URL="http://i54.tinypic.com/2l6lue.gif"]http://i54.tinypic.com/2l6lue.gif[/URL] Dissembler CheatEngine [URL="http://i52.tinypic.com/2ekq4uv.gif"]http://i52.tinypic.com/2ekq4uv.gif[/URL] thanks

Member Avatar
+0 forum 0

Hello everyone. I am wondering how to get started with ASM. I tried a few times to install things like radASM (and others) but I don't really know what they are all for. Can someone just tell me how to get started and about compilers/builders? Thanks.

Member Avatar
Member Avatar
+0 forum 3

i want to make a OS and i need to link the c++ file. How i can make a .o file?

Member Avatar
Member Avatar
+0 forum 1

guys i need a assembly x86 compiler..in windows i use MASM615..i dont want to code on windows.i do all my coding in java and C..on linux pleas some help for asm compile on ubuntu 10.10 .

Member Avatar
Member Avatar
+0 forum 1

I have a asm boot on a floppy disc and i want to show a c++ kernel (cuz c++ are easy). but how can i link it? I heared somethig about : extern _main call _main for asm. Can anyone help me? :'(

Member Avatar
Member Avatar
+0 forum 3

The End.