Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
The Game Boy game "Tetris" leaves a transmission interval of about a millisecond between bytes sent over the serial link, as suggested by the official Game Boy Programming Manual, to give ...
8086 is source code compatible with 8080. Zilog Z80 extended Intel 8080 with:
An enhanced instruction set including bit manipulation, block move, block I/O, and byte search instructions
New IX and IY ...
This is a fairly basic question, and I almost feel ashamed to ask it; I'm guessing it can be answered in a single sentence.
There was a rather influential series of assemblers for some of IBM's ...
I am watching a recording of a discussion panel ‘Unix50 - Unix Today and Tomorrow’, part of which contains Bjarne Stroustrup’s talk ‘From C to C++’, discussing the history of C++.
At 20:46 there is a ...
First Z80 project after 6502, a simple looking piece of code giving me hard time.
print_char is a working function which prints contents of A to the screen.
My first issue is that the following code (...
I seem to remember using an assembler with the following interesting workflow: You'd write an assembly language file and assemble it. The output overwrote your source code by placing the executable ...
I'm confused on the behavior of setting the invert bit on the PDP-1's SKP group. The manual states:
The intent of any skip instruction can be reversed by making Bit 5 (normally the Indirect Address ...
The assembly language for many processors use the phrase "arithmetic shift" to represent the bitwise shift of a signed value, and "logical shift" for an unsigned value. The two ...
I have a simple program on my Apple IIc written in assembly language. It starts by getting a filename from the user (just the file name, not the full path), then it opens the corresponding file with a ...
I tried this code in my assembler, set to 16 bit mode:
bits 16
rep mov ds, ax
Surprisingly, no error was thrown. Is this even valid? Wasn't rep only supposed to work with string instructions? Is it ...
Memory corruption bugs have always been a common problem in large C programs and projects. It was a problem in 4.3BSD back then, and it's still a problem today. No matter how carefully the program is ...
Would somebody care to explain how "Super Mario Bros." was released in 1985. But the DASM Assembler came out in 1987?
The 6502 Assembly language was introduced in 1975. How would you compile/...
I've been looking at a bunch of different 6502 assemblers recently (dasm, ca65, xa, kickass), and many of them have support for multiple code segments. Some of these assemblers can generate ...
I am trying to use the xa assembler to write some 6502 code. According to the documentation, I can define a zeropage segment using the .zero pseudo-op. I was hoping to do something like this:
.zero
...
I'm wondering how to write a program in Z80 assembler that discovers the value stored in the SP register.
From what I've seen, the only instructions that touch the SP register are:
LD SP, HL/IX/IY
EX ...
I'm writing a very basic OS for my homebrew Z80 computer. As an absolute assembly language beginner, I managed to obtain a working "os plus memory monitor" that can show memory content and ...
How to do correct copying char to sprite ?
Lets say 1st char is at $2000 second is at $2008 and copying to sprite at $2480.
And with this we can copy 1 char to top left position of 1st sprite. But ...
In 1959, Donald Knuth wrote an assembly program named SuperSoap for the IBM 650. Here is the manual, and here is a listing of the program (in SuperSoap assembly language). Quoting from the abstract:
...
I would like to convert an assembler program in ca65 with macros into assembler code with resolved macros in order to carry out manual or automatic optimizations with the resulting code. Then, the ...
If I was to write an Amiga game, what would be the best/most reliable way to detect how much RAM is actually available?
Looking at Action's Guide to AGA-Fixing!, he mentions Faulty Memory Detection:
...
In general, it is possible to use inline assembler statements within C macros, for example
#define toscreencode(C) (__AX__ = (C), \
asm("cmp #$60"),\
...
I have the following assembly code for 8086
MOV AL, [BX]
OUT DX, AL
The bus clock frequency is 1MHz. Access to memory is done without WAIT, and to I/O with one WAIT tick. How I can calculate the ...
The IBM/360 Macro Assembly language was quite powerful, allowing non-trivial compile-time string manipulation.
Did macro packages exist which would facilitate programming at a (slightly) higher level, ...
Checking the MS-DOS interrupt list we see INT 0x20 "Terminate the program" (see https://en.wikipedia.org/wiki/DOS_API) but if we check the same page we see INT 0x21 with function 0x4C will &...
I have a memory setup where the whole address space can be exchanged (default 2 slots with 2 banks each, but may change depending on "expansion cards" plugged in).
Banks are switched by ...
The closest I was able to find on StackOverflow is What are .S files?, in which no answerer addresses why we use .s for assembly. (And .S for preprocessor/macro assembly; and gcc -S to produce ...
I first learned about tracker / mod music on my Amiga in the early 1990's. I remember fooling around with Protracker, listening to mods with Intuitracker, and coming to the realization that all those ...
I'm building a breadboard Z80-based computer. As now, I have the CPU hooked up to an EEPROM and an I/O device (an HD44780 character display) with appropriate decoding logic.
The ROM chip starts at ...
I have written an emulation of the Heathkit ET-3400A microcomputer trainer in Java, mainly to see if I could do it and to get my feet wet in Java. Odd question, but there's a discrepancy (one of many,...
Were developers using monitors like e.g. "Supermon+64", "Merlin 64" or "Monitor$C000" and cartridges like "Final Cartridge", "Action Replay" (both of ...
Warning: There are flashing images below, do not scroll down if you are sensitive to them!
According to various sources (for example this for the Plus/4), both the C64 and Plus/4 have a "jiffy&...
I am working on coding a driver of sorts for a Z80 based computer I am making. I am compiling with SDCC and I have been getting the following?
ASlink-Warning-Undefined Global 'data' referenced by ...
I am working on designing a Z80 computer that utilized the TMS9918ANL for graphics. I am currently just trying to make sure the TMS9918ANL is working, so I hooked up the control pins the bus (...
so here is the code: (which comes from here, I've also verified this source is in my unix v7 distribution). For reference, this is running on a PDP-11 simulated with the simh program (so please keep ...
I am working on designing a Z80 computer and I would like to use a PS/2 Keyboard for input. I would like to use a PIO to communicate with it, but I am having trouble finding any documentation online ...
So, I'm working on a project where I'm aiming to get the first winner of the IOCCC (obfuscated c code contest) dissected down to the last detail... The program is mullender.c which you can find by ...
I'm trying to create some graphics function for a ZX Spectrum (Z80) machine in assembler. I already have the basics except for the arc.
I know that there must be some way to draw an arc using the ...
I'm working on implementing the instructions of the z80 chip inside a gameboy for an emulator. I'm starting with the instructions in the boot rom that sets everything up.
I've implemented the first 3 ...
From what I've read, the first FORTRAN compiler built a machine-code program entirely in memory; it was, in fact, designed to read the entire source code of the program, and then sequentially load ...
I have recently been learning to use vasm. For those that don't know, vasm is a cross-platform assembler for multiple types of processors such as the M68000.
http://sun.hasenbraten.de/vasm/
I am ...
I find I keep on doing things like this:
raster_interrupt:
bgnd_color = * + 1
lda #$00
sta $d021
; rest of interrupt handler
so that I can do this kind of thing elsewhere in my ...
While searching on the Internet and Quora, I found disassemblers for Pac-Man, Galaxian, and Super Mario Bros. The thing that puzzled me, was while Super Mario Bros was arguably quite a complex game ...
Prior to 1972, was there any automated unit-testing? Did any assemblers include a testing a framework?
I can find some academic journals on this topic from the late 70s -- most of which I don't have ...
This question may have the apparent form of a question soliciting a "list" answer, but I'm expecting the list to be very short, so please bear with me.
What "unusual" syntax assembly languages are/...
Does anyone know of a good, modern Motorola 6800 assembler?
I've used dasm, which I quite like (and it's even actively developed), but it doesn't actually support 6800. It supports 6803, which is ...
Are there any tricks that can be used to invert the carry flag on the 6800, in as few bytes as possible?
This is the shortest subroutine I've come up with, which is straight forward:
INVC: BCS ...
I've been fooling around with the Merlin 8 (v2.58) assembler on my Apple IIe and ran into a small snag.
Basically, I would like to load the address of a block of data into a two-byte pair in zero ...
I have an emulator up and running and access to the asimov ftp site, and I want to learn how to program assembly language on the Apple IIe. What assembler should I use (Merlin? LISA?) and what book or ...
How do you access more memory (above the 1MB) in DOS if the 640KB of conventional memory are not enough?
I have read a lot about this, but I couldn't figure out how to do this in actual code. Is ...
The Apollo Guidance Computer had its code stored in six modules that held 6 kwords of storage each, and the design of each module was such that changing even a single bit after construction would have ...
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.