How do I get past the return statement in the Control Register?
See original GitHub issueArea 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:
- Created 3 years ago
- Reactions:1
- Comments:47 (47 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
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.