• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Person who knows Spanish needed for a simple taks - please translate Spanish words in this code?

adlep

Diamond Member
Hmm, I dont know Spanish, I dont even have dictionary....
Tried to use babblefish, but it didnt quite work for me.....
Below is an assembly code with Spanish names of variables, and comments... Could someone kindly translate these into English...?
(I know other languages, I speak Polish and English fluently, eventually I will learn Spanish... but now I am just too busy):
Text:

Ordenacion de n£meros por Bubble Sort
*********************************************************

absolute
org $25000

cero equ $0
uno equ $1 ;Burbuja

start lea.l e_tabla,A1 ;Fin de la tabla
burbuja lea.l tabla,A0 ;Inicializamos ptro. tabla
move.b #cero,D1 ;D1 flag de cambios

contb move.b (A0)+,D2 ;Un elemento
move.b (A0),D3 ;Elemento siguiente

cmp.b D2,D3 ;Comparamos
blt mayor ;D3<D2
bra test ;D2<=D3, No los cambiamos

mayor move.l A0,D0 ; \
sub.b #uno,D0 ; } recuperamos el puntero
move.l D0,A0 ; /
move.b D3,(A0)+ ;D2>D3
move.b D2,(A0) ;Invertimos y avanzamos
move.b #uno,D1 ;Flag de cambio
bra test ;Miramos a ver si acabamos o no
test cmpa.l A0,A1 ;Comparamos con el final
beq endtab ;Acabamos
bra contb ;Continua con la burbuja

;¨Hubo cambios?
endtab cmp.b #uno,D1
beq burbuja ;Hubo cambios, volvemos a empezar

;Fin del programa
fin jmp fin
tabla db 5,7,8,5,6,3,2,1,1 ;Inicializar datos
e_tabla db 0
end

Dont worry about assembly code, just the Spanish words...
Thx
 
True, but it kinnda difficult to implement in Assembly......
In C++ it takes like 5 minutes and in Assembly...?
 
Ordenacion de n£meros por Bubble Sort (Bubble Sort Ordenation)
*********************************************************

absolute
org $25000

cero equ $0 (zero equals 0)
uno equ $1 ;Burbuja (one equals 1)

start lea.l e_tabla,A1 ;Fin de la tabla (end of the table)
burbuja lea.l tabla,A0 ;Inicializamos ptro. tabla (initalize table)
move.b #cero,D1 ;D1 flag de cambios ( changes of flag)

contb move.b (A0)+,D2 ;Un elemento (an element)
move.b (A0),D3 ;Elemento siguiente (following element)

