尿出红色的尿是什么原因| pc是什么材料| 无以回报是什么意思| 脾湿热吃什么中成药| 什么是石女| 阑尾炎疼吃什么药| 什么叫梗| 大姨妈期间不能吃什么东西| 阿斯伯格综合症是什么| 兔子的眼睛为什么是红色的| 金字旁土念什么字| 骨质疏松吃什么药好| 为什么眼皮一直跳| 八哥鸟吃什么饲料最好| 护士是什么专业| 韧带损伤挂什么科| 回民不能吃什么| 身份证穿什么衣服| 爬虫是什么| 什么是相位| ml什么意思| 吃什么补肾壮阳最快| 虾青素有什么作用| 胸口疼挂什么科室| 骨结核是什么病| 脑病科是看什么病的| 乔顿男装属于什么档次| 男马配什么属相最好| 甲氨蝶呤是什么药| 橘色五行属什么| peace什么意思| 白头发吃什么维生素能变黑| 新陈代谢是什么| 涤棉是什么面料| 骨骼肌是什么意思| 94年属狗什么命| 什么手机最贵| 养尊处优的意思是什么| 陪护是什么意思| 上海话娘娘是什么意思| 生肖马和什么生肖最配| 勃起困难是什么原因造成的| 闲暇的意思是什么| 白酒不能和什么一起吃| 蛋白质偏高是什么原因| 梦到妈妈怀孕什么预兆| 为什么一进去就射了| 今天什么年| 看乳腺应该挂什么科| 内向男生适合什么工作| 江团鱼又叫什么鱼| 大健康是什么意思| 脂肪肝是什么引起的| 什么数字最听话| 攸字五行属什么| 为什么喝咖啡会心慌| joy是什么意思| 梦见掉头发是什么意思| 决定的近义词是什么| 检验葡萄糖用什么试剂| 12月8号是什么星座| 花椒吃多了对身体有什么影响| 牙疼吃什么止疼药见效快| 嗓子哑是什么病的前兆| 什么最赚钱| 特长写什么| 蛋白质是由什么组成的| 非钙化斑块是什么意思| pvs是什么意思| twitter是什么| 锁骨上有痣代表什么| 脸部浮肿是什么原因| 拉杆箱什么材质好| 波尔多红是什么颜色| 何炅和谢娜是什么关系| 高处不胜寒什么意思| 肾阳虚是什么原因引起的| 检查淋巴挂什么科| 尿酸高是为什么| 水晶眼镜对眼睛有什么好处| hg是什么元素| 碳酸钙是什么东西| 419什么意思| 电泳是什么意思| 爱新觉罗是什么意思| 肚子拉稀吃什么药| 忧愁是什么意思| 眼睛有眼屎用什么眼药水| 细菌性肺炎吃什么药| 火乐念什么| 八七年属什么生肖| 脱发缺少什么维生素| 隐患是什么意思| 喜欢绿色的女人是什么性格| 盐酸舍曲林片治疗什么程度的抑郁| 莞字五行属什么| 好奇害死猫是什么意思| 隐翅虫擦什么药膏| 七月二十号是什么星座| 什么是热射病| 住院医师是什么意思| 腊八粥是什么节日| 膻中穴在什么位置| 马首是瞻是什么生肖| 5月24日什么星座| 生死劫是什么意思| 维生素b5又叫什么| 黄芪长什么样子的图片| 蓝天白云是什么意思| 牙齿出血是什么病| 肝火旺吃什么降火最快| 流鼻血去药店买什么药| 为什么叫基围虾| 满五唯一的房子要交什么税| 白醋和小苏打一起用起什么效果| 出汗太多会对身体造成什么伤害| 什么的珊瑚| 破涕为笑是什么意思| 减肥吃什么菜最好| rbp是什么意思| 属猪的护身佛是什么佛| 综合基础知识考什么| 人生最重要的是什么| 丈夫早亡的女人什么命| 什么是二次元| 乌合之众什么意思| 菊花什么季节开| 玉戴久了会有什么变化| 胆结石吃什么排石最快| 宫颈ca什么意思| 阴险表情什么意思| 碳酸钙d3颗粒什么时候吃最好| 四维什么时候做| 外阴湿疹用什么药| 吃什么对喉咙好| 什么是强迫症| 屿是什么意思| 什么火没有烟| 杧果是什么| 电解质水有什么好处| 淋巴细胞偏低是什么原因| 手麻是什么病| 开普拉多的都是什么人| 晚上梦见蛇是什么预兆| 下午四点多是什么时辰| 七月二十号是什么星座| 点心是什么意思| 为什么医生都穿洞洞鞋| 什么是酸性食物| 皮脂腺是什么| 卡粉是什么意思| 情感是什么意思| 阳明病是什么意思| 蓄势是什么意思| 什么是肥皂剧| 3p什么意思| 吃什么受孕率又快又高| 螃蟹苦是什么原因| 小case是什么意思| 三点水山今读什么| 拜谢是什么意思| 睾丸萎缩是什么原因| 淋巴细胞比率偏高是什么意思| 为什么养鱼双数是大忌| 高血糖什么原因引起| 天蝎座和什么星座不合| 偶发房性早搏是什么意思| 太平果是什么水果| 传教士是什么| 手掌心经常出汗是什么原因| 老放屁是什么情况| 何曾是什么意思| raf是什么意思| top1什么意思| 泛性恋是什么意思| 鱼吐泡泡是什么原因| 什么的医术| shuuemura是什么牌子| 中国国鸟是什么鸟| 硬刚是什么意思| 试管什么方案好| 等闲变却故人心却道故人心易变什么意思| 紧锣密鼓是什么意思| 碱水对人有什么危害| 莱字五行属什么| 月经期后是什么期| 山川是什么意思| 怀孕孕酮低有什么影响| 阴虚内热是什么意思| 降血糖的草都有什么草| 北京晚上有什么好玩的景点| 每天吃葡萄有什么好处和坏处| 湿气重去医院挂什么科| 为什么不说话| 糜烂性胃炎吃什么药效果好| 霉菌性阴道炎用什么药好| 层出不穷是什么意思| 梦见蘑菇是什么预兆| 聚乙二醇400是什么| 什么是标准预防| 什么叫糙米| 10月29号是什么星座| 械字号产品是什么意思| 声讨是什么意思| 切除一侧输卵管对女性有什么影响| 从什么不什么四字词语| 脐橙什么意思| 口是什么意思| 普罗帕酮又叫什么| 婴儿蓝是什么颜色| 心肌炎什么症状| 低血糖吃什么好的快| 什么的飞翔| 佞臣什么意思| 什么是物理学| 10个月的宝宝吃什么辅食最好| 绿加红是什么颜色| 梦见和女儿吵架是什么意思| 人性的弱点是什么| 尿血挂什么科| 起水泡痒是什么原因| 什么潭什么穴| 吴优为什么叫大胸姐| 白茶适合什么季节喝| 梦见抽血是什么预兆| 啤酒加味精有什么作用| 清热解毒煲什么汤最好| 胃痛吃什么食物| 小学什么时候期末考试| 槊是什么意思| 外阴溃烂用什么药| 6月5日是什么日| 心悸症状是什么感觉| 世界上最贵的烟是什么烟| 龙和什么相冲| 金砖国家是什么意思| 检点是什么意思| 梦到很多蛇是什么意思| 什么情况下喝补液盐| 月经崩漏吃什么止血| 恋爱脑是什么意思| 为什么一同房就出血| 送男孩子什么礼物比较好| 4.28什么星座| 有氧运动和无氧运动有什么区别| 鱼生是什么| 什么是框架协议| 动脉抽血为什么这么疼| 猎奇是什么| 神经梅毒有什么症状| 早晨起来嘴苦是什么原因| 什么原因引起耳石症| 宽字五行属什么| lancome是什么牌子的| 地奥心血康软胶囊主治什么病| 10086查话费发什么短信| 陈皮起什么作用| 天丝是什么面料| 过期的酸奶有什么用途| 芊芊学子什么意思| 痛风吃什么中药| 爆裂性骨折什么意思| 令坦是对方什么人的尊称| 人生只剩归途什么意思| 百度

