Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

; ; This program calculates time dilation ; INCLUDE Irvine32.inc .data SecPerDay dd 86400 ;Seconds in a Day ShipSpd Real8 0.0 SecPerYear REAL8 31557600.0 ;Seconds

; ; This program calculates time dilation ; INCLUDE Irvine32.inc .data SecPerDay dd 86400 ;Seconds in a Day ShipSpd Real8 0.0 SecPerYear REAL8 31557600.0 ;Seconds in a Year Time REAL8 0.0 SpeedLightSQ REAL8 90000000000.0 ;speed of light SQ SpeedReq db "Please enter the Speed of the Space Ship: ",0 Speedlen equ ($-SpeedReq-1) TimeReq db "Please enter the Time on the Space Ship in Days: ",0 Timelen equ ($-TimeReq-1) SoS db "Earth Seconds on Ship: ",0 SoSlen equ ($-SoS-1) DoS db "Earth Years on Ship: ",0 DoSlen equ ($-DoS-1) skipLine db 0dh, 0ah, 0 LineLen equ ($-skipLine-1) ten dw 10 .code main proc finit ; initialize floating point unit fld1 ; push one on stack fld1 ; push one on stack mov edx, offset SpeedReq call WriteString call ReadFloat ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;Code goes Here to calculate 1/sqrt(1-(v2/C2)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 6 Statements ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;Code goes Here to calculate 1/sqrt(1-(v2/C2)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; mov edx, offset TimeReq call WriteString call ReadFloat fimul SecPerDay fmulp ST(1), ST(0) mov edx, offset SoS call writeString call WriteFloat mov edx, offset skipLine call writeString fdiv SecPeryear ;mputString DoS, DoSlen mov edx, offset DoS call writeString call WriteFloat mov edx, offset skipLine call writeString halt equ $ call readInt exit main endp END main 

;

;

;

;

;

;

; all this lab is missing is turning 1/sqrt(1-(v2/C2)) into a code and added to the lab.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Temple Of Django Database Performance

Authors: Andrew Brookins

1st Edition

1734303700, 978-1734303704

More Books

Students also viewed these Databases questions