L
L
lexaxaxa2015-01-04 13:14:32
Iron
lexaxaxa, 2015-01-04 13:14:32

How to enter non-OS programming mode without the help of additional programs (assembler), using only machine instructions?

How to enter non-OS programming mode without the help of additional programs (without assembler), using only machine instructions? How then to find on the disk and load the created program? Is there any special literature (not on assembler)? I would like to have a detailed idea obtained from practice about all levels of abstractions, starting with machine language. And if possible, an example of the simplest program.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Cheremisin, 2015-01-04
@lexaxaxa

From the point of view of iron, the processor, when voltage is applied, reads the first instruction from the address set on the address bus. This instruction is the bit representation of the assembler instruction. The first address on the bus is usually set to flash / rom, then the program itself, wired there, initializes the processor itself, memory, registers and peripherals, this program is called BIOS. This is how all BIOSes work. Previously, a BASIC language interpreter was flashed into the BIOS, now it is not built in there.
The assembler encodes the symbolic representation of instructions into a bit, a text file at the input, and a binary one at the output. To write instructions directly to memory, there is a special mechanism, implemented in hardware and called JTAG, through which you can write binary from another computer directly to the memory of the target computer.
For training in assembler (and ANYWHERE without it, since this is a symbolic representation of the instructions themselves), I recommend either simple debug kits like arduino / stm32 or a simple virtual machine where you can load your BIOS from a file.

R
Rsa97, 2015-01-04
@Rsa97

No one has done this kind of programming for a long time. At one time, it looked like this:
The processor remained in the Halt state when power was applied. A special device, the RAM programmer, was connected to the address and data buses. It consisted of address toggle switches, data toggle switches, "accept address", "next address" and "write data" buttons.
The program was written on a piece of paper, the language - the assembler of a specific processor, was translated on a piece of paper into machine code. Then this code was entered into the RAM step by step using the programmer (set the starting address, clicked "accept address", set the data byte, clicked "write data", "next address" ...), into the IP register (the registers were also stored in memory) processor, the starting address of the program was entered,
To write something to a medium, it was necessary to provide in the program the entire code for working with the equipment of this medium.
Actually, in order not to deal with this insanity on a daily basis, a ROM was added that stores the procedures for working with the basic devices of a computer and the code for starting reading programs from punched tape, punched cards, magnetic tape, magnetic drum or disk.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question