【西藏游记】林芝,颠覆一夏,这个夏天不要错过

(Redirected from Software port)
百度 28日受冷空气影响,大气扩散条件转好,霾逐渐减弱消散。

In software development, porting is the process of adapting software to run in a different context. Often it involves modifying source code so that a program can run on a different platform (i.e. on a different CPU or operating system) or in a different environment (i.e. with a different library or framework). It is also describes adapting a change or feature from one codebase to another – even between different versions of the same software.[1][2]

Software is classified as portable if it can be hosted in a different context with no change to the source code. It might be considered portable if the cost of adapting it to a context is significantly less than the cost of writing it from scratch. The lower the cost of porting relative to the cost to re-write, the more portable it is said to be. The effort depends on several factors including the extent to which the original context differs from the new context, the skill of the programmers, and the portability of the codebase.

Etymology

edit

The term "port" is derived from the Latin portāre, meaning "to carry".[3] When code is not compatible with a particular operating system or architecture, the code must be "carried" to the new system.

History

edit

The number of significantly different CPUs and operating systems used on the desktop today is much smaller than in the past. The dominance of the x86 architecture means that most desktop software is never ported to a different CPU. In that same market, the choice of operating systems has effectively been reduced to three: Microsoft Windows, macOS, and Linux. However, in the embedded systems and mobile markets, portability remains a significant issue, with the ARM being a widely used alternative.

