Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Art of Assembly

Author
Message
Chiwawa
22
Years of Service
User Offline
Joined: 13th Oct 2002
Location: Canada
Posted: 19th Jul 2003 18:01
hi ... i know its not really the place to ask that but...

does someone know IF there is answer to the exercises for this book?:

"Art of Assembly by Randall Hyde" 16 bits one...
website: "http://webster.cs.ucr.edu/"

cause im at the end of chapter 3 ...... and i have some prob with the exercises....
Kanzure
21
Years of Service
User Offline
Joined: 19th Feb 2003
Location:
Posted: 19th Jul 2003 19:34
You may try searching google for College Student's websites, as some nice ppl mostly put up everythign they learn in college &..ASM is most likely one of the subjects.

~Morph/Kanzure
CodeNation
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 19th Jul 2003 20:52
you know you'd be better of asking about what exactly your trying to achieve.

asm is pretty simple to understand and get to grips with once you have the basic syntax down & variable op codes learnt.

Chiwawa
22
Years of Service
User Offline
Joined: 13th Oct 2002
Location: Canada
Posted: 19th Jul 2003 21:45 Edited at: 19th Jul 2003 21:46
ok they ask me to make a prog who take 2 number from user and multiplicate them.....i did it...but...it seem to be a little bit long.....

then i ask does it can be shorter?

MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 19th Jul 2003 23:13
Now, it that was RISC assembly, it would just be :

MUL R0,R1,R2

Lets see if I can still do 6510 :

; A - Result
; X - Mult #1 (loop)
; Y - Mult #2 (value to add)

LDA #0
CPX #0
BEQ end

STY $C000

.loop
ADD $C000
DEX
CPX #0
BNE loop

.end
RTS

Yes, I suspect your assembly can be shorter...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins and other exciting things - oh my, yes!
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 19th Jul 2003 23:48
yeah it could be much shorter...

i'd probably do something more like

CALL EAX ;call eax contents
BT ECX,0 ;text bit 0 of ecx
MUL ECX ;multiply ecx contents by eax contents
SUB ESP,30h ;place new 32bit multiplication into the stack for local data

i'm sure there are a few other ways though

Chiwawa
22
Years of Service
User Offline
Joined: 13th Oct 2002
Location: Canada
Posted: 20th Jul 2003 00:14
yeah but.... in 16 bits (dos)
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 20th Jul 2003 02:08
fair enough... just delete the e's it should work identically

Login to post a reply

Server time is: 2024-11-23 12:27:33
Your offset time is: 2024-11-23 12:27:33