389 Posted Topics

Member Avatar for jingo1126

You push each key until you get a linefeed 0ah then only pop one value. 0Dh is carriage return! How many did you push? You need to count them! But using push-pop you're on the right track. Of course this is one method but it will work.

Member Avatar for mathematician
0
105
Member Avatar for maricel91
Member Avatar for MrNoob
Re: Idea

Think Check Writing Program [CODE] ary [] = { Zero, One, ...., Nineteen Twenty, Thirty, Fourty, ... Ninety, Hundred, Thousand }; if (n <= 19) ary[n] else if (n < 100) // 20...99 j = ary[ (n / 10) + 18 ] // Get 10's k = ary[ n % …

Member Avatar for Anjoe18_Edica
0
225
Member Avatar for JasonL220

Assembler issue. I don't work in Linux but try... mov eax, DWORD PTR [esi+edx * 4] ...or some variation of that. Sometimes assemblers get hinky about extra parenthesis. Assembler rules already state that register to left of scalar is scaled!

Member Avatar for wildgoose
0
91
Member Avatar for markfisher

The simple answer is you can't. The .386 and above have a Real Mode and a Protected Modes. Win32 such as XP, Win98, etc. are Protected Mode. DOS is Real Mode. You can't mix and match without a lot of overhead and thunking between overlapped Real Mode and Protected Mode …

Member Avatar for wildgoose
0
157
Member Avatar for codeguru_2009

You're working in 16-bit RealMode but why is your origin at 7c00h ? lodsb is equivalent to [code=Asm] ;16-bit mov al,ds:[si] inc si ;32-bit mov al,ds:[esi] inc esi [/code] I don't see a problem but you are using Video Interrupt 10h, command 0Eh which ah=command, al=character. There is no color …

Member Avatar for NotNull
0
175
Member Avatar for jsuvrat

I'm not familiar with that product but am familiar with various emulators, etc. Same target, same emulator? Check for loose connections on the target. Double check your pins! Your target has all voltages it requires? Verify that! Did the target sustain an electrical discharge? The idea is look for a …

Member Avatar for Salem
0
273
Member Avatar for shopnobhumi

You have a problem with the MARS library. li $v0,1 Print integer mov $a0,$s0 a0 is integer syscall <--- MISSING li $v0,10 syscall #exit

Member Avatar for wildgoose
0
155
Member Avatar for Nathan Campos

Well finally a processor I'm not familiar with. Not 80x86 unless its been macroized as assembly. Is a bit similar looking to MIPS.

Member Avatar for jsuvrat
0
153
Member Avatar for crh0872
Member Avatar for omri374
0
84
Member Avatar for Hawkpath

You don't say where you are in High School but hopefully you are in Honors classes because without them you'll be on the Community College tract. Times change. In the early days of programming you could get a job programming games if you had skills, or knew someone. These days …

Member Avatar for geoffy0404
0
456
Member Avatar for nateuni

You aren't being very clear due to grammatical errors in your posting! ASSUMING You want the employee closest to the average First sum and count the number of employees. If 0 then none If 1 then that employee (or include into the averaging). If more then one sum = 0 …

Member Avatar for nateuni
0
86
Member Avatar for NotNull

Yep! Other methods of access [code=Asm] arr db 1,2,3,4,5 mov bx,offset arradd mov al,[bx+4] mov bx,4 mov al,arradd[bx] [/code] If you were trying to access 16-bit elements [code=Asm] mov bx,4 shl bx,1 mov ax,arradd[bx] or mov bx,4 shl bx,1 add bx,arradd mov ax,[bx] or mov bx,4 mov ax,arradd[bx*2] ;; using …

Member Avatar for wildgoose
0
81
Member Avatar for xenocide001

You need to keep the ASCII text ouside the code flow or it will be treated like code, which it isn't! You need to modify your code as to something as follows! [code=Asm] MOV AH,9 ; Write String to STDOUT mov DX,Hola mov CX,25 prt: int 21h ; DOS -Interrupt …

