Questions tagged [assembly]

Assembly languages in general, of any architecture. Use with the particular processor’s tag as appropriate.

Filter by
Sorted by
Tagged with
8 votes
2 answers
976 views

Help understanding TAIPAN source code for the Apple II

I am trying to run the source code found at https://taipangame.com/BASIC.txt on Epple 2 (with Apple II+ roms) to eventually run on my own Apple II+, but the program keeps crashing. First, I used a ...
EvanTheGamer's user avatar
17 votes
3 answers
4k views

Does this 1978 code for a 6800 really clear ALL of memory?

On page 43 of the October 1978 Dr. Dobb's Journal (reprinted in Volume 3 Page 425 Issue 10 Number 29) is a letter to the editor giving three 6800 routines to clear ALL of memory, stating... Routine ...
Les's user avatar
  • 171
8 votes
1 answer
1k views

C64 char screen plot routine - not clear about reason for logical OR

I'm trying out some 6502 assembly language, specifically using Kick Assembler. I have the following routine that just sticks a character on the text screen at a specified x and y, it's taken from the ...
Alan B's user avatar
  • 3,857
5 votes
1 answer
299 views

Can anyone help me identify what 6803/6303 development tools might have been used to build this program?

I've been doing some hobby work reverse-engineering vintage synthesizer ROMs from the early 80s, and I'm curious about what kind of development tools the original engineers may have used. Normally ...
ajxs's user avatar
  • 836
6 votes
0 answers
277 views

Sending DOS commands in assembly on my C64

Consider the following Basic program for the C64. 10 OPEN 15,8,15 20 PRINT#15, "I" 30 CLOSE 15 This classic gem simply opens the 'command channel' and sends the DOS 'init' command to the ...
Geo...'s user avatar
  • 9,795
4 votes
1 answer
227 views

Documentation for the SALUT preprocessor of the IBM Macro Assembler 2.0

The IBM Macro Assembler 2.0 included the SALUT program, which was a preprocessor for assembly language for structured programming. It was also included in the IBM Macro Assembler/2. I am looking for ...
Marc Nieper-Wißkirchen's user avatar
2 votes
0 answers
324 views

Trying To Understand DOS Game Assembly Instructions [closed]

I am trying to understand assembly language instructions, for a DOS Game. I have looked at the following Link :- https://atrevida.comprenica.com/atrtut07.html reading about how VGA Graphics work in ...
Edward Winch's user avatar
5 votes
0 answers
344 views

Did the Soviets need industrial espionage to get IBM software pre-1970?

