您仍然使用哪些古老的守旧学校代码?

发布于 2024-07-13 03:56:59 字数 2407 浏览 5 评论 0原文

最近几天请病假,我实在是太无聊了,所以我决定尝试挖掘一些旧代码。 我可以找到我写的一些古老的 Atari ST 内容的二进制版本,但我找不到任何来源。 我确实设法从传奇的旧 x2ftp 站点的存档中挖掘出许多个月前我在 ASM 中编写的旧 ModeX 库:

http://ftp.lanet.lv/ftp/mirror/x2ftp/msdos

过去的爆炸:-)

; Actually Sticks Us Into ModeX - With 240 Scanlines Per Page
; Set The Variable LSCAN To The Virtual Scanline Length You Want
; Trashes AX, CX, DX, DS, SI
; Shouldn't Matter Though As This Should Be The First Thing You Call!
Set_X_240   PROC
        Call    Set_Graph       ; Set Mode 13h
        mov     dx, Seq_Port
        mov     ax, 00604h      ; Index 4 (Memory Mode Reg.) In AL
                                ; Bit 3 = Chain 4
        out     dx, ax          ; Kill Chain 4 Mode
        mov     ax, 00100h      ; Index 0 (Reset Reg.) In AL
        out     dx, ax          ; Reset Syncronous (At End Of Cycle)
        dec     dx              ; Change Port
        dec     dx              ; To Misc. S--t Port :)
        mov     al, 11100011b
        out     dx, al          ; Sets 480 Line Mode, 25Mhz Dot Clock
        inc     dx              ; Change Port
        inc     dx              ; Back To Sequencer Port
        mov     ax, 00300h
        out     dx, ax          ; Restart Controller
        mov     dx, Crtc_Port
        mov     al, 011h
        out     dx, al          ; Select Index 11h (Vert.Retrace End)
        inc     dx              ; Data Port
        in      al, dx          ; Read In Current Bit Mask
        and     al, 07Fh        ; 01111111 - Clear Top Bit (Write Protect)
        out     dx, al          ; Un-Write Protect Index 0-7 Of CRTC Reg.
        dec     dx              ; Restore Port To Index
        mov     ax, seg CRTC_Data_240           ; Address Of Our CRTC Data
        mov     ds, ax
        mov     si, offset CRTC_Data_240
        mov     cx, LCRTC_Data_240      ; Length Of Data
        repz    outsw                       ; Chuck It At The Port
        mov     ax, lscan
        shr     ax, 3           ; Number Of Words Per Scan Line
        mov     ah, al          ; Into AH
        mov     al, 013h        ; Port Index 013h - Logical Screen Width
        out     dx, ax

        mov     NScan, 240
    Call    Set_Pages
    ret
Set_X_240   ENDP

还有人想让自己看起来很老并发布一些旧学校代码吗? :-) 很遗憾我还没有任何 68000 ASM 的东西,尽管我现在可能都认不出它了!

啊..回忆:-)

Having been bored out of my brains the last few days off work sick, I decided to try and dig up some old code. I could find some binary versions of some ancient Atari ST stuff I wrote, but I couldn't find any source. I did manage to dredge up an old ModeX library I wrote in ASM many moons ago from an archive of the legendary old x2ftp site:

http://ftp.lanet.lv/ftp/mirror/x2ftp/msdos

Blast from the past :-)

; Actually Sticks Us Into ModeX - With 240 Scanlines Per Page
; Set The Variable LSCAN To The Virtual Scanline Length You Want
; Trashes AX, CX, DX, DS, SI
; Shouldn't Matter Though As This Should Be The First Thing You Call!
Set_X_240   PROC
        Call    Set_Graph       ; Set Mode 13h
        mov     dx, Seq_Port
        mov     ax, 00604h      ; Index 4 (Memory Mode Reg.) In AL
                                ; Bit 3 = Chain 4
        out     dx, ax          ; Kill Chain 4 Mode
        mov     ax, 00100h      ; Index 0 (Reset Reg.) In AL
        out     dx, ax          ; Reset Syncronous (At End Of Cycle)
        dec     dx              ; Change Port
        dec     dx              ; To Misc. S--t Port :)
        mov     al, 11100011b
        out     dx, al          ; Sets 480 Line Mode, 25Mhz Dot Clock
        inc     dx              ; Change Port
        inc     dx              ; Back To Sequencer Port
        mov     ax, 00300h
        out     dx, ax          ; Restart Controller
        mov     dx, Crtc_Port
        mov     al, 011h
        out     dx, al          ; Select Index 11h (Vert.Retrace End)
        inc     dx              ; Data Port
        in      al, dx          ; Read In Current Bit Mask
        and     al, 07Fh        ; 01111111 - Clear Top Bit (Write Protect)
        out     dx, al          ; Un-Write Protect Index 0-7 Of CRTC Reg.
        dec     dx              ; Restore Port To Index
        mov     ax, seg CRTC_Data_240           ; Address Of Our CRTC Data
        mov     ds, ax
        mov     si, offset CRTC_Data_240
        mov     cx, LCRTC_Data_240      ; Length Of Data
        repz    outsw                       ; Chuck It At The Port
        mov     ax, lscan
        shr     ax, 3           ; Number Of Words Per Scan Line
        mov     ah, al          ; Into AH
        mov     al, 013h        ; Port Index 013h - Logical Screen Width
        out     dx, ax

        mov     NScan, 240
    Call    Set_Pages
    ret
