mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-17 05:18:06 +11: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:
parent
c2d84563dd
commit
af0b6231ca
@ -1,12 +1,5 @@
|
|||||||
; buf - manage line buffer
|
; 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 ***
|
; *** Variables ***
|
||||||
; Number of lines currently in the buffer
|
; Number of lines currently in the buffer
|
||||||
.equ BUF_LINECNT BUF_RAMSTART
|
.equ BUF_LINECNT BUF_RAMSTART
|
||||||
@ -14,11 +7,11 @@
|
|||||||
.equ BUF_LINES BUF_LINECNT+2
|
.equ BUF_LINES BUF_LINECNT+2
|
||||||
; Points to the end of the scratchpad, that is, one byte after the last written
|
; Points to the end of the scratchpad, that is, one byte after the last written
|
||||||
; char in it.
|
; char in it.
|
||||||
.equ BUF_PADEND BUF_LINES+BUF_MAXLINES*2
|
.equ BUF_PADEND BUF_LINES+ED_BUF_MAXLINES*2
|
||||||
; The in-memory scratchpad
|
; The in-memory scratchpad
|
||||||
.equ BUF_PAD BUF_PADEND+2
|
.equ BUF_PAD BUF_PADEND+2
|
||||||
|
|
||||||
.equ BUF_RAMEND BUF_PAD+BUF_PADMAXLEN
|
.equ BUF_RAMEND BUF_PAD+ED_BUF_PADMAXLEN
|
||||||
|
|
||||||
; *** Code ***
|
; *** Code ***
|
||||||
|
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
#include "user.h"
|
#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"
|
#include "err.h"
|
||||||
.org USER_CODE
|
.org USER_CODE
|
||||||
|
|
||||||
@ -14,4 +23,3 @@
|
|||||||
#include "ed/cmd.asm"
|
#include "ed/cmd.asm"
|
||||||
.equ ED_RAMSTART CMD_RAMEND
|
.equ ED_RAMSTART CMD_RAMEND
|
||||||
#include "ed/main.asm"
|
#include "ed/main.asm"
|
||||||
|
|
||||||
|
@ -4,6 +4,9 @@
|
|||||||
.equ USER_RAMSTART 0xc200
|
.equ USER_RAMSTART 0xc200
|
||||||
.equ FS_HANDLE_SIZE 6
|
.equ FS_HANDLE_SIZE 6
|
||||||
.equ BLOCKDEV_SIZE 8
|
.equ BLOCKDEV_SIZE 8
|
||||||
|
; Make ed fit in SMS's memory
|
||||||
|
.equ ED_BUF_MAXLINES 0x100
|
||||||
|
.equ ED_BUF_PADMAXLEN 0x800
|
||||||
|
|
||||||
; *** JUMP TABLE ***
|
; *** JUMP TABLE ***
|
||||||
.equ strncmp 0x03
|
.equ strncmp 0x03
|
||||||
|
Loading…
Reference in New Issue
Block a user