Member Avatar for xenocide001
0
215
Member Avatar for NotNull

Yep! For REAL mode (16-bit) absolutely true! A slightly more visual method is.. 12340 <-- Seg 1234:0 _0100 <-- Offset 0:0100 --------- 12440 <- 1244:0 1240:40 Same physical address! OR Seg 1234 + (0100 >> 4) Seg: 1244 And set offset to 0

Member Avatar for wildgoose
0
88
Member Avatar for x0s0z0

You did NOT listen!!! I posted on your other two posts to properly post your code. It is assembly language and is WAY too big to make simple prognosis! I had some time to spare this morning so I did what I told you to do but you didn't! I …

Member Avatar for wildgoose
0
116
Member Avatar for x0s0z0

Sorry, what you need is someone with a lot of free time to help you out. First, code tags! Second, COMMENTS! Your code is all crammed together with no comments. One has to understand fully what your code is doing before they can truly help you! Once you fix that, …

Member Avatar for wildgoose
0
280
Member Avatar for vashek

I am assuming you are reading an ASCII file. Do not overwrite the last byte in the file. Get file length. Allocated buffer of size+1. Read file of size into the buffer. Set terminator (that extra byte you appended) buffer[size]=0; It'll handle the empty file scenario! But you really should …

Member Avatar for wildgoose
0
431
Member Avatar for jhouns

Can you explain exactly what you want? Or what your problem is! You are precarious, you draw a diagonal line but step +x,+y, check for x reaching the next waypoint axis exactly (zero flag check), but then check y. If y2-y1 is not equal to x2-x1 then you have a …

Member Avatar for jhouns
0
2K
Member Avatar for s2am

I believe they're 80x86 based now? I have no idea what toolset the current units use. Until a couple years ago they were PowerPC w/AltiVec, before that PowerPC, and before that 68000. They have their own Toolset. My favorite is Code Warrior with the PowerPC / AltiVec. I tend to …

Member Avatar for wildgoose
0
123
Member Avatar for xellos

In its simplest form [code=Asm] mov ah,0 int 1Ah ; TIME - Get System time ; CX:DX = number of clock ticks since midnight ; AL = midnight flag [/code] There are approx. 18.2 clock ticks per second. If you mean the Real-time clock [code=Asm] mov ah,2 int 1Ah ; …

Member Avatar for NotNull
0
2K
Member Avatar for Nathan Campos

How many bytes over are you? There are ways to optimize code! 80x86 uses variable length functions and register AL has the fewest bytes! Compile with a list file output and examine the binary for each line! I've grabbed one block of your code [code] ; MOV BX, 0 ; …

Member Avatar for NotNull
0
134
Member Avatar for xellos

You aren't saying what's happening, and you aren't mentioning your toolset. See if <buffer> is in its own segment or sitting at 0100h in the code instruction pointer path! [code] buffer db 10,?, 10 dup(' ') ; Get Buffered Keyboard input mov dx, offset buffer mov ah, 0ah ; Command …

Member Avatar for NotNull
0
538
Member Avatar for athlon32

Simplify. Use a case statement for handling each side of the die. if you insist on if-then, then use if-elseif-else- Shouldn't you return the value you rolled? Or why go through all that pain. Use a table! [CODE=C] char *Dice[] = { "*********\n" \ "* *\n" \ "* * *\n" …

Member Avatar for MosaicFuneral
0
135
Member Avatar for notsogood

