Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

For questions about programming languages and constructs. For questions about specific languages please check for language-specific tags first, and use those instead.

4
votes
0answers
101 views

How to use IIgs enhanced graphics modes in AppleSoft BASIC with System 6?

There are many packages that let you use the enhanced graphics modes of the IIgs in AppleSoft BASIC. However most packages like Iconix do not like System 6 so they have to run off disks and not the ...
10
votes
4answers
2k views

What are the rules for Applesoft BASIC formatting for code?

What are the rules for Applesoft BASIC formatting for code? I've been doing some BASIC coding and noticed that: 10 input "some question?"; name$ Will be reformatted as: 10 INPUT "some question?";...
3
votes
4answers
438 views

Was there ever a compiler type that was just large enough to contain a memory segment?

From this answer, Hark back to the days of segmented 16-bit architectures for example: an array might be limited to a single segment (so a 16-bit size_t would do) BUT you could have multiple ...
13
votes
8answers
580 views

Uses for the halt instruction?

What was the halt instruction in early CPUs such as the Z80 and 8080 used for? Here's a description of the Z80 instruction: The HALT instruction suspends CPU operation until a interrupt or reset ...
15
votes
6answers
2k views

What caused the downfall of PASCAL? [closed]

From 1985 to 1990 Borland's Turbo Pascal was at least as popular as "C" for DOS systems. TPascal was especially popular because of it's ground breaking BGI graphics interface while "C" was stalled in ...
14
votes
1answer
654 views

Fortran variable type defaults - origin

In older versions of Fortran, e.g. 77, variables did not need to be declared. If the name starts with I, J, K, L, M, or N then it would be assumed to be an INTEGER. Otherwise, it would be assumed to ...
0
votes
1answer
184 views

Is it possible to make VICE load .prg files faster?

