1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-09-29 09:20:55 +10:00

recipes/sms/romasm: make ed's memory usage fit the SMS

Yup, that's ultimately why I've just made this whole big zasm
refactoring in the previous commits. To allow for this.

But also, zasm is in much better shape now...
This commit is contained in:
Virgil Dupras 2019-07-23 16:13:52 -04:00
parent c2d84563dd
commit af0b6231ca
3 changed files with 14 additions and 10 deletions

View File

@ -1,12 +1,5 @@
; buf - manage line buffer
;
; *** Consts ***
;
; Maximum number of lines allowed in the buffer.
.equ BUF_MAXLINES 0x800
; Size of our scratchpad
.equ BUF_PADMAXLEN 0x1000
; *** Variables ***
; Number of lines currently in the buffer
.equ BUF_LINECNT BUF_RAMSTART
@ -14,11 +7,11 @@
.equ BUF_LINES BUF_LINECNT+2
; Points to the end of the scratchpad, that is, one byte after the last written
; char in it.
.equ BUF_PADEND BUF_LINES+BUF_MAXLINES*2
.equ BUF_PADEND BUF_LINES+ED_BUF_MAXLINES*2
; The in-memory scratchpad
.equ BUF_PAD BUF_PADEND+2
.equ BUF_RAMEND BUF_PAD+BUF_PADMAXLEN
.equ BUF_RAMEND BUF_PAD+ED_BUF_PADMAXLEN
; *** Code ***

View File

@ -1,4 +1,13 @@
#include "user.h"
; *** Overridable consts ***
; Maximum number of lines allowed in the buffer.
.equ ED_BUF_MAXLINES 0x800
; Size of our scratchpad
.equ ED_BUF_PADMAXLEN 0x1000
; ******
#include "err.h"
.org USER_CODE
@ -14,4 +23,3 @@
#include "ed/cmd.asm"
.equ ED_RAMSTART CMD_RAMEND
#include "ed/main.asm"

View File

@ -4,6 +4,9 @@
.equ USER_RAMSTART 0xc200
.equ FS_HANDLE_SIZE 6
.equ BLOCKDEV_SIZE 8
; Make ed fit in SMS's memory
.equ ED_BUF_MAXLINES 0x100
.equ ED_BUF_PADMAXLEN 0x800
; *** JUMP TABLE ***
.equ strncmp 0x03