International standards, such as those promulgated by the ISO, greatly facilitate porting by specifying details of the computing environment in a way that helps reduce differences between different standards-conforming platforms. Writing software that stays within the bounds specified by these standards represents a practical although nontrivial effort. Porting such a program between two standards-compliant platforms (such as POSIX.1) can be just a matter of loading the source code and recompiling it on the new platform, but practitioners often find that various minor corrections are required, due to subtle platform differences. Most standards suffer from "gray areas" where differences in interpretation of standards lead to small variations from platform to platform.

There also exists an ever-increasing number of tools to facilitate porting, such as the GNU Compiler Collection, which provides consistent programming languages on different platforms, and Autotools, which automates the detection of minor variations in the environment and adapts the software accordingly before compilation.

The compilers for some high-level programming languages (e.g. Eiffel, Esterel) gain portability by outputting source code in another high level intermediate language (such as C) for which compilers for many platforms are generally available.

Porting compilers

edit

Instead of translating directly into machine code, modern compilers translate to a machine independent intermediate code in order to enhance portability of the compiler and minimize design efforts. The intermediate language defines a virtual machine that can execute all programs written in the intermediate language (a?machine is defined by its language and vice versa).[4] The intermediate code instructions are translated into equivalent machine code sequences by a code generator to create executable code. It is also possible to skip the generation of machine code by actually implementing an interpreter or JIT for the virtual machine.[5]

The use of intermediate code enhances portability of the compiler, because only the machine dependent code (the interpreter or the code generator) of the compiler itself needs to be ported to the target machine. The remainder of the compiler can be imported as intermediate code and then further processed by the ported code generator or interpreter, thus producing the compiler software or directly executing the intermediate code on the interpreter. The machine independent part can be developed and tested on another machine (the host machine). This greatly reduces design efforts, because the machine independent part needs to be developed only once to create portable intermediate code.[6]

An interpreter is less complex and therefore easier to port than a code generator, because it is not able to do code optimizations due to its limited view of the program code (it only sees one instruction at a time, and users need a sequence to do optimization). Some interpreters are extremely easy to port, because they only make minimal assumptions about the instruction set of the underlying hardware. As a result, the virtual machine is even simpler than the target CPU.[7]

Writing the compiler sources entirely in the programming language the compiler is supposed to translate, makes the following approach, better known as compiler bootstrapping, feasible on the target machine:

  1. Port the interpreter. This needs to be coded in assembly code, using an already present assembler on the target.
  2. Adapt the source of the code generator to the new machine.
  3. Execute the adapted source using the interpreter with the code generator source as input. This will generate the machine code for the code generator.

The difficult part of coding the optimization routines is done using the high-level language instead of the assembly language of the target.

According to the designers of the BCPL language, interpreted code (in the BCPL case) is more compact than machine code, typically by a factor of two to one. Interpreted code however runs about ten times slower than compiled code on the same machine.[8]

The designers of the Java programming language try to take advantage of the compactness of interpreted code, because a Java program may need to be transmitted over the Internet before execution can start on the target's Java virtual machine (JVM).

Porting of video games

edit

Porting is also the term used when a video game designed to run on one platform, be it an arcade, video game console, or personal computer, is converted to run on a different platform, perhaps with some minor differences.[9] From the beginning of video games through to the 1990s, "ports", at the time often known as "conversions", were often not true ports, but rather reworked versions of the games due to the limitations of different systems. For example, the 1982 game The Hobbit, a text adventure augmented with graphic images, has significantly different graphic styles across the range of personal computers that its ports were developed for.[10] However, many 21st century video games are developed using software (often in C++) that can output code for one or more consoles as well as for a PC without the need for actual porting (instead relying on the common porting of individual component libraries).[10]

Porting arcade games to home systems with inferior hardware was difficult. The ported version of Pac-Man for the Atari 2600 omitted many of the visual features of the original game to compensate for the lack of ROM space and the hardware struggled when multiple ghosts appeared on the screen creating a flickering effect. The poor performance of the Atari 2600 Pac-Man is cited by some scholars as a cause of the video game crash of 1983.[11]