cmp.b D2,D3 ;Comparamos (we compared)
blt mayor ;D3<D2 (greater)
bra test ;D2<=D3, No los cambiamos (we didn't change these/them)

mayor move.l A0,D0 ; \ (greater)
sub.b #uno,D0 ; } recuperamos el puntero (we recovered the ?? leading number?)
move.l D0,A0 ; /
move.b D3,(A0)+ ;D2>D3
move.b D2,(A0) ;Invertimos y avanzamos (We invested, and we advanced)
move.b #uno,D1 ;Flag de cambio (changes of flag)
bra test ;Miramos a ver si acabamos o no (We watched to see if it would finish or not)
test cmpa.l A0,A1 ;Comparamos con el final (We compared it with the final)
beq endtab ;Acabamos (We completed/finished)
bra contb ;Continua con la burbuja (continuing? with the bubble(sort))

;¨Hubo cambios? (Were there any changes?)
endtab cmp.b #uno,D1 (1)
beq burbuja ;Hubo cambios, volvemos a empezar(bubble, there were changes, we returned to the beginning of program)

;Fin del programa (end of program)
fin jmp fin (end, end)
tabla db 5,7,8,5,6,3,2,1,1 ;Inicializar datos (initialize data)
e_tabla db 0 (table)
end


This is my best guess, some of this doesn't make sense, like why he chose to speak in the we form. Anyway, hope this helps
 
Originally posted by: adlep
True, but it kinnda difficult to implement in Assembly......
In C++ it takes like 5 minutes and in Assembly...?

Ok, you have what appears to be an implementation right in front of you. If you can't tell what it's doing without comments, then you probably don't have as strong a grip on bubble sort as you think you do.

Good luck!

-geoff

 
Thank you CorporateRecreation...
The embarrasing thruth 😱 is that I am not very good assembly programmer, and the teacher is flying through the material in the book....
Actually it is my first assembly program I am working on right now. Btw - A B tree <--Data Structures and Algorithm Analysis?
I hated that class too, but I passed it with a deacent grade, though I forgot most of the stuff I learned.
 
Originally posted by: adlep
Thank you CorporateRecreation...
The embarrasing thruth 😱 is that I am not very good assembly programmer, and the teacher is flying through the material in the book....
Actually it is my first assembly program I am working on right now. Btw - A B tree <--Data Structures and Algorithm Analysis?
I hated that class too, but I passed it with a deacent grade, though I forgot most of the stuff I learned.

Are you doing these classes for your major? If so, you might want to talk to your professor or get some additional help. Data structures and algorithms classes are often some of the most important in a CS curriculum and you might want to save yourself future headaches by not forgetting the material. 😉

Remember, this is only your first Assembly program and I doubt they'll get easier.

-geoff

 
The embarrasing thruth is that... I am almost done, there will be only 3 classess I would have to take after this semester, to complete my CS requirements, and I am not in such a bad shape, I just hate assembly....
 
Fair enough. It wasn't my favorite either.

I didn't mean to seem like I was picking on you, but I've seen too many people go through the motions of a CS program when they really had no desire to be there. 🙂

-geoff
 
Well, I do have some strong points in CS you know...
The fact that I asked for help and was honest doesnt mean that this degree is not for me...?



 
Originally posted by: adlep
Well, I do have some strong points in CS you know...
The fact that I asked for help and was honest doesnt mean that this degree is not for me...?

True, but from surface appearances alone (which is all I can go by -- not knowing you), somebody asking for help on Bubble Sort in any language sounds like they might be missing some of the more important points of their classes.

I wasn't saying a CS degree isn't for you, I said I have seen people asking similar questions to yours who shouldn't have been getting CS degrees. Since you're almost done with you degree, you don't sound like one of those people..

-geoff
 
Originally posted by: adlep
Well, I do have some strong points in CS you know...
The fact that I asked for help and was honest doesnt mean that this degree is not for me...?

I had a really bad teacher for assembly. Actually, it was supposed to be a Computer Architecture course and for some reason instead of teaching us about architecture (the precursor to the class was a topical digital design class--logic circuits, and this class was traditionally creating a 16-bit processor using LogicWorks), he decided that it was going to be a SPARC assembly class. I have no idea how that is supposed to teach us about any architecture other than SPARC....
The real teacher was on sabbatical that semester.

I got an F in that class, retook it with the REAL teacher, and did fine (I got a C+ in a class that was well known as one of the harder ones). We learned about SPARC, Crusoe, Intel and Mac architectures, although 16-bit processors were getting a bit long in the tooth, so we did most of our hands-on stuff by writing byte-code for a JVM. It was still pretty much assembly, but for some reason it was easy without having the Worst Professor In The Department teaching it.

I still graduated with honors in CS and am gainfully employed as an IT Security Manager. If you ever need to program in assembly, you'll figure it out.
 
One obvious thing to do is to do it in C or C++ first and then convert it to asm.

In my class, we used SPIM (a MIPS simulator) and we actually went so far as to create a compiler, that took a bunch of Strings that were some ASM instructions and converted them into 111101010101001 etc.. kind of output. Took like a few solid weeks to get it done and many people never finished.

What I loved were those teachers that you can't understand at all because their english is so bad. Best to reschedule classes and take them from people who know how to each/and or speak english well if you can.
 
Back
Top