The definition may vary dependent upon what one’s point of view is.
From a hardware guy, a portable application is one which does not have code specific to the hardware on which it is run. It may assume that there are drivers to perform the function, but it shouldn’t make low level calls directly to a specific feature of the hardware.
For example, suppose you need to perform a number of fast multiplications. Some hardware may a special hardware multiplier in the ALU which can be accessed via a specific assembler command (normal multiplications will take multiple clock cycles to execute). If your code explicitly uses this assembler command (generally through a MACRO command) then it is NOT portable unless you specifically make a check if the hardware supports the command and uses an alternative compiler specified multiplication command if the hardware does not support the special command.
Latest Answers