Due to lack of the OS-level file system on the BESM-6, and to deficiencies of data visualization tools which could help people decide which blocks of a system disk could be reused (the line of ...
Leo B.'s user avatar
  • 18.3k
12 votes
2 answers
1k views

Floppy drive detection on an IBM PC 5150 by PC/MS-DOS

The only functions of INT 13h available for pre-XT systems are the first six, from AH=00 to AH=05 (see here and here) Since function AH=08 (Get current drive parameters) is unavailable, how does PC-...
padawan's user avatar
  • 445
13 votes
3 answers
2k views

What's the convention for < > low/high-byte in 8-bit assembler?

It's a little hard to Google for greater-than and less-than symbols in assembler math... If you saw, let's say, 6502 code like... lda #>SOME_LABEL or Z80 code like... ld a,>SOME_LABEL ...would ...
Luxocrates's user avatar
1 vote
1 answer
197 views

Interfacing with the Commodore 64 IEC Serial Port using Assembly

I'm struggling a bit to find relevant documentation on this subject when it comes to using just assembly. All I've found is either irrelevant or for BASIC. My goal is to be able to send and receive ...
SkyeG06's user avatar
  • 21
6 votes
1 answer
375 views

Which CPU was the first to clear the carry and overflow bits after performing logical operations?

As I work on implementing support for old architectures for the Reko decompiler (https://github.com/uxmal/reko) I notice over and over how consistently most 1980's CPUs echo a pattern. Since an ...
John Källén's user avatar
15 votes
3 answers
3k views

Difference between machine language and machine code, maybe in the C64 community?

I've always been sure that "machine language" and "machine code" are totally synonymous and mean programming directly in the language the machine understands, whether in binary, ...
hippietrail's user avatar
  • 6,333
11 votes
5 answers
2k views

Creating 8086 binary larger than 64 KiB using NASM or any other assembler

For fun I'm developing an IBM PC emulator. I would like to test all instructions to see if I implemented them correctly. For most instructions this is straight forward, for "FAR CALL/JMP" it ...
Folkert van Heusden's user avatar
10 votes
4 answers
2k views

Assembly delay function for C64

I've written a delay function that simply counts the times the screen raster line reaches a particular value. // zero page addresses .const delayFrames = $00fa .const delayCounter = $00fb // =...
Gavin Williams's user avatar
5 votes
5 answers
767 views

Are there any statistics or data showing how much more productive the C programming language is compared to x86 assembly language?

I found out today that a large project like Microsoft Windows 1.0 took 80 man-years to develop. And this one was written in x86 assembly language. Is there a form or rule of thumb that states how much ...
Coder's user avatar
  • 831
16 votes
4 answers
2k views

Is it possible to detect a CGA card on an IBM PC 5150 by write/reading the Motorola 6845?

I am trying to programatically detect the CGA card on old IBM 5150-ish PCs. The Paku Paku game source code doesn't directly detect it. The strategy is to detect VGA, EGA, Tandy, PCJr, etc etc, then if ...
don bright's user avatar
14 votes
3 answers
2k views

Help porting nasm code down from 386 to 8088 (shifts by more than 1 bit)

I have been writing some small asm COM program using Netwide Assembler (nasm), but am having trouble getting it to run on 8088 emulators like PCjs. I could use some help translating the assembly "...
don bright's user avatar
10 votes
2 answers
753 views

How can I avoid overflowing R_SPARC_13 relocations when writing SPARC assembly?

For fun I'm trying to create an assembly program for Sun Solaris on SPARC. I'm emulating the system with QEMU. My test assembles fine, yet linking fails with "relocation error: R_SPARC_13". ...
Folkert van Heusden's user avatar
31 votes
6 answers
3k views

Managing registers/memory effectively on the Z80

I've been writing assembly for the Z80 for some time, lately. Initially, I had no experience with working with 8-bit processors, but after going through a tutorial for my platform and spending a lot ...
v-rob's user avatar
  • 455
11 votes
2 answers
564 views

IMPI Instruction set: is there any reference?

I've had an IBM 9404 B-10 for some time and I'm curious about its assembly language. I'm fully aware the AS lines were designed with portability in mind as much IBM didn't seem to provide assembly ...
Borg Drone's user avatar
6 votes
2 answers
245 views

6502 Assembly on Apple IIe: GETLN fails with 'syntax error' under ProDOS

I'm writing a text adventure in assembly for the Apple IIe (using Merlin). I'm also using ProDOS 8 v2.0.3. At some point, I have a subroutine to read user input from the keyboard using the GETLN1 call....
Taciano Dreckmann Perez's user avatar
3 votes
1 answer
346 views

Is RosAsm assembler self-hosting?

I have a few questions about the RosAsm assembler (not in active development anymore) by René Tournois: Is/was there a command-line tool (i.e. without a GUI) included to generate executable programs ...
pts's user avatar
  • 1,435
15 votes
4 answers
2k views

Looking for an open source DOS .com program written in assembly

I'm writing a NASM-compatible assembler targeting the Intel 8086, and I'm looking for an existing open source program written in assembly, with which I can showcase the capabilities (and understand ...
pts's user avatar
  • 1,435
10 votes
3 answers
2k views

How to write text in MODE 0x13?

I have read How to write directly to video memory using "debug.exe" in MS-DOS? and I know how to write text to video memory in mode 0x3 but I can't figure out how to write text to video ...
Lone Learner's user avatar
10 votes
11 answers
949 views

Towards people who were there, what programs did you use to develop applications for the IBM 5150? [closed]

I want to get into programming on old MS-DOS systems, before then going to older DOSs like CP/M. However, while programming for MS-DOS I'd like to also use era-appropriate software, both for the ...
Sage Hendricks's user avatar
7 votes
1 answer
421 views

Why didn't the CP/M-86 assembler support traditional macros?

The ASM86.CMD assembler Digital Research shipped with CP/M-86 provided only code-macros, a limited type of macros for creating new instructions through a small set of specific directives. Why didn't ...
Paolo Amoroso's user avatar
24 votes
1 answer
2k views

Where can I find the debate around snow-free screen updates mentioned in the Zen of Assembly Language?

Michael Abrash's book Zen of Assembly Language: Volume I (1989) contains a reference to a column in a computer magazine, though the actual source is not cited. From the text: I recall a debate in the ...
640KB's user avatar
  • 1,287
0 votes
1 answer
250 views

Apple II mixed mode cursor placement

I've been playing on my recently resurrected Apple IIs, a //e, IIc, and IIgs (mostly the //e), tinkering with assembly. I'm reading the paddles and plotting a colored block on the screen, kind of an ...
mswade's user avatar
  • 93
8 votes
2 answers
2k views

Asking explanation of 65C02 assembler code

From Gary B. Little's "Apple ProDOS: Advanced Features for Programmers", pages 176 - 188: "Since the ONLINE command handler is not inherently relocatable, all references to internal ...
mswade's user avatar
  • 93
6 votes
2 answers
461 views

SciTech's SVGAKit seems to be incomplete

I'm trying to get into MS-DOS development for fun, and I'd like to use SciTech's SVGAKit library. The last version of it is still downloadable via the Internet Archive here. However it seems to be ...
Spudd86's user avatar
  • 211
8 votes
1 answer
280 views

Using the (An)+ to Memory addressing mode when address register is pointed to ROM causes Sega Genesis DMA to fail

This is a weird one, and I haven't found it documented anywhere. I was testing Sega Genesis DMA during scanline interrupts and found something very odd. When writing to VDP_CTRL to initiate DMA, if ...
puppydrum64's user avatar
  • 1,638
5 votes
5 answers
472 views

Chaining IRQs in x86 ROM code

Objective Summary: I need to write a sleep() function to be used in 8088 (PC/XT ISA) ROM code with 1 ms resolution. Though the question can be more generalized to chaining INTs with data in different ...
640KB's user avatar
  • 1,287
15 votes
3 answers
2k views

Running CP/M on my own Intel 8080 emulator

I recently finished writing an emulator for the Intel 8080, having passed all of the usual test suites, and wanted to try running an actual OS on it (such as CP/M). I'm aware that I would have to ...
linguisician's user avatar
26 votes
3 answers
4k views

Why are the Intel 8080's rotate instructions called opposite to intuition?

The Intel 8080 has two pairs of instructions for rotating the value of the accumulator -- RLC/RRC and RAL/RAR. One of them shifts the 8 bits in the accumulator circularly, writing out into the carry ...
Danya02's user avatar
  • 363
6 votes
1 answer
469 views

How do I read a port value using Turbo Pascal inline code on CP/M?

After successfully using port[0] to read a port value in Turbo Pascal, I thought I'd try to understand how to do this using inline assembly/machine code. I'm able to write to the port (my OutPort ...
Nick Bolton's user avatar
38 votes
3 answers
5k views

Why are assemblers called assemblers?

We tend use the term assembler as if there is a fundamental implication of being different from a compiler. This disparity is usually taken as a fact, no matter how sophisticated or primitive either ...
Raffzahn's user avatar
  • 213k
10 votes
3 answers
2k views

Is there an equivalent of "#pragma once" in RGBASM (Gameboy DMG assembly language)?

So I am really just starting out in my assembly coding adventure. I have a little bit of knowledge of C/C++ but nothing too advanced yet. But I also used to do a tiny bit of Z80 assembly, and I wanted ...
I_Keep_Trying's user avatar
-4 votes
1 answer
430 views

If I build a new CPU architecture, how would an OS like Linux know how to run it? [closed]

I am trying to build a CPU from scratch (from NOR gates) in an emulator first, then on breadboard. (Inspired by nand2tetris and Ben Eater) Just trying to understand how things work. Now, as my CPU ...
Palash Kanti Kundu's user avatar
2 votes
2 answers
363 views

From an electrical and software engineering perspective, ignoring available software, should I go for the Z80 or 65C02? [closed]

This might be a weird title but I noticed that recommendations for one over the other usually go into a direction that is not too helpful for me. I would like to build an 8 bit computer and picked ...
Asyx's user avatar
  • 29
7 votes
1 answer
477 views

PDP 11/70: how does MTPI work?

I'm trying to understand the MTPI (and its MFPI counterpart) instruction on the PDP/11. As far as I understood, it: it retrieves a value from the "current" memory space with the current ...
Folkert van Heusden's user avatar
22 votes
3 answers
6k views

Why are these DOS console drivers wasting precious bytes?

While doing some research on DOS device drivers, I took a peek at the console drivers DISPLAY.SYS and ANSI.SYS that are part of the DOS 6.20 installation. Both have "Microsoft" stamped on, ...
Sep Roland's user avatar
  • 1,043
0 votes
1 answer
270 views

getting PDP-11 DL11 output via telnet

I'm trying to run the (a slightly adapted version but the original gives the same problem) example program from How to implement a 'write' function in pdp-11 / MACRO-11 / ODT using simh? in ...
Folkert van Heusden's user avatar
7 votes
2 answers
727 views

Any recommendations for a Hitachi HD6303 assembler?

Does anyone have any good recommendations for a Hitachi HD6303 assembler? I've been working on a project to reverse-engineer an executable made for a Hitachi HD63B03 processor. I've finished the first ...
ajxs's user avatar
  • 836
64 votes
1 answer
7k views

How did the SNES do the “pixelate” transition effect?

This effect is seen in many SNES games, including Super Mario World. The effect pixelates the screen, and makes the pixels larger, then smaller again when it switches to another scene. It is done so ...
Chewie The Chorkie's user avatar
41 votes
12 answers
8k views

When did assembly source code begin to be written in lowercase?

In nearly all the assembly source files and published listings I read up to the early 1980s, the labels, mnemonics, and operands were written in all uppercase. Just a few years later, I noticed 80x86 ...
Paolo Amoroso's user avatar
5 votes
1 answer
495 views

Z80 CPU and nested/reentrant NMI

According to multiple documentation sources, non-maskable interrupts (NMIs) can be nested (or reentrant) in a Z80 microprocessor. This is, upon a /NMI signal pulse, the CPU will interrupt the current ...
Alvaro Polo's user avatar
2 votes
1 answer
240 views

Timer B Interrupt occurs only once

I was following this tutorial on Commodore 64 timer interrupts and tried to replicate it (except all I was planning on doing was changing the border color.) I noticed that my interrupt only occurs ...
puppydrum64's user avatar
  • 1,638
1 vote
1 answer
263 views

Game assembled using RGBDS can't access cartridge RAM

Any writes I do to cartridge RAM on my test game assembled with RGBDS are silently ignored. I wanted to move the stack pointer to cartridge RAM to have more room in high ram to use as a scratchpad, ...
puppydrum64's user avatar
  • 1,638
1 vote
1 answer
315 views

How does RETN return from NMI on the Z80 in the event of nested NMI?

I was trying to learn how the Sega Master System works. The NMI occurs when the pause button on the console is pressed. So I wrote an NMI handler that makes a beep when the NMI occurs, then waits for ...
puppydrum64's user avatar
  • 1,638

1
2 3 4 5