Many early ports suffered significant gameplay quality issues because computers greatly differed.[12] Richard Garriott stated in 1984 at Origins Game Fair that Origin Systems developed video games for the Apple II first then ported them to Commodore 64 and Atari 8-bit computers, because the latter machines' sprites and other sophisticated features made porting from them to Apple "far more difficult, perhaps even impossible".[13] Reviews complained of ports that suffered from "Apple conversionitis",[14] retaining the Apple's "lousy sound and black-white-green-purple graphics";[15][16] after Garriott's statement, when Dan Bunten asked "Atari and Commodore people in the audience, are you happy with the Apple rewrites?" the audience shouted "No!" Garriott responded, "[otherwise] the Apple version will never get done. From a publisher's point of view that's not money wise".[13]

Others worked differently. Ozark Softscape, for example, wrote M.U.L.E. for the Atari first because it preferred to develop for the most advanced computers, removing or altering features as necessary during porting. Such a policy was not always feasible; Bunten stated that "M.U.L.E. can't be done for an Apple",[12] and that the non-Atari versions of The Seven Cities of Gold were inferior.[17] Compute!'s Gazette wrote in 1986 that when porting from Atari to Commodore the original was usually superior. The latter's games' quality improved when developers began creating new software for it in late 1983, the magazine stated.[18]

In porting arcade games, the terms "arcade perfect" or "arcade accurate" were often used to describe how closely the gameplay, graphics, and other assets on the ported version matched the arcade version. Many arcade ports in the early 1980s were far from arcade perfect as home consoles and computers lacked the sophisticated hardware in arcade games, but games could still approximate the gameplay. Notably, Space Invaders on the Atari VCS became the console's killer app despite its differences,[19] while the later Pac-Man port was notorious for its deviations from the arcade version.[20] Arcade-accurate games became more prevalent starting in the 1990s as home consoles caught up to the power of arcade systems. Notably, the Neo Geo system from SNK, which was introduced as a multi-game arcade system, would also be offered as a home console with the same specifications. This allowed arcade perfect games to be played at home.[10]

A "console port" is a game that was originally or primarily made for a console before a version is created which can be played on a personal computer. The process of porting games from console to PC is often regarded more cynically than other types of port due to the more powerful hardware some PCs have even at console launch being underutilized, partially due to console hardware being fixed throughout each generation as newer PCs constantly become even more powerful. While broadly similar today, some architectural differences persist, such as the use of unified memory and smaller OSs on consoles. Other objections arise from user interface differences conventional to consoles, such as gamepads, TFUIs accompanied by narrow FoV, fixed checkpoints, online restricted to official servers or P2P, poor or no modding support, as well as the generally greater reliance among console developers on internal hard coding and defaults instead of external APIs and configurability, all of which may require expensive deep reaching redesign to avoid a "lazy" feeling port to PC.[21]

See also

edit
  • Backport?– Developing an update for older software based on an update to a newer version
  • Console emulator?– Program that reproduces video game console's behavior
  • Cross-compiling?– Cross-platform machine-code compiler
  • Cross-platform software?– Computer software installed on multiple computing platforms
  • Emulator?– System allowing a device to imitate another
  • Language binding?– Software library that allows using another library coded in another programming language
  • List of system quality attributes?– Non-functional requirements for system evaluation
  • Poshlib?– Software framework used in cross-platform software development
  • Program transformation?– Automated generation of a computer program
  • Software portability?– Ability of a program to run on different platforms with little alteration
  • Source port?– Altering a game engine's source code to allow it to run on other other systems
  • Source-to-source compiler?– Translator of computer source code
  • Write once, compile anywhere

References

