question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How do I get past the return statement in the Control Register?

See original GitHub issue

Area of Cosmos - What area of Cosmos are we dealing with?

T<> Lists…

Expected Behaviour - What do you think that should happen?

It should take the first integer stored and use it (sound card)

Actual Behaviour - What unexpectedly happens?

When I try to use a snipet like this: var aVariable1 = ANamespace.Aclass.AstaticListFunction(); var xVariable2 = xVariable1[0]; I get an exception saying: Parameter Name: <Enum.ToString> Not implemented...

Reproduction - How did you get this error to appear?

When I added it into my code for vital functioning purposes, it throws an exception in the VM as a runtime error but not on the build or debug output.

Version - Were you using the User Kit or Dev Kit? And what User Kit version or Dev Kit commit (Cosmos, IL2CPU, X#)?

The latest UserKit 20200708.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:47 (47 by maintainers)

github_iconTop GitHub Comments

4reactions
MishaTycommented, Jan 3, 2021

I got it to work. First I changed the MemoryAddressSpace to IOAddressSpace. And inside the GenericSoundCard constructor. Then I changed the mem = deviceP.GetAddressSpace(1) as Cosmos.Kernel.MemoryAddressSpace;

to mem = deviceP.GetAddressSpace(0) as Cosmos.Kernel.IOAddressSpace;

Here is the project with these changes. Also, I cleaned up some code in the project. CosmosSpeakerTest.Modifed-V2.zip

1reaction
quajakcommented, Jan 7, 2021

You need to implement the driver for some more advanced speaker/sound card. As @valentinbreiz stated, only PC Speaker is currently implemented so there is no way to play wav files. If you for example finish the ES1370 driver, you could then play wav files.

Read more comments on GitHub >

github_iconTop Results From Across the Web

RETURN — Return control
The return of control is always made by executing a branch instruction using the address in register 14. Because the RETURN macro uses...
Read more >
c++ - When the control flow off the end of a function without ...
This is happening because a result of functions (if the return type is int) is transferred using rax register of CPU. return keyword...
Read more >
Passing Return Codes Back to the Calling Program
There are two methods for passing return codes back from the called program to the calling program. You can use the: RETURN-CODE special...
Read more >
Return statement
From within the program this return is typically achieved by calling Exit (system call) (common even in C, where the alternative mechanism of...
Read more >
Return from Procedure (ret) (IA-32 Assembly Language ...
The ret instruction transfers control to the return address located on the stack. This address is usually placed on the stack by a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found