Questions tagged [as86]

as86 is an assembler for the 8086..80386 processors. Its syntax is closer to the intel/microsoft form rather than the more normal generic form of the unix system assembler.

as86 is an assembler for the 8086..80386 processors. Its syntax is closer to the intel/microsoft form rather than the more normal generic form of the unix system assembler.

The src file can be '-' to assemble the standard input.

This assembler can be compiled to support the 6809 cpu and may even work.

More info: as86(1) - Linux man page

15 questions
5
votes
1 answer

Linux kernel 0.01 bootloader used rep movw, not rep movsw? Does that actually repeat plain MOV?

I am new to assembly and I am trying to understand Linux 0.01 bootloader code but I got stuck at this part (at very beginning :) ): .globl begtext, begdata, begbss, endtext, enddata, endbss .text begtext: .data begdata: .bss begbss: .text BOOTSEG =…
Mr. Vader
  • 91
  • 6
3
votes
1 answer

How to install as86 in debian 6.0?

I need to install as86 in debian 6.0. However, I cannot find as86 in debian-6.0-DVD.then,where to find as86 ?
huaxz1986
  • 307
  • 5
  • 10
2
votes
1 answer

bootsect.s: How com that we can access the next line after moving the code itself away?

I'm a newbee learning operating system online, in which bootsect.s is mentioned: https://kernel.googlesource.com/pub/scm/linux/kernel/git/nico/archive/+/v0.99-pl8/boot/bootsect.S But this piece of code is quite strange to me: mov…
Changda Li
  • 123
  • 1
  • 8
1
vote
0 answers

Boot time segment register value change

When the BIOS passes control to the code loaded from the MBR, the first instruction seems to be jmpi go, BOOTSEG where go is another label preceding the next instruction and BOOTSEG is 0x07c0. The reasoning for executing such an instruction seems to…
learnlearnlearn
  • 946
  • 1
  • 8
  • 16
1
vote
2 answers

Error while assembling the code in x86 Assembly

I have the following code: .global _launchProgram _launchProgram: push bp mov bp, sp push cs mov bx, [bp + 4] mov cs, bx mov es, bx eseg call #0x0 pop bx mov cs, bx pop bp ret In this code I am trying to make it to jump to another piece of code and…
sarthak
  • 774
  • 1
  • 11
  • 27
1
vote
0 answers

Error in x86 Assembly code

I have the following code for my boot-loader: [org 0x7c00] KERN_OFFSET equ 0x1000 mov bx, BOOTLOADER_MSG call print_string mov [BOOTDISK], dl mov dl, 0x0 ;0 is for floppy-disk mov ah, 0x2 ;Read function for the interrupt mov al, 0x15 ;Read 15…
sarthak
  • 774
  • 1
  • 11
  • 27
1
vote
1 answer

Printing to screen VGA variable offset

I'm trying to display characters on screen by calling the following function in my C code: .global _putInMemory ;void putInMemory (int segment, int address, char character) _putInMemory: mov bp,sp push ds mov ax,[bp+2] …
Uku Loskit
  • 40,868
  • 9
  • 92
  • 93
1
vote
2 answers

Convert an as86 to fasm

I'm trying to convert this bit of assembly for as86 to fasm. I have 3 questions: 1) Why seg es given an error: illegal instruction. this is not valid in 16-bit? 2) Is mov byte [0],0x41(FASM syntax) exactly equivalent to mov [0],#0x41(as86 syntax)?…
Jack
  • 16,276
  • 55
  • 159
  • 284
0
votes
0 answers

Can you help me with "as: error reading file" error?

I'm new to the Assembly programming language. I'm trying to compile a simple booter code in Ubuntu from a book. This code supposes to be a minimal booter to boot an operating system. I'm kind of sure that there is no error in the code because every…
0
votes
1 answer

Assembly instruction 'jmpi' is not work in my code

Currently, I'm reading the Linux kernel source code of v0.01. I'm trying to imitate the code and make it work. But got stuck at the very beginning of the bootsector. In bootsect.s, the program first load at 0x7c00 and move itself to 0x90000, then…
Hu Vincent
  • 11
  • 2
0
votes
2 answers

what is the assembly language version (or type) that linux 0.11 bootsect.s source code based on?

I'm learning linux kernel source code. And I've already got some basic idea about assemly language, like the usage of general instructions(such as mov, add, jmp, call...), the difference between AT&T type and Intel type. So for now, it isn't a big…
0
votes
0 answers

Why I can't use register to access memory in as86

I am reading Linux 0.11's source code these days.And when I tried to modify it and print some hardware's properties on the screen, there are errors from as86: make BootImage as86 -0 -a -o boot/setup.o boot/setup.s 00056 0050 A1 …
TherLF
  • 13
  • 5
0
votes
1 answer

AS86 Set Origin Address (x86 assembly)

Does anyone know how to set an origin address using AS86 syntax? With NASM, you would put, for example (in a BIOS bootloader): ORG 0x7c00. Does anyone know what the AS86 equivalent is? Or what the functional equivalent would be? I'm using AS86…
Learning
  • 35
  • 6
0
votes
1 answer

x86 assembly mov instruction LILO

I was reading the source code of LILO for a project and I stumbled across this line mov dh, [d_dev](bp) I wished to know what the mov instruction is doing here, I know that if it is mov dh, [d_dev] then the value pointed by d_dev is placed in dh…
systolicDrake
  • 101
  • 1
  • 6
0
votes
3 answers

Include binary file in as86/bin86

I have written a bit of code in i8086 assembler that is supposed to put a 80x25 image into the VRAM and show it on screen. entry start start: mov di,#0xb800 ; Point ES:DI at VRAM mov es,di mov di,#0x0000 mov si,#image ; And DS:SI…
Maximilian Schier
  • 1,579
  • 14
  • 18