Assembly Language programming help. I need to finish writing a program for this
ID: 661712 • Letter: A
Question
Assembly Language programming help.
I need to finish writing a program for this assignment. Here's the problem:
Write a 32-bit assembly language that interacts with a User and processes a variety of transactions, acting like an inventory program. Your inventory program must be able to keep track of eight (8) different products that are stored at six (6) different warehouses.
Your program must welcome the User and describe any procedures for using your program. The User should then be prompted for a choice of actions from the following list:
I - INITIALIZE the number of all of the products stored at all of the warehouses to zero (0).
R - RECEIVE a quantity of a product at a warehouse.
S - SHIP a quantity of a product from a warehouse.
T - TRANSFER a quantity of a product from one warehouse to another.
P - PUBLISH a report showing how many of each product is stored at each warehouse.
F - FILE processing of a series of transaction codes and their associated parameters. See notes for the details of this file structure.
X - EXIT choice.
Some of the actions selected by the User require no additonal input, while others require multiple interactions to identify the parameters of the transaction requested by the USER.
this project had been answered but I need another solution for this Q.
Explanation / Answer
# [sp+0x40] (sp of caller)
0x0000000002250a40: mov r10d,dword ptr [rdx+8h]
0x0000000002250a44: shl r10,3h
0x0000000002250a48: cmp r10,rax
0x0000000002250a4b: jne 2195f60h ; {runtime_call}
0x0000000002250a51: nop dword ptr [rax+rax+0h]
0x0000000002250a59: nop dword ptr [rax+0h]
[Verified Entry Point]
0x0000000002250a60: mov dword ptr [rsp+0ffffffffffffa000h],eax
0x0000000002250a67: push rbp
0x0000000002250a68: sub rsp,30h
0x0000000002250a6c: mov rax,1392f750h ;
0x0000000002250a76: mov esi,dword ptr [rax+0dch]
0x0000000002250a7c: add esi,8h
0x0000000002250a7f: mov dword ptr [rax+0dch],esi
0x0000000002250a85: mov rax,13784d00h ;
0x0000000002250a8f: and esi,1ff8h
0x0000000002250a95: cmp esi,0h
0x0000000002250a98: je 2250bd1h ;*aload_0
; -
0x0000000002250a9e: mov eax,dword ptr [rdx+10h] ;*getfield hash
; - x0000000002250aa1: cmp eax,0h
0x0000000002250aa4: mov rsi,1392f750h 0x0000000002250aae: mov rdi,108h
0x0000000002250ab8: jne 2250ac8h
0x0000000002250abe: mov rdi,118h
0x0000000002250ac8: mov rbx,qword ptr [rsi+rdi]
0x0000000002250acc: lea rbx,[rbx+1h]
0x0000000002250ad0: mov qword ptr [rsi+rdi],rbx
0x0000000002250ad4: jne 2250bc5h ;*ifne
; - x0000000002250ada: mov esi,dword ptr [rdx+0ch] ;*getfield value
; -
0x0000000002250add: mov edi,dword ptr [rsi+0ch] ;*arraylength
; - x0000000002250be8
0x0000000002250ae0: cmp edi,0h
0x0000000002250ae3: mov rbx,1392f750h ;
0x0000000002250aed: mov rcx,128h
0x0000000002250af7: jle 2250b07h
0x0000000002250afd: mov rcx,138h
0x0000000002250b07: mov r8,qword ptr [rbx+rcx]
0x0000000002250b0b: lea r8,[r8+1h]
0x0000000002250b0f: mov qword ptr [rbx+rcx],r8
0x0000000002250b13: jle 2250bc5h ;*ifle
; - x0000000002250b19: mov ebx,0h
0x0000000002250b1e: jmp 2250b8ah ;*iload_3
; - x0000000002250b23: nop dword ptr [rax+rax+0h]
0x0000000002250b28: movsxd rcx,ebx
0x0000000002250b2b: movzx ecx,word ptr [rsi+rcx*2+10h]
;*caload
; - x0000000002250b30: mov r8,rax
0x0000000002250b33: shl eax,5h
0x0000000002250b36: sub eax,r8d
0x0000000002250b39: add eax,ecx
0x0000000002250b3b: inc ebx
0x0000000002250b3d: mov rcx,1392f750h
0x0000000002250b47: mov r8d,dword ptr [rcx+0e0h]
0x0000000002250b4e: add r8d,8h
0x0000000002250b52: mov dword ptr [rcx+0e0h],r8d
0x0000000002250b59: mov rcx,13784d00h ;
0x0000000002250b63: and r8d,0fff8h
0x0000000002250b6a: cmp r8d,0h
0x0000000002250b6e: je 2250bedh ; OopMap{rsi=Oop rdx=Oop off=308}
;*goto
; - x0000000002250b74: test dword ptr [5d0100h],eax ; {poll}
0x0000000002250b7a: mov rcx,1392f750h ;
0x0000000002250b84: inc dword ptr [rcx+168h] ;*goto
; - x0000000002250b8a: cmp ebx,edi
0x0000000002250b8c: mov rcx,1392f750h ;
0x0000000002250b96: mov r8,148h
0x0000000002250ba0: jnl 2250bb0h
0x0000000002250ba6: mov r8,158h
0x0000000002250bb0: mov r9,qword ptr [rcx+r8]
0x0000000002250bb4: lea r9,[r9+1h]
0x0000000002250bb8: mov qword ptr [rcx+r8],r9
0x0000000002250bbc: jl 2250b28h ;*if_icmpge
; -
0x0000000002250bc2: mov dword ptr [rdx+10h],eax ;*putfield hash
; -
0x0000000002250bc5: add rsp,30h
0x0000000002250bc9: pop rbp
0x0000000002250bca: test dword ptr [5d0100h],eax ; {poll_return}
0x0000000002250bd0: ret
0x0000000002250bd1: mov qword ptr [rsp+8h],rax
0x0000000002250bd6: mov qword ptr [rsp],0ffffffffffffffffh
0x0000000002250bde: call 224dfe0h ; OopMap{rdx=Oop off=419}
;*synchronization entry
; - x0000000002250be3: jmp 2250a9eh
0x0000000002250be8: call 22498c0h ; OopMap{rdx=Oop rsi=Oop off=429}
;*arraylength
; - x0000000002250bed: mov qword ptr [rsp+8h],rcx
0x0000000002250bf2: mov qword ptr [rsp],2dh
0x0000000002250bfa: call 224dfe0h ; OopMap{rsi=Oop rdx=Oop off=447}
;*goto
; - x0000000002250bff: jmp 2250b74h
0x0000000002250c04: nop
0x0000000002250c05: nop
0x0000000002250c06: mov rax,qword ptr [r15+2a8h]
0x0000000002250c0d: mov r10,0h
0x0000000002250c17: mov qword ptr [r15+2a8h],r10
0x0000000002250c1e: mov r10,0h
0x0000000002250c28: mov qword ptr [r15+2b0h],r10
0x0000000002250c2f: add rsp,30h
0x0000000002250c33: pop rbp
0x0000000002250c34: jmp 21bc2e0h ; {runtime_call}
0x0000000002250c39: hlt
0x0000000002250c3a: hlt
0x0000000002250c3b: hlt
0x0000000002250c3c: hlt
0x0000000002250c3d: hlt
0x0000000002250c3e: hlt
0x0000000002250c3f: hlt
[Exception Handler]
[Stub Code]
0x0000000002250c40: call 224b760h ; {no_reloc}
0x0000000002250c45: mov qword ptr [rsp+0ffffffffffffffd8h],rsp
0x0000000002250c4a: sub rsp,80h
0x0000000002250c51: mov qword ptr [rsp+78h],rax
0x0000000002250c56: mov qword ptr [rsp+70h],rcx
0x0000000002250c5b: mov qword ptr [rsp+68h],rdx
0x0000000002250c60: mov qword ptr [rsp+60h],rbx
0x0000000002250c65: mov qword ptr [rsp+50h],rbp
0x0000000002250c6a: mov qword ptr [rsp+48h],rsi
0x0000000002250c6f: mov qword ptr [rsp+40h],rdi
0x0000000002250c74: mov qword ptr [rsp+38h],r8
0x0000000002250c79: mov qword ptr [rsp+30h],r9
0x0000000002250c7e: mov qword ptr [rsp+28h],r10
0x0000000002250c83: mov qword ptr [rsp+20h],r11
0x0000000002250c88: mov qword ptr [rsp+18h],r12
0x0000000002250c8d: mov qword ptr [rsp+10h],r13
0x0000000002250c92: mov qword ptr [rsp+8h],r14
0x0000000002250c97: mov qword ptr [rsp],r15
0x0000000002250c9b: mov rcx,539daf20h ; {external_word}
0x0000000002250ca5: mov rdx,2250c45h ; {internal_word}
0x0000000002250caf: mov r8,rsp
0x0000000002250cb2: and rsp,0fffffffffffffff0h
0x0000000002250cb6: call 5369d270h ; {runtime_call}
0x0000000002250cbb: hlt
[Deopt Handler Code]
0x0000000002250cbc: mov r10,2250cbch ; {section_word}
0x0000000002250cc6: push r10
0x0000000002250cc8: jmp 2197200h ; {runtime_call}
0x0000000002250ccd: hlt
0x0000000002250cce: hlt
0x0000000002250ccf: hlt
Decoding compiled method 0x000000000224fb90:
Code:
Argument 0 is unknown.RIP: 0x224fce0 Code size: 0x00000150
[Entry Point]
[Constants]
# {method} {0x0000000013780478} '<init>' '()V' in 'java/lang/Object'
# [sp+0x60] (sp of caller)
0x000000000224fce0: mov r10d,dword ptr [rdx+8h]
0x000000000224fce4: shl r10,3h
0x000000000224fce8: cmp r10,rax
0x000000000224fceb: jne 2195f60h ; {runtime_call}
0x000000000224fcf1: nop dword ptr [rax+rax+0h]
0x000000000224fcf9: nop dword ptr [rax+0h]
[Verified Entry Point]
0x000000000224fd00: mov dword ptr [rsp+0ffffffffffffa000h],eax
0x000000000224fd07: push rbp
0x000000000224fd08: sub rsp,50h
0x000000000224fd0c: mov rcx,138da940h ;
0x0000000002253376: mov esi,dword ptr [rax+0dch]
0x000000000225337c: add esi,8h
0x000000000225337f: mov dword ptr [rax+0dch],esi
0x0000000002253385: mov rax,13783bc8h ;
0x000000000225338f: and esi,1ff8h
0x0000000002253395: cmp esi,0h
0x0000000002253398: je 225346eh ;*iload_1
; -
0x000000000225339e: cmp r8d,0h
0x00000000022533a2: mov rax,138f3b10h ;
0x00000000022533ac: mov rsi,108h
0x00000000022533b6: jl 22533c6h
0x00000000022533bc: mov rsi,118h
0x00000000022533c6: mov rdi,qword ptr [rax+rsi]
0x00000000022533ca: lea rdi,[rdi+1h]
0x00000000022533ce: mov qword ptr [rax+rsi],rdi
0x00000000022533d2: jl 225342ch ;*iflt
; - x00000000022533d8: mov eax,dword ptr [rdx+0ch] ;*getfield value
; - x00000000022533db: mov edx,dword ptr [rax+0ch] ;*arraylength
; - x0000000002253485
0x00000000022533de: cmp r8d,edx
0x00000000022533e1: mov rdx,138f3b10h ;
0x00000000022533eb: mov rsi,128h
0x00000000022533f5: jl 2253405h
0x00000000022533fb: mov rsi,138h
0x0000000002253405: mov rdi,qword ptr [rdx+rsi]
0x0000000002253409: lea rdi,[rdi+1h]
0x000000000225340d: mov qword ptr [rdx+rsi],rdi
0x0000000002253411: jnl 225342ch ;*if_icmplt
; -
0x0000000002253417: movsxd r8,r8d
0x000000000225341a: movzx eax,word ptr [rax+r8*2+10h]
;*caload
; - x0000000002253420: add rsp,30h
0x0000000002253424: pop rbp
0x0000000002253425: test dword ptr [5d0100h],eax ; {poll_return}
0x000000000225342b: ret ;*ireturn
; - x000000000225342c: nop dword ptr [rax+0h]
0x0000000002253430: jmp 2253499h ; {no_reloc}
0x0000000002253435: add byte ptr [rax],al
0x0000000002253437: add byte ptr [rax],al
0x0000000002253439: add cl,ch
0x000000000225343b: add byte ptr fs:[rax],al
0x000000000225343e: add byte ptr [rax+0ffffffffffffff8bh],cl
;*new ; - x0000000002253441: ror byte ptr [rax+0ffffffffffffffbeh],1h
;
0x0000000002253444: adc byte ptr [rbx],bh
0x0000000002253446: Fatal error: Disassembling failed with error code: 15Decoding compiled method 0x0000000002252d10:
Code:
Argument 0 is unknown.RIP: 0x2252e80 Code size: 0x00000248
[Entry Point]
[Constants]
# {method} {0x00000000137ef578} 'ensureCapacityInternal' '(I)V' in 'java/lang/AbstractStringBuilder'
# this: rdx:rdx = 'java/lang/AbstractStringBuilder'
# parm0: r8 = int
# [sp+0x40] (sp of caller)
0x0000000002252e80: mov r10d,dword ptr [rdx+8h]
0x0000000002252e84: shl r10,3h
0x0000000002252e88: cmp r10,rax
0x0000000002252e8b: jne 2195f60h ; {runtime_call}
0x0000000002252e91: nop dword ptr [rax+rax+0h]
0x0000000002252e99: nop dword ptr [rax+0h]
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.