You need to properly align your columns! Here's an example of two else's that you missed because they were hidden by improper file alignment! [code] else if(check_name == CANCEL) { fclose(ptr); StudMenu(); break; } else { check_name = 0; entermiddlename: fflush(stdin); printf("Enter student middle name: "); gets(a_mname); check_name = BlankCatch(a_mname); …

Member Avatar for notsogood
0
1K
Member Avatar for Wybert Randy

You really should start your own post with this as other then communications it's a different project! You first need to determine how you are going to detect trash level. Keep in mind a particle of trash isn't always small. And large skinny objects quite often get put into trash …

Member Avatar for wildgoose
0
118
Member Avatar for pwnz32

Debug run vs Release not run is quite often an initialization error. Memory typically isn't initialized in Release. Your constructor shold initialize your data members to a known good value. Before use.

Member Avatar for wildgoose
0
145
Member Avatar for Nathan Campos

You're using the 0x10 VIDEO BIOS services handler for your video handling so use the 0x16 KEYBOARD BIOS services handler for your keyboard handling! [code] ; Get Keyboard value (and wait for press) mov ah,0 int 16h ; KEYBOARD ;ah=scan code al=ASCII character [/code]

Member Avatar for Nathan Campos
0
214
Member Avatar for xellos

You really don't have enough for a useful snippet. It doesn't do anything! Takes input then terminates! And you need more comprehensive comments. Something more like... [code] ; Get a character from input with echo in al mov ah,1 ; CMD: Get single char int 21h ; DOS interrupt . …

Member Avatar for Nathan Campos
0
124
Member Avatar for aj07

This is the best I can do until you start to post your own realistically attempted code. Bite sized chunks. Make your ASCII and integer print functions then test! Try to rework your functions in C into a simpler form! You can use an ASCII table [code] char szHex[] = …

Member Avatar for Nathan Campos
0
99
Member Avatar for homeryansta

Integer versus the Floating-Point processor. You're adding Floating-Point result of the reciprocal addition onto the integer register! N fTally = 0.0 fOne = 1.0 [code] while N fN = N f = 1.0 / fN fTally = fTally + f N-- end while [/code]

Member Avatar for Nathan Campos
0
112
Member Avatar for homeryansta

What were the rules your teacher gave you? Which flavor of MIPS are you using? There are scalar and vector square root functions and estimated reciprocal square root vector functions, dependent upon which MIPS family chipset you're using! There are also algorithmic guesstimation formulas for integer only processors.

Member Avatar for wildgoose
0
2K
Member Avatar for Nathan Campos

Ahem! I appreciate the thoughts but no thanks. As of this coming Monday my free time will be severly taxed so I might find time to help with the various assemblies but will have to back off all the other sub-forums. There are many other capable programmers out there that …

Member Avatar for Dave Sinkula
0
103
Member Avatar for jingo1126

Actually your code needs work. Compare what you have to the following... [code=Asm] .model small .stack 100h .data .code start: mov ah,1 ; input character from keyboard (with echo) int 21h ; DOS Interrupt ; al = character mov dl,al ; Save character mov ah,1 ; input character from keyboard …

Member Avatar for wildgoose
0
182
Member Avatar for Nathan Campos

Spelling of your ASCII$ string buffer. To be consistent [code=Asm]LEA DX, message[/code] And the missing $ terminator! [code=Asm]message DB 'Test!$'[/code] or [code=Asm]message DB 'Test!','$'[/code]

Member Avatar for Nathan Campos
0
219
Member Avatar for Nathan Campos

I'm not sure of what you're trying to say, but DOS interrupt is 21h ; 21 Hex not 21 decimal. DOS terminate is 20h ; 20 Hex not 20 decimal In the assembler you enter -E 0200 and I'm assuming you mean 0200h (hex) not 200 (decimal) You entere -A …

Member Avatar for Nathan Campos
0
1K
Member Avatar for low1988

Okay, I'm confused. I'm assuming you're debugging up first and so that's why only 'w' is supported. [code] do{ cin >>numsquare; if ((ro-numsquare) < 0 ) cout <<"The number of square is not in the range,enter again:"; }while((ro-numsquare)<0); ???? You wish to move up numsquare, but I don't see what …

Member Avatar for mrnutty
0
146
Member Avatar for allynm

How about a function table! No macro! [code] funcA: mov eax,1 ret funcB: mov eax,2 ret funcC: mov eax,3 ret funcTbl: dd funcA, funcB, funcC ;;; and in your code mov eax,1 cmp eax,3 jae bypass call cs:funcTbl[eax*4] bypass: ret [/code]

Member Avatar for wildgoose
0
173
Member Avatar for tomtetlaw

MASM is my thing when linked with Visual Studio. Not NASM but I'll try to help... Assemble First.asm into an Win32 object file First.obj C:\Documents and Settings\tom\Desktop\Assembly>nasm -f win32 First.asm -o First.obj Seems okay C:\Documents and Settings\tom\Desktop\Assembly>gcc First.obj -o prog.exe C:\Documents and Settings\tom\Desktop\Assembly>prog.exe C:\Documents and Settings\tom\Desktop\Assembly> Try moving the .data …

Member Avatar for tomtetlaw
0
166
Member Avatar for sameeraict

Your problem is pretty simple! Think of it as a kind of two dimensional array. You can solve it by calculation but visualy. <i> --- N = 1 1 X N = 2 1 XX 2 X N = 3 1 XXX 2 XX 3 X N = 4 for …

Member Avatar for sameeraict
0
129
Member Avatar for fuggles

I've haven't used this library but from what I've seen... [code] #include <al/al.h> //#include <al/alc.h> //#include <al/alu.h> #include <al/alut.h> [/code] I've only seen al.h and alut.h included. the others are internal libraries and may be interferring with thedefinitions?

Member Avatar for fuggles
0
160
Member Avatar for kindnumbernine

Here's a link to a forum with someone with a similar problem. [url]http://www.nabble.com/How-to-call-MessageBoxA-from-Nasm-program--td23420607.html[/url] For this kind of problem, posting code would be more beneficial!

Member Avatar for kindnumbernine
0
497
Member Avatar for jakx12

Why would you? You need low level access to Input / Output ports, chip system only instructions, etc. High level languages do not do everything the assembly instructions do! In fact High level lanaguages are built upon a near majority, but not all of the processors instruction set!

Member Avatar for NotNull
0
167
Member Avatar for malugirl4

That doesn't make sense. You have a Java class and the Java instructor is telling you to code in Assembly? Or is this an Assembly class but where does Java come in? The first thing you have to do is un-Java it. That is un-object oriented it. What assembler are …

Member Avatar for wildgoose
0
5K
Member Avatar for nunos

No matter how you do it, the fraction part is the result of the remainder / divisor so still need a division! Could fake it somewhat. In integer part % ----- = ------- whole 100 So could calculate a whole integer form of the remainder and stick your own decimal …

Member Avatar for nunos
0
186
Member Avatar for tomtetlaw
Member Avatar for tomtetlaw
0
2K
Member Avatar for justin105

So you have no electronics background so you're looking for off the shelf components so as to build your project. You want to do sensor monitoring but keep focusing on a camera, which you really don't need. You in essence need to detect existence of a vehicle. The camera will …

Member Avatar for JameB
0
678
Member Avatar for toucan

bool gFlag = true; Event sets flag to false, and causes thread to fall out of loop! Simple but effective! // while (true){ while ( gFlag ){ Don't sleep your thread so long. If you need 1000ms timing then [code] int nSnooze = 1000; while ( gFlag ) { Sleep(25); …

Member Avatar for JamesCherrill
0
182
Member Avatar for chikool

A for loop is like a while loop, note the components below [code] for (int m = 0; m < 4; m++ ) int m = 0; while ( m < 4 ) { m++ } [/code] In your code you have the initializer int m = 0 You have …

Member Avatar for dgr231
0
112
Member Avatar for eaon21

Which terminal he will put his PC ? Are there 20 pre-existing x,y coordinates or are you setting the coordinate for each terminal you say exist? This is a form of path traversal. This can be done more easily with recursion! Is this a single line and each terminal is …

Member Avatar for eaon21
0
150

The End.