Search Results

Showing results 1 to 23 of 23
Search took 0.01 seconds.
Search: Posts Made By: Salem ; Forum: Assembly and child forums
Forum: Assembly Aug 21st, 2009
Replies: 8
Views: 521
Posted By Salem
Aww, and I was hoping they might have to figure out the sub al,'0' thing for themselves....
Forum: Assembly Aug 21st, 2009
Replies: 8
Views: 521
Posted By Salem
mov ah,1h ; input number
int 21h
mov dl,0ah

The result is returned in al
http://www.ctyme.com/intr/rb-2552.htm
Forum: Assembly Feb 17th, 2009
Replies: 6
Views: 789
Posted By Salem
Dunno, it's been 15+ years since I last did any 68K work.

But the essence of arrays is to load the address of an array into an 'a' register, and load the subscript into a 'd' register.

Then...
Forum: Assembly Feb 14th, 2009
Replies: 5
Views: 506
Posted By Salem
Well /2 is commonly achieved by doing >>1 (aka ASR in assembly).
Only the compiler probably knows a few more tricks than that.

Like I said, you're pitting your knowledge against the distilled...
Forum: Assembly Feb 14th, 2009
Replies: 5
Views: 506
Posted By Salem
That compilers are smarter than you perhaps?

> I literally picked up asm today.
Whereas the combined asm experience of all the people who wrote the compiler is probably in the 1000+ YEAR...
Forum: Assembly Jan 12th, 2009
Replies: 3
Views: 720
Posted By Salem
Well you didn't read this - http://www.daniweb.com/forums/announcement125-3.html

And you didn't say which assembler (nasm,tasm,masm,?asm) you're using. Do you get any error messages perchance?
...
Forum: Assembly Jan 8th, 2009
Replies: 12
Views: 1,253
Posted By Salem
> since asm is basically ALL about algorithms?
And every other language isn't?
Algorithms and data structures are abstract, they don't need a programming language in order to understand them,...
Forum: Assembly Jan 7th, 2009
Replies: 12
Views: 1,253
Posted By Salem
Knowing how the internal combustion engine works doesn't necessarily mean you're a better driver.

I've seen many experienced asm programmers turn out the most abominable C you're ever likely to...
Forum: Assembly Jan 6th, 2009
Replies: 12
Views: 1,253
Posted By Salem
> so why would one need to know assembly?
Curiosity mostly.

Being able to follow the code the compiler generates, and very rarely writing very small snippets works for me.
Forum: Assembly Dec 9th, 2008
Replies: 7
Views: 1,520
Posted By Salem
I'd guess your code.

Get better information by posting your actual code.
Forum: Assembly Dec 1st, 2008
Replies: 6
Solved: code snipp
Views: 671
Posted By Salem
http://x86.org/
Forum: Assembly Aug 21st, 2008
Replies: 1
Views: 843
Posted By Salem
> PUSH 6(BP) ! here i'm putting romfile on the stack again
It's the way a compiler would do it.

> another solution would be to have a register (BX maybe?)
Also a possible way, for example...
Forum: Assembly Jul 22nd, 2008
Replies: 1
Views: 924
Posted By Salem
Sure, just use the "add with carry" instruction, and you can add as many as you like.
Forum: Assembly Jun 10th, 2008
Replies: 2
Views: 1,182
Posted By Salem
SS means stack segment.

EBP typically moves around with ESP (BP=Base Pointer, SP=Stack Pointer).

The BP is typically used to establish a fixed point of reference for a stack frame. BP + offset...
Forum: Assembly May 22nd, 2008
Replies: 4
Solved: Wierd Chars
Views: 961
Posted By Salem
How about
msg db 'Simple Bootloader',0
Forum: Assembly May 22nd, 2008
Replies: 4
Solved: Wierd Chars
Views: 961
Posted By Salem
What marks the end of the string?
IIRC, some of the really low level interrupt routines used '$' to mark the end of the string.
Forum: Assembly May 21st, 2008
Replies: 5
Views: 1,363
Posted By Salem
Well you use 'divide by 10' and 'modulo 10' to extract each digit from the number, then add '0' to the result to get a printable character.

123 / 10 = 12
123 % 10 = 3
Take the 3, add '0' to it...
Forum: Assembly May 21st, 2008
Replies: 5
Views: 1,363
Posted By Salem
That sounds like a reasonable approach.
Forum: Assembly May 16th, 2007
Replies: 4
Views: 1,608
Posted By Salem
An easy implementation of a stack is simply an array which you only access at one end.
Forum: Assembly May 8th, 2007
Replies: 2
Views: 3,298
Posted By Salem
Indispensable reading.
http://www.cs.cmu.edu/afs/cs/user/ralf/pub/WWW/files.html

Int 16/AH=01h perhaps.
Forum: Assembly May 4th, 2007
Replies: 12
Views: 3,422
Posted By Salem
> I can't implement bresenham algorithm on assembly. It's too hard to do so.
So give up already and go back to doing things in a high level language if you can't deal without all the creature...
Forum: Assembly May 2nd, 2007
Replies: 12
Views: 3,422
Posted By Salem
Use the link I posted.

Calculate a series of XY positions that get you from the start to the end.

For each position, call INT10H function AH = 0CH, with the other registers set to the colour...
Forum: Assembly Apr 29th, 2007
Replies: 12
Views: 3,422
Posted By Salem
http://en.wikipedia.org/wiki/Bresenham%27s_line_drawing_algorithm
Showing results 1 to 23 of 23

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC