Why there are different Programs for Windows and MAC and Linux? [closed] - system

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
The programs are written into the high level language and then that high language is converted into the machine language which are set of opcodes. I want to ask why there are some programs which are compatible to the Windows and some with the MAC because when they are compiled they are simply opcodes.

because programs rely on functions already in the OS, like ReadFile or ShowMessage, and Some OS's have different archtectures so they have different functions. The actual calculations and stuff is the same
as an example:
Imagine Mac OS has a function called ReadFile. Windows has a function called GetFile. Linux has a function called "OpenFile". When you compile your program, it doesn't include those functions into it's code. The "op codes" just say "call the function at address #xxxxxx" So if you did it in windows, the OS will have the GetFile function ready at #xxxxxxx, so your program will execute. But if you copy your program to Mac, the OS is set up differently, so there is no function at #xxxxx waiting for you, so the program fails.
In reality, it fails before it gets there because the OS looks at the codes before running them so see if they're compatible
And it's not just functions like "readFile". Nearly all programs involve getting some memory for your variables, and each OS does it differently (ie, they have a different function at a different address #xxxx to get memory), so you programs cannot run on any other os once they're compiled.

Related

Monitor going black for no reason [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 months ago.
Improve this question
Ok so, my monitor is going black on random occasions. Mostly it is when i watch a video. It doesn't matter if it is on youtube, facebook, udemy or whatever other site.
I checked my cables they are all good. I also turned off the screen saver.
Any ideas what it could be?
there could be many reasons for this - bad drivers, bad cables, bad screen, GPU overheating and melting solder connections (I've experienced this).
the easiest thing to check is to see if the issue is in the computer itself. to do that, connect to a different monitor (using a different cable).
to check if it's a software issue, you could try running a LiveCD of a different OS on your computer (for example, Fedora or Ubuntu).
if the issue still happens even with a different OS, then it's likely a GPU problem - you'll need to either get that replaced, replace the mainboard (if GPU is integrated), or replace the computer...

Unknown USB device on Windows CE [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
We have a project, where we use really old project specific Windows CE 5.0 devices in a kiosk application. We are trying to replace the USB connected Lexmark T640 printer with a new USB printer (Kyocera P3055dn). The printer works, but Windows CE complains about an unknown USB device (in the moddle of the screen). How do I prevent this message?
Windows CE 6.0 introduced a registry setting to suppress this message:
[HKEY_LOCAL_MACHINE\Drivers\USB\LoadClients]
"DoNotPromptUser"=dword:1
This won't work on Windows CE 5.0 however, unless there's a recent QFE that I'm unaware of.
If you are able to modify the OS image, then one solution is to clone the USB sources and disable the message.
Another way to avoid the message (which doesn't require changing the OS image) is to create a USB driver that accepts the unknown device, and does nothing with it. You could choose to match the USB VID/PID combination specifically, or you could make the driver match any unknown device.

How to know what BIOS version to learn? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I've read that every manufacturer can produce his own BIOS ,
where to find a specific BIOS interrupts list , and how to know my PC's BIOS version?
there's a lot ( IBM , AT&T , ..)
And it's really strange that the only reference is RBIL !
where to read "ALL" interrupts of specific version ?
Most BIOS vendors are compatible with the original IBM PC BIOS source, but that is a convention, not a rule. Many BIOS vendors will offer their own extended/undocumented BIOS calls.
If you are simply trying to boot, read disk sectors, print characters on the screen, etc, you should be able to manage that without having to know which specific BIOS you are running on. After all, they must be similar enough for DOS to boot!
If you really want to know what specific BIOS you have, you can look in the BIOS POST or setup screens. Look for a version or ID string. Otherwise, you can boot Windows and run the System Information tool, which can tell you. Otherwise, you can dump the F000 segment to a file and run the "strings" utility on it. Again, you probably do not need to know this, because it is irrelevant for 99% of the basic PC operations.
My favorite reference for BIOS and DOS interrupts is the Programmer's PC Sourcebook (Second Edition). It's long out of print, but I think you can still find used copies on Amazon. There are other books out there, but this is the one on my bookshelf that I have used for the last 10+ years.
If you are adverse to spending money, the Ralf Brown Interrupt List (RBIL), seems pretty comprehensive, but I have never used it personally.

Mac OS X GUI in Assembly [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Is it possible to make a Mac OS X GUI in assembly bypassing the need for Objective C like Windows and Linux allow?
Yes, of course. You can write an entire application in nothing but assembly, if you want.
What you can't avoid is calls into the framework APIs to setup and run the application.
Thus, you'll be spending a bunch of time writing assembly that sets up call sites into objc_msgSend() and/or framework C functions.
Create a new project in Xcode and then go to any source file and "show assembly". There is the assembly version and you could certainly use that as your starting point.
No, not really. Most of the major libraries which you need to write a GUI application for Mac OS X (e.g, Cocoa and AppKit) are written in Objective C, and must be called from code that's written in that language as well. While it's technically possible to replicate the same effects in assembly, at that point you're basically just writing ObjC in a really awkward way.
There is an older GUI library for Mac OS X (Carbon) that is usable from C (and thus could potentially be used from assembly as well), but it is only available in 32-bit mode, and is deprecated. Don't use it for new code.

history of programming in ... DOS times (not console) [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
first of all - thank you in advance for all answers.
Second - I'm not asking about writing console programs working on modern systems (like Ubuntu 11.10 or Windows 7) nor batch files.
Third - I'm not going to become DOS 6.22 nor Windows 3.1 programs developer. Maybe I will write small program only for educational purpose.
I am wondering how programmers works on early (I refer to 70's, 80's and begining of 90's) days of computer. On wikipedia there's many information about, let's caled it "ancient times", but there's not enough about "middle ages" (I'm referring to 70-90's) in programming definition. Although in DOS times programs higly depends on used machines (because they directly call hardware IRQ), I can't believe that there wasn't something like today Integrated Development Environment and that some of them were written in high level programming language. Is it possible that Prehistoric 2 has been written in Assembly? I don't think so, but I assume that early versions of BASIC can't receive such possibility.
Could you recommend any good article or source of information? I'm interested both MS (DOS, Windows 16-bit) and Unix platforms.
See also Borland Turbo C++ and Borland C++, commonly used in the early 90s.
If memory serves, Commander Keen was built using Borland tools. It's probable that other same-era Apogee/id games (like the original 2D Duke Nukem) were built under Borland as well.
Later on (early-to-mid 90s), id Software started using Watcom and the DOS/4GW DOS extender to build games like the original DOOM.
I was working in that period on Windows 16-bit and DOS (also DEC VAX and Alpha).
Mostly I used Turbo Pascal and Delphi 1 both of which provided IDE's. This was in the early 90's