我可以写在直接二进制的程序?我如何才能让计算机执行呢? [英] Can I write a program in binary directly ? How can I get the computer to execute it?

查看:201
本文介绍了我可以写在直接二进制的程序?我如何才能让计算机执行呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这可能看起来怪异,寻找的麻烦,但我认为经历是古程序员经历过的一些有趣的事情。所以,我怎么只能执行二进制编写的程序? (假设我知道我在做什么,而不是使用过程中的装配。)

我只想写像一系列的位111010111010101010101 和执行。所以,我该怎么办呢?


解决方案

使用十六进制编辑器。你需要找出你的操作系统相关的可执行格式,当然 - 假设你想要的使用的操作系统......我想你可以编写自己的引导程序,只是运行code直接的方式,如果你想获得所有铁杆。

我不认为你会的真正的会遇到什么样的程序员经历了当年虽然 - 一件事,你会不会使用打孔卡,纸带等。另外,您的上下文是完全不同的 - 你知道电脑是什么样子的现在的,所以它会感到痛苦原始社会到你......而当时,它会一直在流血的边缘和令人兴奋的只是这些理由

I know that may seem weird and looking for troubles but I think experiencing what the ancient programmers experienced before is something interesting. So how can I execute a program written only in binary? (Suppose that I know what I am doing and not using assembly of course.)

I just want to write a series of bits like 111010111010101010101 and execute that. So how can I do that?

解决方案

Use a hex editor. You'll need to find out the relevant executable format for your operating system, of course - assuming you want to use an operating system... I suppose you could always write your own bootloader and just run the code directly that way, if you want to get all hardcore.

I don't think you'll really be experiencing what programmers experienced back then though - for one thing, you won't be using punch cards, paper tape etc. For another, your context is completely different - you know what computers are like now, so it'll feel painfully primitive to you... whereas back then, it would have been bleeding edge and exciting just on those grounds.

这篇关于我可以写在直接二进制的程序?我如何才能让计算机执行呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