Forum: Assembly 27 Days Ago |
| Replies: 2 Views: 352 Review how VIDEO BIOS Interrupt 10h is suppose to function!
You indicate string doesn't contain attributes with AX,1300h
BUT Never set BL to indicate attribute to use!
ALSO DL=column ... |
Forum: Assembly 27 Days Ago |
| Replies: 2 Views: 425 ????
addi $t0, $t0, 0 # increment address in $t0
N = N + 0
Did you cut'n'paste improperly?
Is code missing? |
Forum: Assembly 33 Days Ago |
| Replies: 7 Views: 354 Command line Arguments are typically passed in one of two ways to a program at startup.
int count count of arguments
char *argv[] array of arguments
This seems to... |
Forum: Assembly 33 Days Ago |
| Replies: 7 Views: 354 Can't do that, you don't have code! |
Forum: Assembly 33 Days Ago |
| Replies: 7 Views: 354 code?
Are you trapping for a keyword mult?
How about trapping for operators
3 * 4
12
1 + 2
3 |
Forum: Assembly 33 Days Ago |
| Replies: 1 Views: 320 Okay, I'm flipping this back at you. Note the comments and decide for yourself!
By the way. Did you mean
((xvy)^z)*2
((x OR y ) AND z ) * 2
then next time...
((x | y) & z) * 2
Or did you... |
Forum: Assembly 33 Days Ago |
| Replies: 1 Views: 310 Use a register to increment.
Use a register as memory reference that you increment.
Use a register for value loaded from memory.
Use a register for current max index.
You need to try to do... |
Forum: Assembly 33 Days Ago |
| Replies: 3 Views: 392 You can download processor books but my favorite reference is the 32/64-bit 80x86 Assembly Language Architecture Book.
Your mathematical operation and/or compares will set conditional flags.
You... |
Forum: Assembly 33 Days Ago |
| Replies: 4 Views: 424 You aren't being very clear!
If you are using a more recent computer but somehow using an old DOS interface and not in an emulator, then you can use 32-bit instructions in Real Mode. An operand... |
Forum: Assembly 34 Days Ago |
| Replies: 6 Views: 429 Sorry we digressed but this website policy is that we can't post code except in response to helping you correct your posted code. Since you haven't posted code our ability to help you is limited! |
Forum: Assembly Oct 25th, 2009 |
| Replies: 4 Views: 282 PEP8 doccumentation is NIL!!!
[code]
; 1100 raaa Load register r from memory
0000 C1000C 1100 0011 - 000C LDA FirstNum,d ; A: = first number
; 0001 100r NOT of Register R
0003... |
Forum: Assembly Oct 25th, 2009 |
| Replies: 4 Views: 282 That part was obvious.
I'm not familiar with PEP8 but am with many other processors.
Use your table lookup and convert the binary back into pseudo source code to make it readable! |
Forum: Assembly Oct 25th, 2009 |
| Replies: 4 Views: 282 Why are you showing us the binary output.
Please show the source code used to generate that binary output or atleast the list file that contains both binary and the source assembly! |
Forum: Assembly Oct 25th, 2009 |
| Replies: 6 Views: 429 Actually pretty straight forward! Two months no problem! And I need the work! My employer sent us all home over three weeks ago. |
Forum: Assembly Oct 24th, 2009 |
| Replies: 6 Views: 429 This sounds more like an engineering task. There are websites like guru.com, etc. where you can post this kind of thing and find someone to build it for you! You will need to indicate whether you're... |
Forum: Assembly Oct 24th, 2009 |
| Replies: 1 Views: 390 I'm VERY VERY rusty on a 68HC12
ldy #16 ;Loop 16 times
Loop:
asld ; Carry <- A <- B <- 0 MSB in carry
psha
? ; a = Sum
adda a,0 ;... |
Forum: Assembly Oct 20th, 2009 |
| Replies: 10 Views: 577 Not familiar with EMU8086 and assuming you can't use an alternate tool you can do it this way!
; Alpha sorted for speed
Label FoodTable
DWORD offset xApple, iApple
DWORD offset... |
Forum: Assembly Oct 19th, 2009 |
| Replies: 10 Views: 577 Almost.
That's your initial get the code working step.
Then, once it works, since the text is alpha sorted, and the records are fixed size, do a binary search.
Look a record COUNT/2, Is it,... |
Forum: Assembly Oct 19th, 2009 |
| Replies: 10 Views: 577 There's usually hundreds of commands in a scripting language so would mean more like...
iApple = 1
iPear = 2
iCorn =3
iDog = 4
iGrape= 5
xApple db 'Apple',0
xCorn db 'Corn',0 |
Forum: Assembly Oct 19th, 2009 |
| Replies: 10 Views: 577 A command line selector should be a table of ASCII commands with associated enumeration. When a string match is found, then use the enumeration with a jump table to call that command handler! |
Forum: Assembly Oct 19th, 2009 |
| Replies: 2 Views: 299 I think you misunderstand the syscall function. It doesn't return a four byte integer. It returns a string!
You also aren't setting $a1 to maximum number of characters to read - 1. The function... |
Forum: Assembly Oct 19th, 2009 |
| Replies: 4 Views: 584 This may make your issue more obvious...
Quotient : Remainder = Dividend / Divisor
AL : AH = AX / (8-bit)
AX : DX = DX:AX / (16-bit)
EAX : EDX = EDX:EAX /(32-bit)
You needed to specfy a... |
Forum: Assembly Oct 18th, 2009 |
| Replies: 1 Views: 181 There is absolutely no reason for someone to be messing around with the binary in this era of assemblers and compilers. But if you are overly curious, run your debug. Open the command prompt and type... |
Forum: Assembly Oct 18th, 2009 |
| Replies: 7 Views: 422 Different ways to solve your problem, but first a near relative jump is +127....-128
You can use an inverse branch logic.
if ! NeedToJumpUP goto next
jmp far above
next: |
Forum: Assembly Oct 18th, 2009 |
| Replies: 1 Views: 252 The ASR Arithmetic Shift Right instruction affects four flags.
N (Negative) Bit set if sign bit (MSB) is set!
Z (Zero) Bit set if result is zero.
C (Carry) Bit Set with previous value in LSB. ... |
Forum: Assembly Oct 16th, 2009 |
| Replies: 5 Views: 329 According to your other post you mention entering integers with that many digits and parsing each digit. Why are you now entering as a Single-Precision Floating-Point value and having the system call... |
Forum: Assembly Oct 16th, 2009 |
| Replies: 5 Views: 329 You are getting exactly the error I'm talking about! That's one of the reason you do not use floating-point for accounting as you lose pennies! That's why for accounting application its best to... |
Forum: Assembly Oct 14th, 2009 |
| Replies: 3 Views: 261 You perform an multiplication and store the 32-bit low result in register t3 and the upper 32-bits in register t2.
But you print register t0, one of the source operands of the multiplication, not... |
Forum: Assembly Oct 14th, 2009 |
| Replies: 3 Views: 10,179 You should enter your five integers by looping and storing in an array, then summing the array.
In your code you don't need the compare as the addition will set the zero flag if the result is... |
Forum: Assembly Oct 14th, 2009 |
| Replies: 3 Views: 261 $LO = $s * $t
mult $t0,$t1
mfhi $t2 # HI
mflo $t3 # LO
la $a0, t0 equals
li $v0, 4 #print_string
syscall |
Forum: Assembly Oct 14th, 2009 |
| Replies: 1 Views: 327 The Auxiliary Carry (AF bit of Status Flags) is used for the carry out of bit 3 (0...7) into bit 4 for use in BCD operations! Think of it as a nibble carry! |
Forum: Assembly Oct 14th, 2009 |
| Replies: 5 Views: 329 Won't work the way you think!
A float is 32-bit so only have about 4-5 digits of precision. That number is WAY TOO BIG! So it will definitely be put into exponential form provided the buffer is... |
Forum: Assembly Oct 12th, 2009 |
| Replies: 2 Views: 227 MIPS doesn't have a carry bit like the 80x86 so you have to emulate it!
If result of lower 32-bit addition is less then any of the original values then a carry occured! So use the result of the... |
Forum: Assembly Oct 11th, 2009 |
| Replies: 1 Views: 221 |
Forum: Assembly Oct 11th, 2009 |
| Replies: 8 Views: 406 You can also do it in BCD!
No need for decimal to ASCII conversion!
This is just one way to do this!
mov bh,'8'
mov bl,'4'
sub bh,'0'
sub bl,'0'
;bh = 10's digit, bl=1's digit |
Forum: Assembly Oct 11th, 2009 |
| Replies: 2 Views: 10,218 Technically that's not a string reversal. If you were to push your characters into a buffer, then reverse them, that's a string reversal!
But your code appears to be okay! Do you have a specific... |
Forum: Assembly Oct 11th, 2009 |
| Replies: 3 Views: 419 Not to cloud the issue, but first you need to deterimine if you are working with signed versus unsigned data? You need to use a different compare based upon the type of data you're using!
Above &... |
Forum: Assembly Oct 7th, 2009 |
| Replies: 4 Views: 353 Vex or First cmpetitions?
Or homebrew? |
Forum: Assembly Oct 7th, 2009 |
| Replies: 4 Views: 353 LEAVE STI ALONE!!!!!!!!!!!!!!
Interrupts are already turned on! If they weren't no input would be handled. No keyboard, no anything as they are all interrupt driven!
There is a Serial BIOS in... |
Forum: Assembly Oct 7th, 2009 |
| Replies: 1 Views: 332 Technically ASCII used to be 7-bit ASCII but with International characters etc. it is 8-bit so treat it as unsigned bytes.
signed and unsigned have different comparisons!
Digits is the smallest... |