edit
  1. ^ Whitten, D.E.; Demaine, P.A.D. (March 1975). "A machine and configuration independent Fortran: Portable Fortran". IEEE Transactions on Software Engineering. SE-1 (1): 111–124. doi:10.1109/TSE.1975.6312825. S2CID?16485156.
  2. ^ "Portability Issues". .. discusses .. portability of .. Fortran
  3. ^ "port, v.2". Oxford English Dictionary (OED Online). Oxford University Press. Retrieved December 21, 2017. Origin: Of multiple origins. Partly a borrowing from French. Partly a borrowing from Latin. Etymons: French porter; Latin portāre. ... 1. trans. To carry, bear, or convey; to bring.
  4. ^ Tanenbaum 1984, p.?3, §?1.1 Languages, Levels, and Virtual Machines describes the terms and their relations.
  5. ^ Tanenbaum 1984, p.?2. Ch. 1 Introduction explains translation and interpretation.
  6. ^ Richards & Whitby-Strevens 1984, p.?124, §?7.1 Introduction explains compiler portability using intermediate code.
  7. ^ Richards & Whitby-Strevens 1984, p.?133, §?7.4 The bootstrapping process and INTCODE explains the role of the INTCODE interpreter.
  8. ^ Richards & Whitby-Strevens 1984, p.?136, §?7.4.3 Example gives an example translation of a BCPL program into INTCODE for the interpreter.
  9. ^ Wolf, Mark J. P. (2008). "Glossary". The Video Game Explosion: A History from PONG to Playstation and Beyond. Bloomsbury Academic. p.?315. ISBN?978-0-313-33868-7.
  10. ^ a b c Grabarczyk, Pawel; Aarseth, Espen (2019), Port or conversion? An ontological framework for classifying game versions | DiGRA Conference 2019
  11. ^ Nicoll, Benjamin (2015). "Bridging the Gap: The Neo Geo, the Media Imaginary, and the Domestication of Arcade Games". Games and Culture. doi:10.1177/1555412015590048. S2CID?147981978.
  12. ^ a b Bunten, Dan (December 1984). "Dispatches / Insights From the Strategy Game Design Front". Computer Gaming World. p.?40. Retrieved 31 October 2013.
  13. ^ a b "The CGW Computer Game Conference". Computer Gaming World (panel discussion). October 1984. p.?30. Retrieved 31 October 2013.
  14. ^ Dunnington, Benn; Brown, Mark R.; Malcolm, Tom (January–February 1987). "64/128 Gallery". Info. pp.?14–21.
  15. ^ Stanton, Jeffrey; Wells, Robert P.; Rochowansky, Sandra; Mellid, Michael, eds. (1984). The Addison-Wesley Book of Atari Software. Addison-Wesley. pp.?12, 21, 44, 126. ISBN?0-201-16454-X.
  16. ^ Bernstein, Harvey (May 1985). "Beyond Castle Wolfenstein". Antic. p.?83. Retrieved 8 January 2015.
  17. ^ Bunten, Dan. "The Game Collection". Ozark Softscape M.U.L.E. Retrieved 2025-08-14.
  18. ^ Yakal, Kathy (June 1986). "The Evolution of Commodore Graphics". Compute!'s Gazette. pp.?34–42. Retrieved 2025-08-14.
  19. ^ Kent, Steven (2001). Ultimate History of Video Games. Three Rivers Press. p.?190. ISBN?0-7615-3643-4.
  20. ^ Kent, Steven (2001). "The Fall". The Ultimate History of Video Games. Three Rivers Press. pp.?237–239. ISBN?978-0-7615-3643-7.
  21. ^ "Stop making horrible console ports - a guide". PC Gamer. 2013.
奉天为什么改名沈阳 什么桥下没有水脑筋急转弯 大什么大什么 俄罗斯信仰什么教 什么养胃
属鸡与什么属相最配 嗜睡是什么病的前兆 用什么方法治牙疼 玉佛寺求什么最灵验 月亮是什么
一箭双雕是指什么生肖 心脏舒张功能减低是什么意思 吃什么缓解孕吐 玉皇大帝和王母娘娘是什么关系 什么动作容易怀孕
10周年结婚是什么婚 什么是结缔组织病 丰都为什么叫鬼城 木全读什么 颈椎反曲是什么意思
谷氨酰转肽酶高是什么原因hcv7jop4ns7r.cn 什么叫耳石症hcv7jop7ns0r.cn 亚麻籽是什么植物hcv8jop4ns9r.cn 骨关节炎吃什么药xinjiangjialails.com 书到用时方恨少什么意思qingzhougame.com
避孕套玻尿酸的作用是什么hcv9jop0ns2r.cn 圣诞节送女生什么礼物好hcv8jop8ns8r.cn 两肺纤维灶是什么意思hcv8jop1ns6r.cn 渎神是什么意思hcv9jop6ns9r.cn 丙肝阳性是什么意思呢hcv7jop6ns8r.cn
过期的啤酒能干什么mmeoe.com 家里进蝴蝶有什么预兆hcv9jop1ns8r.cn 高血脂是什么意思hcv9jop4ns8r.cn 对象是什么意思hcv9jop4ns1r.cn 腿酸是什么原因hcv8jop6ns1r.cn
崇洋媚外是什么意思hcv7jop7ns1r.cn 2025年属什么生肖hcv8jop8ns4r.cn 饱和度是什么意思hcv8jop3ns4r.cn 胸疼是什么原因hcv9jop6ns4r.cn 梦见打死蛇是什么意思hcv9jop3ns6r.cn
百度