Set_X_240   ENDP

Anyone else want to make themselves look old and post some old school code? :-) It's a shame I don't have any of my 68000 ASM stuff still, although I probably wouldn't even recognise it now!

Ahh.. memories :-)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

南汐寒笙箫 2024-07-20 03:56:59

有一船旧的 Atari 8 位 BASIC 和 Atari ST 的东西(我仍然有 ST,但它没有联网,所以我很少使用它)。

我曾经输入过 David Ahl 的《BASIC Computer Games: Microcomputer Edition》中的大部分游戏,并将它们移植到 8 位和 ST BASIC 上。

我有点想将这些旧游戏移植到Processing/Arduino,以获得老式的乐趣。

Have a boatload of old Atari 8-bit BASIC and Atari ST stuff from way back (I still have the ST, but it's not networked so I hardly ever use it).

I once typed in most of the games from David Ahl's "BASIC Computer Games: Microcomputer Edition", porting them to both the 8-bit and ST BASIC.

I am half-tempted to port those old games to Processing/Arduino, for old-school kicks.

煞人兵器 2024-07-20 03:56:59

我有一个 MUD,是我在 1990-1993 年大学期间编写和维护的。 都是C。那是迪酷MUD的一个衍生品,叫SillyMUD,是我当时的骄傲和喜悦。

您仍然可以在 Intertubes 上到处找到该代码。

I have a MUD I wrote and maintained during college, back in 1990-1993. All C. It was a derivation of Diku MUD called SillyMUD, and it was my pride and joy at the time.

You can still find the code on the Intertubes, here and there.

奶气 2024-07-20 03:56:59

我在 1998 年编写的一些绝对糟糕的 Perl 代码仍在某个网站上使用...

我所说的糟糕是指其中没有 use strict;,也没有 my ...

Some absolutely terrible Perl code I wrote in 1998 is still in use on a certain website...

By terrible, I mean no use strict;, no mys anywhere in it...

丘比特射中我 2024-07-20 03:56:59

我从 Atari ST 获得的大部分代码都在 GFA-Basic 中,我不想碰那些布满灰尘的软盘。

Most of the code I had from the Atari ST was in GFA-Basic, I wouldn't want to touch those dusty floppies.

等你爱我 2024-07-20 03:56:59

来自旧的 EISPACK Fortran 例程:

C     THIS SUBROUTINE IS A TRANSLATION OF THE ALGOL PROCEDURE ELMHES,
C     NUM. MATH. 12, 349-368(1968) BY MARTIN AND WILKINSON.
C     HANDBOOK FOR AUTO. COMP., VOL.II-LINEAR ALGEBRA, 339-358(1971).
C
C     GIVEN A REAL GENERAL MATRIX, THIS SUBROUTINE
C     REDUCES A SUBMATRIX SITUATED IN ROWS AND COLUMNS
C     LOW THROUGH HIGH TO UPPER HESSENBERG FORM BY
C     STABILIZED ELEMENTARY SIMILARITY TRANSFORMATIONS.
...
C     QUESTIONS AND COMMENTS SHOULD BE DIRECTED TO BURTON S. GARBOW,
C     MATHEMATICS AND COMPUTER SCIENCE DIV, ARGONNE NATIONAL LABORATORY
C
C     THIS VERSION DATED AUGUST 1983.

from an old EISPACK Fortran routine:

C     THIS SUBROUTINE IS A TRANSLATION OF THE ALGOL PROCEDURE ELMHES,
C     NUM. MATH. 12, 349-368(1968) BY MARTIN AND WILKINSON.
C     HANDBOOK FOR AUTO. COMP., VOL.II-LINEAR ALGEBRA, 339-358(1971).
C
C     GIVEN A REAL GENERAL MATRIX, THIS SUBROUTINE
C     REDUCES A SUBMATRIX SITUATED IN ROWS AND COLUMNS
C     LOW THROUGH HIGH TO UPPER HESSENBERG FORM BY
C     STABILIZED ELEMENTARY SIMILARITY TRANSFORMATIONS.
...
C     QUESTIONS AND COMMENTS SHOULD BE DIRECTED TO BURTON S. GARBOW,
C     MATHEMATICS AND COMPUTER SCIENCE DIV, ARGONNE NATIONAL LABORATORY
C
C     THIS VERSION DATED AUGUST 1983.
故事还在继续 2024-07-20 03:56:59

我们有一个测试工具,最初是为在 Windows 3.1 上运行而编写的。 虽然饰面已经更新了很多,但内脏仍然是一样的。 它的核心仍然有一些远/长指针术语。

We have a test harness that was orginally written to run on Windows 3.1. While the veneer has been updated a lot, the guts are still the same. It still has some far/long pointer terminology in the core.

花开浅夏 2024-07-20 03:56:59

以复制粘贴为核心的开发策略让我非常非常难过。

Copy&paste as the core development strategy makes me very, very sad.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文