When I load a C64 .prg with the Hoxs64 emulator, my .prg loads pretty much instantly. But when I load the same .prg file with VICE (x64 app.prg) it takes quite a while (depends on memory map, but ...
2
votes
1answer
139 views

Is it possible to use the BRK instruction when ROM is banked out?

I used to use the BRK instruction when debugging on the C64. However, when I bank out ROM with... lda #$35 // Bank out kernal and basic sta $01 // $e000-$ffff ...the BRK instruction (...
12
votes
3answers
2k views

What's a good way to implement this “fade” effect on C64

See the beginning of https://www.youtube.com/watch?v=hmfLBAtGAKk. Here's a screenshot: It basically clears characters pixel by pixel both horizontally and vertically. Use sprites for the pixel by ...
1
vote
2answers
209 views

Reading both keyboard and joystick with non-KERNAL code on C64

I'm implementing non-KERNAL joystick and keyboard controls for my Commodore 64 game. I used to use the KERNAL SCNKEY routine earlier to read keyboard and it worked well with my joystick port 2 code. ...
27
votes
5answers
7k views

Why was nil defined as a reserved word in Pascal?

In Pascal, nil (the pointer value to "nothing") is a reserved word. Why wasn't it simply a predefined identifier as true and false are, for example? This is stated in PASCAL User Manual and Report p....
33
votes
4answers
10k views

Who is credited for the creation of Assembly Language?

The C Programming Language was originally developed by Dennis Ritchie who also co-designed the Unix operating system with which development of the language was closely intertwined. Is there a ...
24
votes
7answers
10k views

How can you run a program that is bigger than RAM?

Suppose you have a program that is 218 words long. However you are using a 16 bit machine and have 216 words of RAM. (The RAM is directly addressed by the CPU). On the other hand, you have unlimited '...
5
votes
2answers
304 views

What books did schools use to teach BASIC?

What books would have been used to teach school aged kids BASIC in a classroom setting back when BASIC was in common use? 8-Bit computers commonly came with tutorials to learn BASIC, like A Touch of ...
11
votes
3answers
901 views

Native C compiler for Sinclair ZX Spectrum

I am looking for a native C compiler for the Spectrum 128. I would like one which: Has good support for the latest C standard at the time. Is not limited to compiling ridiculously short source code. ...
3
votes
2answers
738 views

Best path to learn C64 assembly [closed]

The amount of tutorials, youtube videos, scanned books on C64 programming is overwhelming. What materials would you recommend -- and, importantly, in what order! -- to build a path to programming my ...
2
votes
1answer
348 views

How was the first working version of Google written?

Which language and/or server software did Google use for its initial version?
27
votes
4answers
7k views

Why (historically) include the number of arguments (argc) as a parameter of main?

A comment on this answer to a StackOverflow question made me curious. According the C99 standard, section 5.1.2.2.1: The function called at program startup is named main. The implementation ...
6
votes
2answers
347 views

Unsigned addition on the 6502

I am currently playing around with pointer and indirect addressing on the C64 and I encountered a problem with the ADC opcode. I am trying to increment a number repeatedly and when it overflows (goes ...
13
votes
3answers
561 views

What is going on in the overscan area of Sega Genesis games?

What is going on in the overscan area of Sega Genesis games? I noticed that different games display different things in the overscan area. I understand this was never intended to be seen. However,...
15
votes
3answers
3k views

Do you need to allocate memory before you use it in MS-DOS?

In modern operating systems (for example: Windows), you can't access a memory location before you allocate that memory location to your program (or else a segmentation fault will occur). I am ...
4
votes
2answers
497 views

How hard would it be to port Amiga OS4 to x86 or ARM?

This question was raised on Facebook a few hours ago. Some say it's possible, others say impossible. What do you experts say?
6
votes
1answer
344 views

What is the title of this Macintosh programming book?

Back when Mac OS was called "System" and preemptive multitasking was a distant fantasy, I had a small collection of Macintosh programming books. For the life of me, though, I can't remember what one ...
7
votes
1answer
208 views

Was there an interactive macro/scripting language named PAGEN?

In a BESM-6 disk image I can see bits and pieces of something that looks like a strange interactive scripting language: [start of disk block] <LET=P11=%X01 <IEQ=P11=%377 <LET=P11=1 <END &...
3
votes
1answer
161 views

Simulate Repeat/Until in BASIC, and on a single line?

Is there a way to simulate a Repeat/Until loop in a BASIC language without it, and without using a GOTO statement? For BASIC languages with command separators, can this be done on a single line ...
10
votes
2answers
657 views

Pattern matching, which language first had it

Which programming language was the first to use pattern match? The oldest ones I know are: Prolog 1972 ML 1973 Are there languages older that have pattern matching? Edit: By pattern matching I ...
25
votes
5answers
4k views

How was the C language ported to architectures with non-power-of-2 word sizes?

By the time the C language started to gain popularity outside of the PDP-11 circles (mid-1970s), mainframes with "weird" word sizes, and no capability to address individual bytes efficiently were ...
18
votes
5answers
2k views

Early Forth for personal computers

What were the earliest Forth programming language implementations for 8-bit personal computers? Was it FIG Forth? Or a predecessor? Or some other development? Why did Forth lose its relative ...
5
votes
3answers
495 views

When were the analogs of the C operators “break” and “continue” introduced in Pascal?

When published in 1970, the Pascal language did not have a way to implement the functionality equivalent to the (future) C language operators "break" and "continue". Their convenience having been ...
12
votes
1answer
1k views

What was the first C compiler for the Mac?

When did a C compiler first become commercially available for the Apple Macintosh? And what was its name? The only programming languages that I recall were available for the Mac at launch (January ...
10
votes
2answers
614 views

What is the origin of different styles of assembly language mnemonics?

As exemplified in answers to this question (I hope that closed questions that are linked to, don't get purged), the instruction mnemonics in early assembly languages had a 1-to-1 correspondence to the ...
12
votes
6answers
1k views

Do any mainframe emulators exist with a functional FORTRAN compiler?

Similar to this question, but generalized to any mainframe computer from before the microprocessor era, does there exist an emulator and OS for a vintage mainframe computer that will run the output ...
30
votes
3answers
10k views

Where does this esoteric Pascal operator come from?

In the documentation for an implementation of Pascal for a Soviet computer, I've encountered a very weird language extension. I'll try to translate it: Branching operator (branch) Syntax &...
12
votes
2answers
395 views

What's the meaning of __saveds in Amiga C code?

What's the meaning of __saveds in Amiga C code? It's applied to function prototypes, and is required for functions that are to be called by assembler code, if I understand correctly.
8
votes
3answers
2k views

What “Write your own RPG/Adventure game” books were available for 8-bit computers? [closed]

During the 70s and 80s there were a number of books about how to write your own games for 8-bit computers, usually in BASIC. Three examples of these books are How to Create Adventure Games by ...
20
votes
7answers
1k views

What implementations of BASIC had a robust flood fill operator?

When I learned BASIC on Elektronika BK, I got fascinated with the flood fill (PAINT) operator: how does it know to get to all nooks and crannies of the shape to fill? I've devised an algorithm, tried ...
14
votes
2answers
895 views

What is the “standard” way to implement KERNAL hooks on the C64?

The C64 kernel (or KERNAL as it’s known in the C64 community) routines work via a jump vector table stored in page $03xx. A common programming paradigm to create something like a "device driver" would ...
10
votes
2answers
440 views

Did the VIC-20 support raster scanline tricks like the Commodore 64?

I've been programming the C64 on/off for over 30 years (wow). However, I have a few VIC-20's I want to program. I never had a VIC-20 as a kid so I haven't had much exposure to them. Am I correct in ...
8
votes
1answer
332 views

Which memory management is easiest to program - CoCo 3 or C128/Apple //e? [closed]

As the 8-bit systems hit their peak in the mid-1980s, breaking the 64K barrier was all the rage. Commodore, Apple, Atari, and Tandy all shipped new 8-bit machines that came standard with 128K. Of ...
9
votes
0answers
290 views

Who and how worked on games in 80's? [closed]

As a developer in a team, I am used to some techniques and workflow, like using git, issue trackers, linters, common ways to discuss the structure of the code, the ways to debug and refactor code. I ...
13
votes
2answers
630 views

How could high level functions with return values map to 6502 assembly? (if at all possible)

What sort of code could be used to substitute a high level function with a return value to a 6502 subroutine? Take this C-like function for example. byte func(byte a, byte b, byte c) { d = (a + b)...
10
votes
1answer
217 views

Does a CDC 1604 emulator exist with a functional FORTRAN compiler?

The first FORTRAN compiler for the Soviet BESM-6 mainframe was written by means of manually retargeting the assembly code of the CDC 1604 FORTRAN compiler donated by CERN to JINR. As a result is it ...
14
votes
2answers
376 views

Do any interesting POP-2 programs survive?

On a disk image (which I had for many years) from a BESM-6, I've suddenly found a working POP-2 (POPLAN) interpreter (for all these years I'd considered that area as useless bits and pieces of various ...
10
votes
2answers
500 views

Apple II / ProDOS: Run binary games without BASIC.SYSTEM?

Is there a way in ProDOS 8, to directly run old DOS 3.3 binary games without loading BASIC.SYSTEM ? Most games never access DOS 3.3 once the program was running, so even though these were never meant ...
6
votes
2answers
450 views

Apple II: Applesoft variable syntax error weirdness

While typing immediate-mode commands in Apple II Applesoft / floating point BASIC, I discovered an odd situation where I will get other programming error messages before a syntax error. Why does it do ...
21
votes
2answers
2k views

Apple II: Applesoft BASIC memory management

I am trying to write an Applesoft / floating point BASIC program using high resolution graphics and some assembly language code. My BASIC program is quite large, and after running the program for a ...
75
votes
7answers
25k views

Why would a NES game use an undocumented 1-byte or 2-byte NOP in production?

Reading the NESdev wiki page on CPU unofficial opcodes, I see a few games use an undocumented 2-byte NOP instuction in production: Puzznic, F-117A Stealth Fighter, and Infiltrator use $89 #i. Beauty ...
12
votes
3answers
3k views

MSX Assembly/Basic programming documentation

I'd like to try to create software (and maybe simple games) for the MSX standard. I know I have two ways to do so, either I use MSX Basic or Z80 assembly. I think that Z80 assembly is more powerful ...
16
votes
8answers
2k views

How were bugs reported for compilers that shipped on and were installed via floppy disks?

Take the Microsoft C 1.0 compiler for example. It shipped on multiple 5.25" 360K disks, and when it ran on machines without internal hard disk, so users had to switch floppies between the editor, ...
57
votes
6answers
13k views

Where did the popularity of the `i` variable come from?

I have heard that the reason the i variable is used so much is because there was an old computer where each variable could only be a single letter and that reserved the variables a through h as ...